Skip to content

Commit 035394d

Browse files
author
IndominusByte
committed
fix about and add title in configuration options
1 parent 5297d8d commit 035394d

File tree

12 files changed

+109
-17
lines changed

12 files changed

+109
-17
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
---
1111

1212
## Features
13-
FastAPI extension that provides JWT Auth support (secure, easy to use and lightweight), if you were familiar with flask-jwt-extended this extension suitable for you because this extension inspired by flask-jwt-extended.
13+
FastAPI extension that provides JWT Auth support (secure, easy to use and lightweight), if you were familiar with flask-jwt-extended this extension suitable for you because this extension inspired by flask-jwt-extended 😀
1414

15-
- Access token and refresh token
16-
- Token freshness
17-
- Token revoking
15+
- Access tokens and refresh tokens
16+
- Freshness Tokens
17+
- Revoking Tokens
1818
- Support for adding custom claims to JSON Web Tokens
1919
- Support RSA encryption
2020
- Storing tokens in cookies and CSRF protection

docs/configuration/cookies.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
`authjwt_access_cookie_key`
2+
: is simply dummy text of the printing and typesetting industry
3+
4+
`authjwt_refresh_cookie_key`
5+
: is simply dummy text of the printing and typesetting industry
6+
7+
`authjwt_access_cookie_path`
8+
: is simply dummy text of the printing and typesetting industry
9+
10+
`authjwt_refresh_cookie_path`
11+
: is simply dummy text of the printing and typesetting industry
12+
13+
`authjwt_cookie_max_age`
14+
: is simply dummy text of the printing and typesetting industry
15+
16+
`authjwt_cookie_domain`
17+
: is simply dummy text of the printing and typesetting industry
18+
19+
`authjwt_cookie_secure`
20+
: is simply dummy text of the printing and typesetting industry
21+
22+
`authjwt_cookie_samesite`
23+
: is simply dummy text of the printing and typesetting industry

docs/configuration/csrf.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
`authjwt_cookie_csrf_protect`
2+
: is simply dummy text of the printing and typesetting industry
3+
4+
`authjwt_access_csrf_cookie_key`
5+
: is simply dummy text of the printing and typesetting industry
6+
7+
`authjwt_refresh_csrf_cookie_key`
8+
: is simply dummy text of the printing and typesetting industry
9+
10+
`authjwt_access_csrf_cookie_path`
11+
: is simply dummy text of the printing and typesetting industry
12+
13+
`authjwt_refresh_csrf_cookie_path`
14+
: is simply dummy text of the printing and typesetting industry
15+
16+
`authjwt_access_csrf_header_name`
17+
: is simply dummy text of the printing and typesetting industry
18+
19+
`authjwt_refresh_csrf_header_name`
20+
: is simply dummy text of the printing and typesetting industry
21+
22+
`authjwt_csrf_methods`
23+
: is simply dummy text of the printing and typesetting industry

docs/configuration/denylist.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
`authjwt_denylist_enabled`
2+
: is simply dummy text of the printing and typesetting industry
3+
4+
`authjwt_denylist_token_checks`
5+
: is simply dummy text of the printing and typesetting industry

docs/configuration/general.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
`authjwt_token_location`
2+
: is simply dummy text of the printing and typesetting industry
3+
4+
`authjwt_secret_key`
5+
: is simply dummy text of the printing and typesetting industry
6+
7+
`authjwt_public_key`
8+
: is simply dummy text of the printing and typesetting industry
9+
10+
`authjwt_private_key`
11+
: is simply dummy text of the printing and typesetting industry
12+
13+
`authjwt_algorithm`
14+
: is simply dummy text of the printing and typesetting industry
15+
16+
`authjwt_decode_algorithms`
17+
: is simply dummy text of the printing and typesetting industry
18+
19+
`authjwt_decode_leeway`
20+
: is simply dummy text of the printing and typesetting industry
21+
22+
`authjwt_encode_issuer`
23+
: is simply dummy text of the printing and typesetting industry
24+
25+
`authjwt_decode_issuer`
26+
: is simply dummy text of the printing and typesetting industry
27+
28+
`authjwt_decode_audience`
29+
: is simply dummy text of the printing and typesetting industry
30+
31+
`authjwt_access_token_expires`
32+
: is simply dummy text of the printing and typesetting industry
33+
34+
`authjwt_refresh_token_expires`
35+
: is simply dummy text of the printing and typesetting industry

