Interface OauthController

All Known Implementing Classes:
DefaultOauthController

@Secured("isAnonymous()") public interface OauthController
Responsible for OAuth 2.0 authorization redirect, authorization callback, and end session redirects. Each controller is associated with a single OauthClient.
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.
  • Method Details

    • getClient

      OauthClient getClient()
      Returns:
      The client associated with this controller
    • login

      @Executable @SingleResult org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> login(io.micronaut.http.HttpRequest<?> request)
      Performs an authorization redirect to an OAuth 2.0 provider.
      Parameters:
      request - The current request
      Returns:
      A redirecting http response
    • callback

      @Executable @SingleResult 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.
      Parameters:
      request - The current request
      Returns:
      A response