File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 3
3
"""
4
4
import logging
5
5
from datetime import datetime
6
+ from urllib .parse import urlparse
6
7
7
8
from idpyoidc .client .oauth2 .stand_alone_client import StandAloneClient
8
9
from idpyoidc .server .user_authn .authn_context import UNSPECIFIED
12
13
from satosa .internal import AuthenticationInformation
13
14
from satosa .internal import InternalData
14
15
from ..exception import SATOSAAuthenticationError
16
+ from ..exception import SATOSAError
15
17
from ..response import Redirect
16
18
17
19
logger = logging .getLogger (__name__ )
@@ -67,7 +69,13 @@ def register_endpoints(self):
67
69
:rtype: Sequence[(str, Callable[[satosa.context.Context], satosa.response.Response]]
68
70
:return: A list that can be used to map the request to SATOSA to this endpoint.
69
71
"""
70
- return self .client .context .claims .get_usage ('redirect_uris' )
72
+ url_map = []
73
+ redirect_path = self .client .context .claims .get_usage ('redirect_uris' )
74
+ if not redirect_path :
75
+ raise SATOSAError ("Missing path in redirect uri" )
76
+ redirect_path = urlparse (redirect_path [0 ]).path
77
+ url_map .append (("^%s$" % redirect_path .lstrip ("/" ), self .response_endpoint ))
78
+ return url_map
71
79
72
80
def response_endpoint (self , context , * args ):
73
81
"""
You can’t perform that action at this time.
0 commit comments