Skip to content

Commit

Permalink
fix: Fix BaseUri on localhost trailing slash discrepancy on OAuth met…
Browse files Browse the repository at this point in the history
…adata (#1145)

## Description

This is the same issue as fixed for the `iss` claim in #1047 (trailing
slash behaviour differs when BaseUri is localhost). Root cause not yet
determined, but this functions as a workaround.
  • Loading branch information
elsand authored Sep 17, 2024
1 parent ca74667 commit 09ce878
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ public GetOauthAuthorizationServerQueryHandler(

public async Task<GetOauthAuthorizationServerDto> Handle(GetOauthAuthorizationServerQuery request, CancellationToken cancellationToken)
{
var issuerUrl = _applicationSettings.Dialogporten.BaseUri.AbsoluteUri.TrimEnd('/') + "/api/v1";
return await Task.FromResult(new GetOauthAuthorizationServerDto
{
Issuer = _applicationSettings.Dialogporten.BaseUri + "api/v1",
JwksUri = _applicationSettings.Dialogporten.BaseUri + "api/v1/.well-known/jwks.json"
Issuer = issuerUrl,
JwksUri = $"{issuerUrl}/.well-known/jwks.json"
});
}
}

0 comments on commit 09ce878

Please sign in to comment.