OidcClientInitiatedLogoutSuccessHandler should allow to set Logout Endpoint via other mechanisms that OP's Discovery #10059
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
status: declined
A suggestion or change that we don't feel we should currently apply
type: enhancement
A general enhancement
Expected Behavior
It should be possible to set end_session_endpoint used by OidcClientInitiatedLogoutSuccessHandler via other mechanisms than by configuring the ClientRegistration with the issuer-uri.
Current Behavior
OidcClientInitiatedLogoutSuccessHandler determine end_session_endpoint using ClientRegistration.providerDetails.configurationMetadata obtained during Discovery from URI pointed by ClientRegistration.issuer-uri
Context
According to RP-Initiated Logout documentation, the OP's Logout Endpoint "is normally obtained via the end_session_endpoint element of the OP's Discovery response or may be learned via other mechanisms"
In case of an Oidc Provider which do not expose Discovery endpoint, but support RP-Initiated Logout, it is not possible to use OidcClientInitiatedLogoutSuccessHandler as is.
I did not find better workaround than copy/paste the code of OidcClientInitiatedLogoutSuccessHandler and rewrite endSessionEndpoint method as it is proposed in this stackoverflow response.
If there is no better workaround, it would be interresting to avoid copy/paste OidcClientInitiatedLogoutSuccessHandler. Either by exposing a public setter to configure end_session_endpoint or by creating a new ClientRegistration.endSessionEndpoint attribute and use it in endSessionEndpoint method. Another option would be to make OidcClientInitiatedLogoutSuccessHandler non final.
Maybe a setter with the possibility to add some custom attributes in ClientRegistration as proposed in #9669 would be sufficient.
The text was updated successfully, but these errors were encountered: