Class DefaultOauthController
java.lang.Object
io.micronaut.security.oauth2.routes.DefaultOauthController
- All Implemented Interfaces:
OauthController
@Requires(beans={RedirectingLoginHandler.class,io.micronaut.http.server.util.HttpHostResolver.class,io.micronaut.http.server.util.locale.HttpLocaleResolver.class})
@EachBean(OauthClient.class)
public class DefaultOauthController
extends Object
implements OauthController
Default implementation of
OauthController
.- Since:
- 1.2.0
- Author:
- James Kleeh
-
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>>
Receives the authorization callback from the OAuth 2.0 provider and responds to the user.org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>>
login
(io.micronaut.http.HttpRequest<?> request) Performs an authorization redirect to an OAuth 2.0 provider.
-
Method Details
-
getClient
- Specified by:
getClient
in interfaceOauthController
- Returns:
- The client associated with this controller
-
login
public org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> 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.MutableHttpResponse<?>> callback(io.micronaut.http.HttpRequest<Map<String, 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
-