Class DefaultOauthClient
java.lang.Object
io.micronaut.security.oauth2.client.DefaultOauthClient
- All Implemented Interfaces:
 OauthClient
@EachBean(OauthAuthenticationMapper.class)
@Requires(condition=OauthClientCondition.class)
public class DefaultOauthClient
extends Object
implements OauthClient
The default implementation of 
OauthClient.- Since:
 - 1.2.0
 - Author:
 - James Kleeh
 
- 
Constructor Summary
ConstructorsConstructorDescriptionDefaultOauthClient(OauthAuthenticationMapper authenticationMapper, OauthClientConfiguration clientConfiguration, AuthorizationRedirectHandler redirectHandler, OauthAuthorizationResponseHandler authorizationResponseHandler, io.micronaut.context.BeanContext beanContext)  - 
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>>authorizationRedirect(io.micronaut.http.HttpRequest<?> originating) Responsible for redirecting to the authorization endpoint.getName()protected booleanisErrorCallback(io.micronaut.core.convert.value.ConvertibleMultiValues<String> responseData) org.reactivestreams.Publisher<AuthenticationResponse>onCallback(io.micronaut.http.HttpRequest<Map<String, Object>> request) Responsible for receiving the authorization callback request and returning an authentication response. 
- 
Constructor Details
- 
DefaultOauthClient
public DefaultOauthClient(@Parameter OauthAuthenticationMapper authenticationMapper, @Parameter OauthClientConfiguration clientConfiguration, AuthorizationRedirectHandler redirectHandler, OauthAuthorizationResponseHandler authorizationResponseHandler, io.micronaut.context.BeanContext beanContext) - Parameters:
 clientConfiguration- The client configurationauthenticationMapper- The user details mapperredirectHandler- The redirect URL builderauthorizationResponseHandler- The authorization response handlerbeanContext- The bean context
 
 - 
 - 
Method Details
- 
getName
- Specified by:
 getNamein interfaceOauthClient- Returns:
 - The provider name
 
 - 
authorizationRedirect
public org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> authorizationRedirect(io.micronaut.http.HttpRequest<?> originating) Description copied from interface:OauthClientResponsible for redirecting to the authorization endpoint.- Specified by:
 authorizationRedirectin interfaceOauthClient- Parameters:
 originating- The originating request- Returns:
 - A response publisher
 
 - 
onCallback
public org.reactivestreams.Publisher<AuthenticationResponse> onCallback(io.micronaut.http.HttpRequest<Map<String, Object>> request) Description copied from interface:OauthClientResponsible for receiving the authorization callback request and returning an authentication response.- Specified by:
 onCallbackin interfaceOauthClient- Parameters:
 request- The callback request- Returns:
 - The authentication response
 
 - 
isErrorCallback
protected boolean isErrorCallback(io.micronaut.core.convert.value.ConvertibleMultiValues<String> responseData) - Parameters:
 responseData- The response data- Returns:
 - True if the response indicates an error occurred.
 
 
 -