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

      All Methods Instance Methods Abstract 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

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

        @Executable
        org.reactivestreams.Publisher<io.micronaut.http.HttpResponse> 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
        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.
        Parameters:
        request - The current request
        Returns:
        A response