Interface OauthClient
- 
- All Known Subinterfaces:
- OpenIdClient
 - All Known Implementing Classes:
- DefaultOauthClient,- DefaultOpenIdClient
 
 public interface OauthClientA contract for an OAuth 2.0 client. This interface is the base class necessary for implementing OAuth 2.0 authorization code grant behavior. Given how generic the contract is, any pattern that relies on a redirect and a callback can be implemented with the contract. It could be used for implementing authentication with non standard or non supported standard providers, including OAuth 1.0. Those types of usages are not supported by this API and future major revisions may break their functionality. The client implementations are called through theOauthController. A controller is created for each client bean and routes for the controller are registered in a route builder.- Since:
- 1.2.0
- Author:
- James Kleeh
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description org.reactivestreams.Publisher<io.micronaut.http.HttpResponse>authorizationRedirect(io.micronaut.http.HttpRequest originating)Responsible for redirecting to the authorization endpoint.java.lang.StringgetName()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.
 
- 
- 
- 
Method Detail- 
getNamejava.lang.String getName() - Returns:
- The provider name
 
 - 
authorizationRedirectorg.reactivestreams.Publisher<io.micronaut.http.HttpResponse> authorizationRedirect(io.micronaut.http.HttpRequest originating) Responsible for redirecting to the authorization endpoint.- Parameters:
- originating- The originating request
- Returns:
- A response publisher
 
 - 
onCallbackorg.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.- Parameters:
- request- The callback request
- Returns:
- The authentication response
 
 
- 
 
-