Interface Authenticator

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
BasicAuthenticator, ClientCertAuthenticator

public interface Authenticator extends Closeable
Authentication mechanism.
Author:
Sebastian Ɓaskawiec
  • Method Details

    • challenge

      CompletionStage<RestResponse> challenge(RestRequest request, io.netty.channel.ChannelHandlerContext ctx)
      Challenges specific RestRequest for authentication.
      Parameters:
      request - Request to be challenged.
      Returns:
      a RestResponse wrapped in a CompletionStage
    • init

      default void init(RestServer restServer)
      Invoked by the RestServer on startup. Can perform additional configuration
      Parameters:
      restServer -
    • isReadyForHttpChallenge

      default boolean isReadyForHttpChallenge()
      Returns whether the realm backing this authenticator is ready to authenticate users
      Returns:
      a boolean indicating whether the real is empty (i.e. has no users)
    • close

      default void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException