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 Type
    Method
    Description
    org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>>
    callback(io.micronaut.http.HttpRequest<Map<String,Object>> request)
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getClient

      public OauthClient getClient()
      Specified by:
      getClient in interface OauthController
      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 interface OauthController
      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 interface OauthController
      Parameters:
      request - The current request
      Returns:
      A response