Skip to content

Commit 8cbd697

Browse files
shaardiec00kiemon5ter
authored andcommitted
Add configurable subject_identifier_uri to clients
According to the [OIDC Documentation](https://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg), the client must configure a `subject_identifier_uri`, if multiple `redirect_uri` are configured. This patch adds the possibility to do this as described in #49. Signed-off-by: Sven Haardiek <sven@haardiek.de>
1 parent c7b9ff6 commit 8cbd697

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pyop/provider.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ def _create_subject_identifier(self, user_id, client_id, redirect_uri):
240240
"""
241241
supported_subject_types = self.configuration_information['subject_types_supported'][0]
242242
subject_type = self.clients[client_id].get('subject_type', supported_subject_types)
243-
sector_identifier = urlparse(redirect_uri).netloc
243+
sector_identifier_uri = self.clients[client_id].get('sector_identifier_uri', redirect_uri)
244+
sector_identifier = urlparse(sector_identifier_uri).netloc
244245
return self.authz_state.get_subject_identifier(subject_type, user_id, sector_identifier)
245246

246247
def _get_requested_claims_in(self, authentication_request, response_method):

0 commit comments

Comments
 (0)