about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2026-06-25 13:45:12 -0500
committerFrederick Muriuki Muriithi2026-06-25 13:47:23 -0500
commit8979ceafa34edc366e5f4895afd6dbe3241d3a94 (patch)
tree92512da1418c5ec423ca1b4f7cb1732f29ff34ce
parent702c6221e39f3137179fb87d31c9870a6997bc4a (diff)
downloadgn-auth-8979ceafa34edc366e5f4895afd6dbe3241d3a94.tar.gz
Generate JWTs for password auth flow too.
While we do not actually use the password-flow for authentication on
the system, it is useful for getting tokens when running (integration)
tests against the system. This commit allows the test harness to make
use of the simpler password-flow authentication to get tokens.
-rw-r--r--gn_auth/auth/authentication/oauth2/server.py1
1 files changed, 1 insertions, 0 deletions
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