Class DefaultOauthClient

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> authorizationRedirect​(io.micronaut.http.HttpRequest<?> originating)
      Responsible for redirecting to the authorization endpoint.
      java.lang.String getName()  
      protected boolean isErrorCallback​(io.micronaut.core.convert.value.ConvertibleMultiValues<java.lang.String> responseData)  
      org.reactivestreams.Publisher<io.micronaut.security.authentication.AuthenticationResponse> onCallback​(io.micronaut.http.HttpRequest<java.util.Map<java.lang.String,​java.lang.Object>> request)
      Responsible for receiving the authorization callback request and returning an authentication response.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultOauthClient

        public DefaultOauthClient​(@Parameter
                                  OauthAuthenticationMapper authenticationMapper,
                                  @Parameter
                                  OauthClientConfiguration clientConfiguration,
                                  AuthorizationRedirectHandler redirectHandler,
                                  OauthAuthorizationResponseHandler authorizationResponseHandler,
                                  io.micronaut.context.BeanContext beanContext)
        Parameters:
        clientConfiguration - The client configuration
        authenticationMapper - The user details mapper
        redirectHandler - The redirect URL builder
        authorizationResponseHandler - The authorization response handler
        beanContext - The bean context
    • Method Detail

      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface OauthClient
        Returns:
        The provider name
      • authorizationRedirect

        public org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> authorizationRedirect​(io.micronaut.http.HttpRequest<?> originating)
        Description copied from interface: OauthClient
        Responsible for redirecting to the authorization endpoint.
        Specified by:
        authorizationRedirect in interface OauthClient
        Parameters:
        originating - The originating request
        Returns:
        A response publisher
      • onCallback

        public org.reactivestreams.Publisher<io.micronaut.security.authentication.AuthenticationResponse> onCallback​(io.micronaut.http.HttpRequest<java.util.Map<java.lang.String,​java.lang.Object>> request)
        Description copied from interface: OauthClient
        Responsible for receiving the authorization callback request and returning an authentication response.
        Specified by:
        onCallback in interface OauthClient
        Parameters:
        request - The callback request
        Returns:
        The authentication response
      • isErrorCallback

        protected boolean isErrorCallback​(io.micronaut.core.convert.value.ConvertibleMultiValues<java.lang.String> responseData)
        Parameters:
        responseData - The response data
        Returns:
        True if the response indicates an error occurred.