@EachBean(value=OauthUserDetailsMapper.class) @Requires(condition=OauthClientCondition.class) public class DefaultOauthClient extends java.lang.Object implements OauthClient
OauthClient
.Constructor and Description |
---|
DefaultOauthClient(OauthUserDetailsMapper userDetailsMapper,
OauthClientConfiguration clientConfiguration,
AuthorizationRedirectHandler redirectHandler,
OauthAuthorizationResponseHandler authorizationResponseHandler,
io.micronaut.context.BeanContext beanContext) |
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.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.
|
public DefaultOauthClient(@Parameter OauthUserDetailsMapper userDetailsMapper, @Parameter OauthClientConfiguration clientConfiguration, AuthorizationRedirectHandler redirectHandler, OauthAuthorizationResponseHandler authorizationResponseHandler, io.micronaut.context.BeanContext beanContext)
clientConfiguration
- The client configurationuserDetailsMapper
- The user details mapperredirectHandler
- The redirect URL builderauthorizationResponseHandler
- The authorization response handlerbeanContext
- The bean contextpublic java.lang.String getName()
getName
in interface OauthClient
public 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()