Interface ReactiveAuthenticationProvider<T,I,S>

Type Parameters:
T - Request Context Type
I - Authentication Request Identity Type
S - Authentication Request Secret Type
All Superinterfaces:
io.micronaut.core.order.Ordered
All Known Subinterfaces:
HttpRequestReactiveAuthenticationProvider<B>
All Known Implementing Classes:
MockAuthenticationProvider, ReactiveAuthenticationProviderAdapter

@Indexed(ReactiveAuthenticationProvider.class) public interface ReactiveAuthenticationProvider<T,I,S> extends io.micronaut.core.order.Ordered
Defines a reactive authentication provider.
Since:
4.5.0
  • Field Summary

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Method Summary

    Modifier and Type
    Method
    Description
    default @NonNull org.reactivestreams.Publisher<AuthenticationResponse>
    authenticate(@NonNull AuthenticationRequest<I,S> authenticationRequest)
    Authenticates a user with the given request.
    @NonNull org.reactivestreams.Publisher<AuthenticationResponse>
    authenticate(T requestContext, @NonNull AuthenticationRequest<I,S> authenticationRequest)
    Authenticates a user with the given request.

    Methods inherited from interface io.micronaut.core.order.Ordered

    getOrder
  • Method Details

    • authenticate

      @NonNull @SingleResult @NonNull org.reactivestreams.Publisher<AuthenticationResponse> authenticate(@Nullable T requestContext, @NonNull @NonNull AuthenticationRequest<I,S> authenticationRequest)
      Authenticates a user with the given request. If a successful authentication is returned, the object must be an instance of Authentication. Publishers MUST emit cold observables! This method will be called for all authenticators for each authentication request and it is assumed no work will be done until the publisher is subscribed to.
      Parameters:
      requestContext - rquest context (it may be an HTTP request).
      authenticationRequest - The credentials to authenticate
      Returns:
      A publisher that emits 0 or 1 responses
    • authenticate

      @NonNull @SingleResult default @NonNull org.reactivestreams.Publisher<AuthenticationResponse> authenticate(@NonNull @NonNull AuthenticationRequest<I,S> authenticationRequest)
      Authenticates a user with the given request. If a successful authentication is returned, the object must be an instance of Authentication. Publishers MUST emit cold observables! This method will be called for all authenticators for each authentication request and it is assumed no work will be done until the publisher is subscribed to.
      Parameters:
      authenticationRequest - The credentials to authenticate
      Returns:
      A publisher that emits 0 or 1 responses