docs/configuration/headers.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
`authjwt_header_name`
2+
: is simply dummy text of the printing and typesetting industry
3+
4+
`authjwt_header_type`
5+
: is simply dummy text of the printing and typesetting industry

docs/usage/basic.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ INFO: Application startup complete.
1515
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
1616
```
1717

18-
To access a jwt_required protected url, all we have to do is send in the JWT with the request. By default, this is done with an authorization header that looks like:
18+
To access a **jwt_required** protected url, all we have to do is send in the JWT with the request. By default, this is done with an authorization header that looks like:
1919

2020
```
2121
Authorization: Bearer <access_token>
2222
```
2323

24-
We can see this in action using <b>curl</b>:
24+
We can see this in action using **curl**:
2525

2626
```bash
2727
$ curl http://localhost:8000/user

docs/usage/freshness.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
The fresh token pattern is built into this extension. this pattern is very simple, you can choose to mark some access tokens as fresh and other as a non-fresh token, and use the <b>fresh_jwt_required()</b> function to only allow fresh tokens to access the certain endpoint.
1+
The fresh tokens pattern is built into this extension. This pattern is very simple, you can choose to mark some access tokens as fresh and other as a non-fresh tokens, and use the **fresh_jwt_required()** function to only allow fresh tokens to access the certain endpoint.
22

3-
This is useful for allowing the fresh token to do some critical things (such as update information user) in real case you can see in the GitHub system when user wants to delete a repository in a certain time you need login if token not fresh again. Utilizing Fresh tokens in conjunction with refresh tokens can lead to a more secure site, without creating a bad user experience by making users constantly re-authenticate.
3+
This is useful for allowing the fresh tokens to do some critical things (such as update information user) in real case you can see in the GitHub system when user wants to delete a repository in a certain time you need login if tokens not fresh again. Utilizing Fresh tokens in conjunction with refresh tokens can lead to a more secure site, without creating a bad user experience by making users constantly re-authenticate.
44

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

docs/usage/optional.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
In some cases you want to use one endpoint for both, protected and unprotected. in this situation you can use function <b>jwt_optional()</b>. 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.
1+
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

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

docs/usage/refresh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
These are long-lived tokens which can be used to create new access tokens once an old access token has expired. refresh tokens cannot access an endpoint that is protected with <b>jwt_required()</b>, <b>jwt_optional()</b>, and <b>fresh_jwt_required()</b> and access tokens cannot access an endpoint that is protected with <b>jwt_refresh_token_required()</b>.
1+
These are long-lived tokens which can be used to create a new access tokens once an old access token has expired. Refresh tokens cannot access an endpoint that is protected with **jwt_required()**, **jwt_optional()**, and **fresh_jwt_required()** and access tokens cannot access an endpoint that is protected with **jwt_refresh_token_required()**.
22

3-
Utilizing refresh tokens we can help reduce the damage that can be done if an access token is stolen. however, if an attacker gets a refresh token they can keep generating new access tokens and accessing protected endpoints as though he was that user. we can help combat this by using the fresh token pattern, discussed in the next section.
3+
Utilizing refresh tokens we can help reduce the damage that can be done if an access tokens is stolen. However, if an attacker gets a refresh tokens they can keep generating new access tokens and accessing protected endpoints as though he was that user. We can help combat this by using the fresh tokens pattern, discussed in the next section.
44

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

0 commit comments

Comments
 (0)