AuthJWT 400->401
This commit is contained in:
Submodule gluon/packages/dal updated: e595b921b0...db943c12cb
Submodule gluon/packages/yatl updated: 468c093ab0...5deb403a9e
@@ -3726,7 +3726,7 @@ class Auth(AuthAPI):
|
||||
are passed to the constructor of class AuthJWT. Look there for documentation.
|
||||
"""
|
||||
if not self.jwt_handler:
|
||||
raise HTTP(400, "Not authorized")
|
||||
raise HTTP(401, "Not authorized")
|
||||
else:
|
||||
rtn = self.jwt_handler.jwt_token_manager()
|
||||
raise HTTP(200, rtn, cookies=None, **current.response.headers)
|
||||
@@ -3820,7 +3820,7 @@ class Auth(AuthAPI):
|
||||
|
||||
def allows_jwt(self, otherwise=None):
|
||||
if not self.jwt_handler:
|
||||
raise HTTP(400, "Not authorized")
|
||||
raise HTTP(401, "Not authorized")
|
||||
else:
|
||||
return self.jwt_handler.allows_jwt(otherwise=otherwise)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user