Class AuthenticationInfoManager


public final class AuthenticationInfoManager extends Object
The manager holds all information about the connected clients and their provided authentication information. With a given clientId the matching authentication information can be retrieved. If a client was not seen for ttl the matching entry is deleted. If a session was closed by the client side, the information is removed after sessionClosedTTL.
  • Method Details

    • getInstance

      public static AuthenticationInfoManager getInstance()
    • touch

      public void touch(String clientId)
      Renews the lifetime of the matching authentication information.
      clientId - The clientId for the authentication information.
    • getAuthenticationInfo

      public String getAuthenticationInfo(String clientId)
      Retrieves the matching authentication information.
      clientId - The clientId to search the matching authentication information.
      The authentication information or null if no information was found.
    • sessionClosed

      public void sessionClosed(String cliendId)
      Sets the lifetime of the information to now + sessionClosedTTL
      cliendId - The clientId of the client whose session was closed.
    • authenticationInfoUpdated

      public void authenticationInfoUpdated(MessageContext messageContext, String authenticationInfo)
      Updates the information for the given client
      messageContext - The messageContext which contains the clientId
      authenticationInfo - The new authentication information
    • getTtl

      public Duration getTtl()
    • setTtl

      public void setTtl(Duration ttl)
    • getSessionClosedTTL

      public Duration getSessionClosedTTL()
    • setSessionClosedTTL

      public void setSessionClosedTTL(Duration sessionClosedTTL)