diff options
Diffstat (limited to 'gn3/auth/authentication/oauth2/endpoints/utilities.py')
-rw-r--r-- | gn3/auth/authentication/oauth2/endpoints/utilities.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gn3/auth/authentication/oauth2/endpoints/utilities.py b/gn3/auth/authentication/oauth2/endpoints/utilities.py index 299f151..b85940d 100644 --- a/gn3/auth/authentication/oauth2/endpoints/utilities.py +++ b/gn3/auth/authentication/oauth2/endpoints/utilities.py @@ -12,7 +12,9 @@ def query_token(# pylint: disable=[unused-argument] endpoint_object: Any, token_str: str, token_type_hint) -> Optional[ OAuth2Token]: """Retrieve the token from the database.""" - __identity__ = lambda val: val + def __identity__(val): + """Identity function.""" + return val token = Nothing with db.connection(current_app.config["AUTH_DB"]) as conn: if token_type_hint == "access_token": |