Skip to content

OidcClientInitiatedLogoutSuccessHandler should understand redirect uri placeholders #7900

@jzheaux

Description

@jzheaux

OAuth 2.0 Login supports placeholders like baseUrl and registrationId.

OAuth 2.0 Logout should support these as well.

The design of ClientRegistrationRepository is intended to support multi-tenancy. In cases where each tenant has different branding, for example, it's reasonable that an application would want to ensure the redirect has the necessary information to render an appropriate post-logout experience.

A simple example is when doing multi-tenancy by path, e.g. https://foo.com/bar where bar is a reference to the tenant. For the post logout redirect uri, it's reasonable to want to do:

OidcClientInitiatedLogoutSuccessHandler handler =
    new OidcClientInitiatedLogoutSuccessHandler();
handler.setPostLogoutRedirectUri("{baseUrl}/{registrationId}");

so that the post logout redirect uri is resolved to https://foo.com/bar without requiring a custom implementation.

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions