Skip to content

Commit

Permalink
Merge pull request #282 from mattebit/fix-oidc-conf
Browse files Browse the repository at this point in the history
fix: openid-configuration endpoint not reachable
  • Loading branch information
Giuseppe De Marco authored Oct 25, 2023
2 parents 2337f7d + bafbd41 commit d7e0a85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spid_cie_oidc/entity/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def openid_jwks(request, metadata_type:str, resource_type:str):
resource_tytpe = set(jwks_uri, jwks.jose)
"""
_sub = request.build_absolute_uri().rsplit(resource_type)[0]
_lookup = _sub.replace(f"{metadata_type}/", "")
_lookup = _sub.replace(f"/{metadata_type}/", "")
conf = FederationEntityConfiguration.objects.filter(
# TODO: check for reverse proxy and forwarders ...
sub=_lookup,
Expand Down
2 changes: 1 addition & 1 deletion spid_cie_oidc/provider/views/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def openid_configuration(request):
OIDC Discovery configuration at
.well-known/openid-configuration
"""
_sub = request.build_absolute_uri().split(".well-known/openid-configuration")[0]
_sub = request.build_absolute_uri().split("/.well-known/openid-configuration")[0]
conf = FederationEntityConfiguration.objects.filter(
# TODO: check for reverse proxy and forwarders ...
sub=_sub,
Expand Down

0 comments on commit d7e0a85

Please sign in to comment.