Class AbstractEndSessionRequest
- java.lang.Object
-
- io.micronaut.security.oauth2.endpoint.endsession.request.AbstractEndSessionRequest
-
- All Implemented Interfaces:
EndSessionEndpoint
- Direct Known Subclasses:
Auth0EndSessionEndpoint
,AwsCognitoEndSessionEndpoint
,OktaEndSessionEndpoint
public abstract class AbstractEndSessionRequest extends java.lang.Object implements EndSessionEndpoint
A base class to extend from to log out of an OpenID provider.- Since:
- 1.2.0
- Author:
- James Kleeh
-
-
Field Summary
Fields Modifier and Type Field Description protected OauthClientConfiguration
clientConfiguration
protected EndSessionCallbackUrlBuilder
endSessionCallbackUrlBuilder
protected OpenIdProviderMetadata
providerMetadata
-
Constructor Summary
Constructors Constructor Description AbstractEndSessionRequest(EndSessionCallbackUrlBuilder endSessionCallbackUrlBuilder, OauthClientConfiguration clientConfiguration, OpenIdProviderMetadata providerMetadata)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.util.Map<java.lang.String,java.lang.Object>
getArguments(io.micronaut.http.HttpRequest originating, Authentication authentication)
protected java.lang.String
getRedirectUri(io.micronaut.http.HttpRequest originating)
protected abstract java.lang.String
getUrl()
java.lang.String
getUrl(io.micronaut.http.HttpRequest originating, Authentication authentication)
-
-
-
Field Detail
-
endSessionCallbackUrlBuilder
protected final EndSessionCallbackUrlBuilder endSessionCallbackUrlBuilder
-
clientConfiguration
protected final OauthClientConfiguration clientConfiguration
-
providerMetadata
protected final OpenIdProviderMetadata providerMetadata
-
-
Constructor Detail
-
AbstractEndSessionRequest
public AbstractEndSessionRequest(EndSessionCallbackUrlBuilder endSessionCallbackUrlBuilder, OauthClientConfiguration clientConfiguration, OpenIdProviderMetadata providerMetadata)
- Parameters:
endSessionCallbackUrlBuilder
- The end session callback URL builderclientConfiguration
- The client configurationproviderMetadata
- The provider metadata
-
-
Method Detail
-
getUrl
@Nullable public java.lang.String getUrl(io.micronaut.http.HttpRequest originating, Authentication authentication)
- Specified by:
getUrl
in interfaceEndSessionEndpoint
- Parameters:
originating
- The Originating HTTP Requestauthentication
- The authentication.- Returns:
- The OpenID provider end session URL.
-
getUrl
protected abstract java.lang.String getUrl()
- Returns:
- The url of the request
-
getArguments
protected abstract java.util.Map<java.lang.String,java.lang.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
protected java.lang.String getRedirectUri(io.micronaut.http.HttpRequest originating)
- Parameters:
originating
- The originating request- Returns:
- The absolute redirect URI
-
-