diff options
author | Frederick Muriuki Muriithi | 2025-02-26 13:35:49 -0600 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2025-02-26 13:35:49 -0600 |
commit | 1a9b87f34f84107d0ede098b6c5f276a2d47ef39 (patch) | |
tree | 0de97e000ba5727437a4a563c289da7829db422c /gn_auth/auth/authentication/oauth2/grants/refresh_token_grant.py | |
parent | d35b73fb0924ebf1f1e43f42eba0f8fe9bfd6dc8 (diff) | |
download | gn-auth-1a9b87f34f84107d0ede098b6c5f276a2d47ef39.tar.gz |
Fix pylint errors.
Diffstat (limited to 'gn_auth/auth/authentication/oauth2/grants/refresh_token_grant.py')
-rw-r--r-- | gn_auth/auth/authentication/oauth2/grants/refresh_token_grant.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gn_auth/auth/authentication/oauth2/grants/refresh_token_grant.py b/gn_auth/auth/authentication/oauth2/grants/refresh_token_grant.py index fd6804d..f897d89 100644 --- a/gn_auth/auth/authentication/oauth2/grants/refresh_token_grant.py +++ b/gn_auth/auth/authentication/oauth2/grants/refresh_token_grant.py @@ -34,18 +34,18 @@ class RefreshTokenGrant(grants.RefreshTokenGrant): else Nothing) ).maybe(None, lambda _tok: _tok) - def authenticate_user(self, credential): + def authenticate_user(self, refresh_token): """Check that user is valid for given token.""" with connection(app.config["AUTH_DB"]) as conn: try: - return user_by_id(conn, credential.user.user_id) + return user_by_id(conn, refresh_token.user.user_id) except NotFoundError as _nfe: return None return None - def revoke_old_credential(self, credential): + def revoke_old_credential(self, refresh_token): """Revoke any old refresh token after issuing new refresh token.""" with connection(app.config["AUTH_DB"]) as conn: - if credential.parent_of is not None: - revoke_refresh_token(conn, credential) + if refresh_token.parent_of is not None: + revoke_refresh_token(conn, refresh_token) |