update focus
This commit is contained in:
@@ -225,24 +225,24 @@ class RevocationEndpoint(rfc7009.RevocationEndpoint):
|
||||
token_string: str,
|
||||
token_type_hint: str | None = None,
|
||||
):
|
||||
result = dyn.collection.get_items(
|
||||
t = dyn.collection.get_items(
|
||||
TransactKey('OAUTH2#TOKEN')
|
||||
+ SortKey(sk=f'REFRESH_TOKEN#{token_string}', rename_key='refresh_token')
|
||||
+ SortKey(sk=f'ACCESS_TOKEN#{token_string}', rename_key='access_token'),
|
||||
flatten_top=False,
|
||||
)
|
||||
|
||||
if not result:
|
||||
if not t:
|
||||
return None
|
||||
|
||||
logger.debug('Tokens retrieved', result=result)
|
||||
logger.debug('Tokens retrieved', result=t)
|
||||
|
||||
if not token_type_hint:
|
||||
token_type_hint = (
|
||||
'refresh_token' if 'refresh_token' in result else 'access_token'
|
||||
'refresh_token' if 'refresh_token' in t else 'access_token'
|
||||
)
|
||||
|
||||
token = result[token_type_hint]
|
||||
token = t[token_type_hint]
|
||||
|
||||
return OAuth2Token(
|
||||
expires_in=int(token['expires_in']),
|
||||
|
||||
Reference in New Issue
Block a user