From 8979ceafa34edc366e5f4895afd6dbe3241d3a94 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 25 Jun 2026 13:45:12 -0500 Subject: 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. --- gn_auth/auth/authentication/oauth2/server.py | 1 + 1 file changed, 1 insertion(+) (limited to 'gn_auth/auth/authentication/oauth2/server.py') 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 -- cgit 1.4.1