check token revoke
This commit is contained in:
parent
58647c6979
commit
4969b7b371
1 changed files with 3 additions and 0 deletions
|
@ -23,6 +23,9 @@ class OAuthAccessTokenAuth(HttpBearer):
|
|||
if not tk:
|
||||
logger.debug("API auth: access token not found")
|
||||
return False
|
||||
if tk.revoked:
|
||||
logger.debug("API auth: access token revoked")
|
||||
return False
|
||||
request_scope = ""
|
||||
request_method = request.method
|
||||
if request_method in PERMITTED_READ_METHODS:
|
||||
|
|
Loading…
Add table
Reference in a new issue