public class DefaultOpenIdClient extends java.lang.Object implements OpenIdClient
OpenIdClient
.Constructor and Description |
---|
DefaultOpenIdClient(OauthClientConfiguration clientConfiguration,
java.util.function.Supplier<OpenIdProviderMetadata> openIdProviderMetadata,
OpenIdUserDetailsMapper userDetailsMapper,
AuthorizationRedirectHandler redirectUrlBuilder,
OpenIdAuthorizationResponseHandler authorizationResponseHandler,
io.micronaut.context.BeanContext beanContext,
EndSessionEndpoint endSessionEndpoint) |
Modifier and Type | Method and Description |
---|---|
org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> |
authorizationRedirect(io.micronaut.http.HttpRequest<?> originating)
Responsible for redirecting to the authorization endpoint.
|
java.util.Optional<io.micronaut.http.MutableHttpResponse<?>> |
endSessionRedirect(io.micronaut.http.HttpRequest<?> request,
Authentication authentication)
Redirects to the end session endpoint of an OpenID
provider.
|
java.lang.String |
getName() |
protected SecureEndpoint |
getTokenEndpoint() |
protected boolean |
isErrorCallback(io.micronaut.core.convert.value.ConvertibleMultiValues<java.lang.String> responseData) |
org.reactivestreams.Publisher<AuthenticationResponse> |
onCallback(io.micronaut.http.HttpRequest<java.util.Map<java.lang.String,java.lang.Object>> request)
Responsible for receiving the authorization callback request and returning
an authentication response.
|
boolean |
supportsEndSession() |
public DefaultOpenIdClient(OauthClientConfiguration clientConfiguration, java.util.function.Supplier<OpenIdProviderMetadata> openIdProviderMetadata, @Nullable OpenIdUserDetailsMapper userDetailsMapper, AuthorizationRedirectHandler redirectUrlBuilder, OpenIdAuthorizationResponseHandler authorizationResponseHandler, io.micronaut.context.BeanContext beanContext, @Nullable EndSessionEndpoint endSessionEndpoint)
clientConfiguration
- The client configurationopenIdProviderMetadata
- The provider metadatauserDetailsMapper
- The user details mapperredirectUrlBuilder
- The redirect URL builderauthorizationResponseHandler
- The authorization response handlerbeanContext
- The bean contextendSessionEndpoint
- The end session requestpublic java.lang.String getName()
getName
in interface OauthClient
public boolean supportsEndSession()
supportsEndSession
in interface OpenIdClient
public java.util.Optional<io.micronaut.http.MutableHttpResponse<?>> endSessionRedirect(io.micronaut.http.HttpRequest<?> request, Authentication authentication)
OpenIdClient
EndSessionEndpoint
could not be resolved for the provider.endSessionRedirect
in interface OpenIdClient
request
- The current requestauthentication
- The current authenticationpublic org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> authorizationRedirect(io.micronaut.http.HttpRequest<?> originating)
OauthClient
authorizationRedirect
in interface OauthClient
originating
- The originating requestpublic org.reactivestreams.Publisher<AuthenticationResponse> onCallback(io.micronaut.http.HttpRequest<java.util.Map<java.lang.String,java.lang.Object>> request)
OauthClient
onCallback
in interface OauthClient
request
- The callback requestprotected boolean isErrorCallback(io.micronaut.core.convert.value.ConvertibleMultiValues<java.lang.String> responseData)
responseData
- The response dataprotected SecureEndpoint getTokenEndpoint()