IdentityModel.OidcClient icon indicating copy to clipboard operation
IdentityModel.OidcClient copied to clipboard

CreateEndSessionUrl extra parameters?

Open RsZoli opened this issue 7 months ago • 2 comments

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!

RsZoli avatar Jul 11 '24 11:07 RsZoli