mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-15 15:48:53 -05:00
Put OIDC callback URI under /_synapse/client. (#9288)
This commit is contained in:
parent
d1f13c7485
commit
846b9d3df0
11 changed files with 46 additions and 28 deletions
|
|
@ -40,7 +40,7 @@ ISSUER = "https://issuer/"
|
|||
CLIENT_ID = "test-client-id"
|
||||
CLIENT_SECRET = "test-client-secret"
|
||||
BASE_URL = "https://synapse/"
|
||||
CALLBACK_URL = BASE_URL + "_synapse/oidc/callback"
|
||||
CALLBACK_URL = BASE_URL + "_synapse/client/oidc/callback"
|
||||
SCOPES = ["openid"]
|
||||
|
||||
AUTHORIZATION_ENDPOINT = ISSUER + "authorize"
|
||||
|
|
@ -58,12 +58,6 @@ COMMON_CONFIG = {
|
|||
}
|
||||
|
||||
|
||||
# The cookie name and path don't really matter, just that it has to be coherent
|
||||
# between the callback & redirect handlers.
|
||||
COOKIE_NAME = b"oidc_session"
|
||||
COOKIE_PATH = "/_synapse/oidc"
|
||||
|
||||
|
||||
class TestMappingProvider:
|
||||
@staticmethod
|
||||
def parse_config(config):
|
||||
|
|
@ -340,8 +334,11 @@ class OidcHandlerTestCase(HomeserverTestCase):
|
|||
# For some reason, call.args does not work with python3.5
|
||||
args = calls[0][0]
|
||||
kwargs = calls[0][1]
|
||||
self.assertEqual(args[0], COOKIE_NAME)
|
||||
self.assertEqual(kwargs["path"], COOKIE_PATH)
|
||||
|
||||
# The cookie name and path don't really matter, just that it has to be coherent
|
||||
# between the callback & redirect handlers.
|
||||
self.assertEqual(args[0], b"oidc_session")
|
||||
self.assertEqual(kwargs["path"], "/_synapse/client/oidc")
|
||||
cookie = args[1]
|
||||
|
||||
macaroon = pymacaroons.Macaroon.deserialize(cookie)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue