IdentityModel.OidcClient
IdentityModel.OidcClient copied to clipboard
CreateEndSessionUrl extra parameters?
I need to pass the "client_id" to Keycloak logout endpoint for the function to work, however i see no option, to provide extra parameters to the LogoutRequest object!
The RequestUrlExtension does include it though:
public static string CreateEndSessionUrl(this RequestUrl request, string? idTokenHint = null, string? postLogoutRedirectUri = null, string? state = null, Parameters? extra = null) { Parameters parameters = new Parameters(); parameters.AddOptional("id_token_hint", idTokenHint); parameters.AddOptional("post_logout_redirect_uri", postLogoutRedirectUri); parameters.AddOptional("state", state); return request.Create(parameters.Merge(extra)); }
However the function in the AuthorizeClient does not provide a way to pass it:
internal string CreateEndSessionUrl(string endpoint, LogoutRequest request) { _logger.LogTrace("CreateEndSessionUrl"); return new RequestUrl(endpoint).CreateEndSessionUrl(request.IdTokenHint, _options.PostLogoutRedirectUri, request.State); }
Please, help me solve this, thank you!