about summary refs log tree commit diff
path: root/gn_auth/auth/authentication/oauth2
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth/auth/authentication/oauth2')
-rw-r--r--gn_auth/auth/authentication/oauth2/models/oauth2client.py2
-rw-r--r--gn_auth/auth/authentication/oauth2/server.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/gn_auth/auth/authentication/oauth2/models/oauth2client.py b/gn_auth/auth/authentication/oauth2/models/oauth2client.py
index dfe5d79..b3ec91f 100644
--- a/gn_auth/auth/authentication/oauth2/models/oauth2client.py
+++ b/gn_auth/auth/authentication/oauth2/models/oauth2client.py
@@ -298,6 +298,8 @@ def delete_client(
         cursor.execute("DELETE FROM authorisation_code WHERE client_id=?",
                        params)
         cursor.execute("DELETE FROM oauth2_tokens WHERE client_id=?", params)
+        cursor.execute("DELETE FROM jwt_refresh_tokens WHERE client_id=?",
+                       params)
         cursor.execute("DELETE FROM oauth2_clients WHERE client_id=?", params)
         return the_client
 
diff --git a/gn_auth/auth/authentication/oauth2/server.py b/gn_auth/auth/authentication/oauth2/server.py
index 8ac5106..fd45b63 100644
--- a/gn_auth/auth/authentication/oauth2/server.py
+++ b/gn_auth/auth/authentication/oauth2/server.py
@@ -129,6 +129,7 @@ def setup_oauth2_server(app: Flask) -> None:
     server.register_token_generator(
         "urn:ietf:params:oauth:grant-type:jwt-bearer", jwttokengenerator)
     server.register_token_generator("refresh_token", jwttokengenerator)
+    server.register_token_generator("password", jwttokengenerator)
     server.register_grant(RefreshTokenGrant)
 
     # register endpoints