Class OidcClientInitiatedLogoutSuccessHandler
java.lang.Object
com.codename1.backend.security.OidcClientInitiatedLogoutSuccessHandler
- All Implemented Interfaces:
LogoutSuccessHandler
public final class OidcClientInitiatedLogoutSuccessHandler
extends Object
implements LogoutSuccessHandler
After a local sign-out, sends a user who signed in with OpenID Connect to
the provider's end-session endpoint (OpenID Connect RP-Initiated Logout),
with the ID token as id_token_hint, so the provider's session ends too.
A user who signed in any other way, or whose provider has no such
endpoint, goes where next sends them.
http.oidcLogout(o -> o.clientInitiated("{baseUrl}/"));
-
Constructor Summary
ConstructorsConstructorDescriptionOidcClientInitiatedLogoutSuccessHandler(ClientRegistrationRepository registrations, LogoutSuccessHandler next) -
Method Summary
Modifier and TypeMethodDescriptiononLogoutSuccess(HttpServer.Request request, Authentication authentication) voidsetPostLogoutRedirectUri(String postLogoutRedirectUri) Where the provider sends the user back to, which must be registered with it;{baseUrl}stands for this server's scheme and host.
-
Constructor Details
-
OidcClientInitiatedLogoutSuccessHandler
public OidcClientInitiatedLogoutSuccessHandler(ClientRegistrationRepository registrations, LogoutSuccessHandler next) - Parameters:
next- what answers when the provider is not asked
-
-
Method Details
-
setPostLogoutRedirectUri
Where the provider sends the user back to, which must be registered with it;{baseUrl}stands for this server's scheme and host. Unset, none is sent and the provider shows its own page. -
onLogoutSuccess
public HttpServer.Response onLogoutSuccess(HttpServer.Request request, Authentication authentication) throws Exception - Specified by:
onLogoutSuccessin interfaceLogoutSuccessHandler- Parameters:
authentication- who signed out; null when nobody was signed in- Throws:
Exception
-