Interface Authenticator

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable

    public interface Authenticator
    extends java.io.Closeable
    Authentication mechanism.
    Author:
    Sebastian Ɓaskawiec
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletionStage<org.infinispan.rest.framework.RestResponse> challenge​(org.infinispan.rest.framework.RestRequest request, io.netty.channel.ChannelHandlerContext ctx)
      Challenges specific RestRequest for authentication.
      default void close()  
      default void init​(RestServer restServer)
      Invoked by the RestServer on startup.
      default boolean isReadyForHttpChallenge()
      Returns whether the realm backing this authenticator is ready to authenticate users
    • Method Detail

      • challenge

        java.util.concurrent.CompletionStage<org.infinispan.rest.framework.RestResponse> challenge​(org.infinispan.rest.framework.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 java.io.IOException
        Throws:
        java.io.IOException