You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ There are two ways in config JWTModule
77
77
```
78
78
-**register**:
79
79
80
-
`JWTModule.register`allow you to provide JWT configuration in Ellar application config object using `JWT_CONFIG` key.
80
+
`JWTModule.register`lets you provide JWT configuration inthe Ellar application config object using the`JWT_CONFIG` key.
81
81
The register function will create a `ModuleSetup`object that will inject application `config` to a JWT config factory
82
82
83
83
for example:
@@ -101,7 +101,7 @@ There are two ways in config JWTModule
101
101
'jti': "jti",
102
102
'lifetime': timedelta(minutes=5), # token lifetime, this will example in 5 mins
103
103
104
-
'json_encoder':json.JSONEncoder # token lifetime, this will example
104
+
'json_encoder':json.JSONEncoder # token lifetime, this will be an example
105
105
}
106
106
```
107
107
In `auth/module.py`
@@ -138,7 +138,7 @@ JWT_CONFIG = {
138
138
'jti': "jti",
139
139
'lifetime': timedelta(minutes=5), # token lifetime, this will example in 5 mins
140
140
141
-
'json_encoder':json.JSONEncoder # token lifetime, this will example
141
+
'json_encoder':json.JSONEncoder # token lifetime, this will be an example
142
142
}
143
143
```
144
144
@@ -156,9 +156,9 @@ In this scenario, selecting an RSA algorithm mandates configuring the `signing_s
156
156
-### `signing_secret_key`
157
157
The signing key utilized for signing the content of generated tokens has distinct requirements based on the signing protocol.
158
158
For HMAC signing, it should be a randomly generated string containing at least as many bits as dictated by the signing protocol.
159
-
Conversely, forRSA signing, it should be a string encompassing an RSA private key with a length of 2048 bits or more.
160
-
As Simple JWT defaults to 256-bit HMAC signing, the `signing_secret_key` setting automatically takes on the value of your django project's `SECRET_KEY`.
161
-
While this default is practical, it's advisable for developers to modify this setting to a value separate from the django project's secret key.
159
+
Conversely, anRSA signing should be a string encompassing an RSA private key with a length of 2048 bits or more.
160
+
As Simple JWT defaults to 256-bit HMAC signing, the `signing_secret_key` setting automatically takes on the value of your Django project's `SECRET_KEY`.
161
+
While this default is practical, developers should modify this setting to a value separate from the Django project's secret key.
162
162
This adjustment facilitates easier token signing key changes if the key is ever compromised.
163
163
164
164
-### `verifying_secret_key`
@@ -184,7 +184,7 @@ Leeway provides a buffer for the expiration time, which can be defined as an int
184
184
For further details, please consult the following link: https://pyjwt.readthedocs.io/en/latest/usage.html#expiration-time-claim-exp
185
185
186
186
-### `jti`
187
-
The claim designated for storing a token's unique identifier, which is utilized to distinguish revoked tokens within the blacklist application.
187
+
The claim isdesignated for storing a token's unique identifier, which is utilized to distinguish revoked tokens within the blacklist application.
188
188
There might be instances where an alternative claim other than the default "jti" claim needs to be employed for storing this value
189
189
190
190
-### `json_encoder`
@@ -197,13 +197,13 @@ JSON Encoder class that will be used by the `PYJWT` to encode the `jwt_payload`.
197
197
The `JwtService` uses [PYJWT](https://pypi.org/project/PyJWT/) underneath.
0 commit comments