aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/auth/authorisation
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-05-02 04:56:04 +0300
committerFrederick Muriuki Muriithi2024-05-02 05:40:56 +0300
commit24bc0df2ae77867f80850ea52ff20736271f4b89 (patch)
tree8db41b281db946c8390a698988f98b2af35c265d /gn_auth/auth/authorisation
parent8e79d0f7b8faba92bebb27c345563ebc1bd6e945 (diff)
downloadgn-auth-24bc0df2ae77867f80850ea52ff20736271f4b89.tar.gz
Use user-provided values rather than hard-coded values.
Diffstat (limited to 'gn_auth/auth/authorisation')
-rw-r--r--gn_auth/auth/authorisation/users/admin/views.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gn_auth/auth/authorisation/users/admin/views.py b/gn_auth/auth/authorisation/users/admin/views.py
index dc7b8c6..f343da1 100644
--- a/gn_auth/auth/authorisation/users/admin/views.py
+++ b/gn_auth/auth/authorisation/users/admin/views.py
@@ -201,11 +201,11 @@ def register_client():
client_id_issued_at = datetime.now(tz=timezone.utc),
client_secret_expires_at = datetime.fromtimestamp(0),
client_metadata = {
- "client_name": "GN2 Dev Server",
+ "client_name": form["client_name"],
"token_endpoint_auth_method": [
"client_secret_post", "client_secret_basic"],
"client_type": "confidential",
- "grant_types": ["password", "authorization_code", "refresh_token"],
+ "grant_types": grant_types,
"default_redirect_uri": default_redirect_uri,
"redirect_uris": [default_redirect_uri] + form.get("other_redirect_uri", "").split(),
"response_type": __response_types__(tuple(grant_types)),
@@ -220,6 +220,7 @@ def register_client():
client=client,
client_secret = raw_client_secret)
+
def __parse_client__(sqlite3_row) -> dict:
"""Parse the client details into python datatypes."""
return {