Class AbstractEndSessionRequest
java.lang.Object
io.micronaut.security.oauth2.endpoint.endsession.request.AbstractEndSessionRequest
- All Implemented Interfaces:
EndSessionEndpoint
- Direct Known Subclasses:
Auth0EndSessionEndpoint,AwsCognitoEndSessionEndpoint,KeycloakEndSessionEndpoint,OktaEndSessionEndpoint
A base class to extend from to log out of an OpenID provider.
- Since:
- 1.2.0
- Author:
- James Kleeh
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final OauthClientConfigurationprotected final EndSessionCallbackUrlBuilderprotected final Supplier<OpenIdProviderMetadata> -
Constructor Summary
ConstructorsConstructorDescriptionAbstractEndSessionRequest(EndSessionCallbackUrlBuilder endSessionCallbackUrlBuilder, OauthClientConfiguration clientConfiguration, Supplier<OpenIdProviderMetadata> providerMetadata) -
Method Summary
Modifier and TypeMethodDescriptiongetArguments(io.micronaut.http.HttpRequest<?> originating, Authentication authentication) protected StringgetRedirectUri(io.micronaut.http.HttpRequest<?> originating) protected abstract StringgetUrl()@Nullable StringgetUrl(io.micronaut.http.HttpRequest<?> originating, Authentication authentication)
-
Field Details
-
endSessionCallbackUrlBuilder
-
clientConfiguration
-
providerMetadataSupplier
-
-
Constructor Details
-
AbstractEndSessionRequest
public AbstractEndSessionRequest(EndSessionCallbackUrlBuilder endSessionCallbackUrlBuilder, OauthClientConfiguration clientConfiguration, Supplier<OpenIdProviderMetadata> providerMetadata) - Parameters:
endSessionCallbackUrlBuilder- The end session callback URL builderclientConfiguration- The client configurationproviderMetadata- The provider metadata supplier
-
-
Method Details
-
getUrl
@Nullable public @Nullable String getUrl(io.micronaut.http.HttpRequest<?> originating, Authentication authentication) - Specified by:
getUrlin interfaceEndSessionEndpoint- Parameters:
originating- The Originating HTTP Requestauthentication- The authentication.- Returns:
- The OpenID provider end session URL.
-
getUrl
- Returns:
- The url of the request
-
getArguments
protected abstract Map<String,Object> getArguments(io.micronaut.http.HttpRequest<?> originating, Authentication authentication) - Parameters:
originating- The originating requestauthentication- The authentication- Returns:
- The parameters to include in the URL
-
getRedirectUri
- Parameters:
originating- The originating request- Returns:
- The absolute redirect URI
-