From db1a71bf79a9beb74f577d12c3df7e3696bf12dd Mon Sep 17 00:00:00 2001 From: Stanislav Dimov Date: Fri, 3 Nov 2023 22:38:14 +0000 Subject: [PATCH] Fix urls --- authentik/providers/oauth2/tests/test_api.py | 4 ++-- authentik/providers/oauth2/urls.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/authentik/providers/oauth2/tests/test_api.py b/authentik/providers/oauth2/tests/test_api.py index 5aecb3a0e..002df774d 100644 --- a/authentik/providers/oauth2/tests/test_api.py +++ b/authentik/providers/oauth2/tests/test_api.py @@ -34,7 +34,7 @@ class TestAPI(APITestCase): ) self.assertEqual(response.status_code, 200) body = loads(response.content.decode())["preview"] - self.assertEqual(body["iss"], "http://testserver/application/o/test/") + self.assertEqual(body["iss"], "http://testserver/application/o/issuer/test/") def test_setup_urls(self): """Test Setup URLs API Endpoint""" @@ -43,7 +43,7 @@ class TestAPI(APITestCase): ) self.assertEqual(response.status_code, 200) body = loads(response.content.decode()) - self.assertEqual(body["issuer"], "http://testserver/application/o/test/") + self.assertEqual(body["issuer"], "http://testserver/application/o/issuer/test/") # https://github.com/goauthentik/authentik/pull/5918 @skipUnless(version_info >= (3, 11, 4), "This behaviour is only Python 3.11.4 and up") diff --git a/authentik/providers/oauth2/urls.py b/authentik/providers/oauth2/urls.py index f310fa1bc..1e153fd7f 100644 --- a/authentik/providers/oauth2/urls.py +++ b/authentik/providers/oauth2/urls.py @@ -42,18 +42,18 @@ urlpatterns = [ name="token-revoke", ), path( - "/end-session/", + "end-session//", RedirectView.as_view(pattern_name="authentik_core:if-session-end", query_string=True), name="end-session", ), - path("/jwks/", JWKSView.as_view(), name="jwks"), + path("jwks//", JWKSView.as_view(), name="jwks"), path( - "/", + "issuer//", RedirectView.as_view(pattern_name="authentik_providers_oauth2:provider-info"), name="provider-root", ), path( - "/.well-known/openid-configuration", + "discovery//.well-known/openid-configuration", ProviderInfoView.as_view(), name="provider-info", ),