@@ -92,7 +92,7 @@ def _get_secret_key(self, algorithm: str, process: str) -> str:
92
92
if algorithm in symmetric_algorithms :
93
93
if not self ._secret_key :
94
94
raise RuntimeError (
95
- "AUTHJWT_SECRET_KEY must be set when using symmetric algorithm {}" .format (algorithm )
95
+ "authjwt_secret_key must be set when using symmetric algorithm {}" .format (algorithm )
96
96
)
97
97
98
98
return self ._secret_key
@@ -105,15 +105,15 @@ def _get_secret_key(self, algorithm: str, process: str) -> str:
105
105
if process == "encode" :
106
106
if not self ._private_key :
107
107
raise RuntimeError (
108
- "AUTHJWT_PRIVATE_KEY must be set when using asymmetric algorithm {}" .format (algorithm )
108
+ "authjwt_private_key must be set when using asymmetric algorithm {}" .format (algorithm )
109
109
)
110
110
111
111
return self ._private_key
112
112
113
113
if process == "decode" :
114
114
if not self ._public_key :
115
115
raise RuntimeError (
116
- "AUTHJWT_PUBLIC_KEY must be set when using asymmetric algorithm {}" .format (algorithm )
116
+ "authjwt_public_key must be set when using asymmetric algorithm {}" .format (algorithm )
117
117
)
118
118
119
119
return self ._public_key
@@ -209,7 +209,7 @@ def _check_token_is_revoked(self, raw_token: Dict[str,Union[str,int,bool]]) -> N
209
209
if not self ._has_token_in_denylist_callback ():
210
210
raise RuntimeError ("A token_in_denylist_callback must be provided via "
211
211
"the '@AuthJWT.token_in_denylist_loader' if "
212
- "AUTHJWT_DENYLIST_ENABLED is 'True'" )
212
+ "authjwt_denylist_enabled is 'True'" )
213
213
214
214
if self ._token_in_denylist_callback .__func__ (raw_token ):
215
215
raise RevokedTokenError (status_code = 401 ,message = "Token has been revoked" )
@@ -317,7 +317,7 @@ def set_access_cookies(self,encoded_access_token: str, max_age: Optional[int] =
317
317
"""
318
318
if not self .jwt_in_cookies :
319
319
raise RuntimeWarning (
320
- "set_access_cookies() called without 'AUTHJWT_TOKEN_LOCATION ' configured to use cookies"
320
+ "set_access_cookies() called without 'authjwt_token_location ' configured to use cookies"
321
321
)
322
322
323
323
if max_age and not isinstance (max_age ,int ):
@@ -358,7 +358,7 @@ def set_refresh_cookies(self, encoded_refresh_token: str, max_age: Optional[int]
358
358
"""
359
359
if not self .jwt_in_cookies :
360
360
raise RuntimeWarning (
361
- "set_refresh_cookies() called without 'AUTHJWT_TOKEN_LOCATION ' configured to use cookies"
361
+ "set_refresh_cookies() called without 'authjwt_token_location ' configured to use cookies"
362
362
)
363
363
364
364
if max_age and not isinstance (max_age ,int ):
@@ -402,7 +402,7 @@ def unset_access_cookies(self) -> None:
402
402
"""
403
403
if not self .jwt_in_cookies :
404
404
raise RuntimeWarning (
405
- "unset_access_cookies() called without 'AUTHJWT_TOKEN_LOCATION ' configured to use cookies"
405
+ "unset_access_cookies() called without 'authjwt_token_location ' configured to use cookies"
406
406
)
407
407
408
408
self ._response .delete_cookie (
@@ -424,7 +424,7 @@ def unset_refresh_cookies(self) -> None:
424
424
"""
425
425
if not self .jwt_in_cookies :
426
426
raise RuntimeWarning (
427
- "unset_refresh_cookies() called without 'AUTHJWT_TOKEN_LOCATION ' configured to use cookies"
427
+ "unset_refresh_cookies() called without 'authjwt_token_location ' configured to use cookies"
428
428
)
429
429
430
430
self ._response .delete_cookie (
0 commit comments