aboutsummaryrefslogtreecommitdiff
path: root/migrations/auth/20230410_02_WZqSf-create-mrna-resources-table.py
diff options
context:
space:
mode:
authorMunyoki Kilyungi2024-03-11 21:05:57 +0300
committerMunyoki Kilyungi2024-03-13 10:25:11 +0300
commita295d21a42a6ae9c463f7661b32df7de11095835 (patch)
treecc5bfe988912113b4659e60c5f34ff0fa54024e0 /migrations/auth/20230410_02_WZqSf-create-mrna-resources-table.py
parent27d40788e2e2c8fbeb8873e895d77a76bbd49a45 (diff)
downloadgn-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 'migrations/auth/20230410_02_WZqSf-create-mrna-resources-table.py')
0 files changed, 0 insertions, 0 deletions