We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a35b6a0 commit 60fd953Copy full SHA for 60fd953
1 file changed
archipy/helpers/utils/jwt_utils.py
@@ -77,10 +77,9 @@ def create_token(
77
to_encode.update(additional_claims)
78
79
# Validate SECRET_KEY
80
- arg_secret_key = "SECRET_KEY"
81
secret_key = configs.SECRET_KEY
82
if secret_key is None:
83
- raise InvalidArgumentError(arg_secret_key)
+ raise InvalidArgumentError("SECRET_KEY")
84
return jwt.encode(to_encode, secret_key.get_secret_value(), algorithm=configs.HASH_ALGORITHM)
85
86
@classmethod
@@ -183,10 +182,9 @@ def decode_token(
183
182
184
try:
185
186
187
188
189
190
191
payload = jwt.decode(
192
token,
0 commit comments