Class DefaultOauthController
- java.lang.Object
-
- io.micronaut.security.oauth2.routes.DefaultOauthController
-
- All Implemented Interfaces:
OauthController
@EachBean(OauthClient.class) public class DefaultOauthController extends java.lang.Object implements OauthController
Default implementation ofOauthController
.- Since:
- 1.2.0
- Author:
- James Kleeh
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.reactivestreams.Publisher<io.micronaut.http.HttpResponse>
callback(io.micronaut.http.HttpRequest<java.util.Map<java.lang.String,java.lang.Object>> request)
Receives the authorization callback from the OAuth 2.0 provider and responds to the user.OauthClient
getClient()
org.reactivestreams.Publisher<io.micronaut.http.HttpResponse>
login(io.micronaut.http.HttpRequest request)
Performs an authorization redirect to an OAuth 2.0 provider.
-
-
-
Method Detail
-
getClient
public OauthClient getClient()
- Specified by:
getClient
in interfaceOauthController
- Returns:
- The client associated with this controller
-
login
public org.reactivestreams.Publisher<io.micronaut.http.HttpResponse> login(io.micronaut.http.HttpRequest request)
Description copied from interface:OauthController
Performs an authorization redirect to an OAuth 2.0 provider.- Specified by:
login
in interfaceOauthController
- Parameters:
request
- The current request- Returns:
- A redirecting http response
-
callback
public org.reactivestreams.Publisher<io.micronaut.http.HttpResponse> callback(io.micronaut.http.HttpRequest<java.util.Map<java.lang.String,java.lang.Object>> request)
Description copied from interface:OauthController
Receives the authorization callback from the OAuth 2.0 provider and responds to the user.- Specified by:
callback
in interfaceOauthController
- Parameters:
request
- The current request- Returns:
- A response
-
-