Skip to content

Commit 7e9abdb

Browse files
author
IndominusByte
committed
fix hl_lines in examples
1 parent 3e1da22 commit 7e9abdb

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

docs/usage/basic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Create a file `basic.py`:
22

3-
```python
3+
```python hl_lines="16 19-21 25-30 36 41 47-48 50"
44
{!../examples/basic.py!}
55
```
66

docs/usage/freshness.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ This is useful for allowing the fresh tokens to do some critical things (such as
44

55
Here is an example of how you could utilize refresh tokens with the fresh token pattern:
66

7-
```python hl_lines="39"
7+
```python hl_lines="39 82"
88
{!../examples/freshness.py!}
99
```

docs/usage/jwt-in-cookies.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Highly recommended using JWT in cookies, if your frontend interacts with the bac
22

33
Here is a basic example of how to store JWT in cookies:
44

5-
```python
5+
```python hl_lines="21 23 46-47 57 69"
66
{!../examples/jwt_in_cookies.py!}
77
```
88

@@ -27,6 +27,6 @@ No system is safe. If an attacker can perform an XSS attack they can still acces
2727

2828
Here is an example of using cookies with CSRF protection:
2929

30-
```python
30+
```python hl_lines="23 25 27 29 56-57 67 79"
3131
{!../examples/csrf_protection_cookies.py!}
3232
```

docs/usage/optional.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
In some cases you want to use one endpoint for both, protected and unprotected. In this situation you can use function **jwt_optional()**. This will allow the endpoint to be accessed regardless of if a JWT is sent in the request or not. If a JWT get tampering or expired an error will be returned instead of calling the endpoint.
22

3-
```python hl_lines="37-40"
3+
```python hl_lines="37"
44
{!../examples/optional.py!}
55
```

docs/usage/refresh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ Utilizing refresh tokens we can help reduce the damage that can be done if an ac
44

55
Here is an example of using access and refresh tokens:
66

7-
```python hl_lines="35"
7+
```python hl_lines="35 46"
88
{!../examples/refresh.py!}
99
```

docs/usage/revoking.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ This will allow you to revoke a specific tokens so that it can no longer access
22

33
Here is a basic example use tokens revoking:
44

5-
```python
5+
```python hl_lines="17-18 34 40-43 70 79"
66
{!../examples/denylist.py!}
77
```
88

@@ -14,6 +14,6 @@ In production, you will likely want to use either a database or in-memory store
1414

1515
Here example use Redis for revoking a tokens:
1616

17-
```python
17+
```python hl_lines="7 17-20 38 44-48 78 87"
1818
{!../examples/denylist_redis.py!}
1919
```

0 commit comments

Comments
 (0)