diff options
author | Munyoki Kilyungi | 2024-03-11 21:05:57 +0300 |
---|---|---|
committer | Munyoki Kilyungi | 2024-03-13 10:25:11 +0300 |
commit | a295d21a42a6ae9c463f7661b32df7de11095835 (patch) | |
tree | cc5bfe988912113b4659e60c5f34ff0fa54024e0 /gn_auth/auth/authorisation/resources/groups/views.py | |
parent | 27d40788e2e2c8fbeb8873e895d77a76bbd49a45 (diff) | |
download | gn-auth-a295d21a42a6ae9c463f7661b32df7de11095835.tar.gz |
Define OAuth2Token using a frozen dataclass.
* gn_auth/auth/authentication/oauth2/endpoints/introspection.py
(IntrospectionEndpoint.introspect_token): Replace token.get_scope()
with token.scope.
* gn_auth/auth/authentication/oauth2/models/oauth2token.py: Import
dataclass, TokenMixin and cached_property. Delete NamedTuple import.
(OAuth2Token): Use a frozen dataclass and explicitly inherit from
TokenMixin.
(OAuth2Token.expires_at): Make this a cached_property.
(OAuth2Token.check_client): Add the "# pylint ..." in it's own line.
Tested-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn_auth/auth/authorisation/resources/groups/views.py')
0 files changed, 0 insertions, 0 deletions