diff options
author | Munyoki Kilyungi | 2024-03-12 00:14:52 +0300 |
---|---|---|
committer | Munyoki Kilyungi | 2024-03-13 10:29:33 +0300 |
commit | 6b529aa323b065dee0e387f06e6c0d2264ac542e (patch) | |
tree | 0987fb41681e428fa848223ad4650566949ddc81 /gn_auth/auth/__init__.py | |
parent | 3ac8cc38768bf3aca1ecc75db094bcb97b36cce7 (diff) | |
download | gn-auth-6b529aa323b065dee0e387f06e6c0d2264ac542e.tar.gz |
Define OAuth2Client using frozen dataclass.
* gn_auth/auth/authentication/oauth2/models/oauth2client.py: Import
dataclass, cached_property and ClientMixin. Remove NamedTuple import.
(OAuth2Client): Use frozen dataclass and explicitly inherit from
ClientMixin.
(OAuth2Client.token_endpoint_auth_method): Make this a cached
property.
(OAuth2Client.client_type): Ditto.
(OAuth2Client.id): Ditto.
(OAuth2Client.grant_types): Ditto.
(OAuth2Client.redirect_uris): Ditto.
(OAuth2Client.response_types): Ditto.
(OAuth2Client.scope): Ditto.
(OAuth2Client.get_allowed_scope): Autopep-8 it.
(client): Autopep-8 it and use kw args for OAuthClient.
(client_by_id_and_secret): Ditto.
(oauth2_clients): Ditto.
(save_client): Ditto.
(delete_client): Ditto.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn_auth/auth/__init__.py')
0 files changed, 0 insertions, 0 deletions