Class SimpleServerAuthConfig

java.lang.Object
org.apache.catalina.authenticator.jaspic.SimpleServerAuthConfig
All Implemented Interfaces:
AuthConfig, ServerAuthConfig

public class SimpleServerAuthConfig extends Object implements ServerAuthConfig
Basic implementation primarily intended for use when using third-party ServerAuthModule implementations that only provide the module. This implementation supports configuring the ServerAuthContext with multiple modules.
  • Constructor Details

    • SimpleServerAuthConfig

      public SimpleServerAuthConfig(String layer, String appContext, CallbackHandler handler, Map<String,String> properties)
      Creates a new SimpleServerAuthConfig.
      Parameters:
      layer - Message layer
      appContext - Application context
      handler - Callback handler
      properties - Configuration properties
  • Method Details

    • getMessageLayer

      public String getMessageLayer()
      Specified by:
      getMessageLayer in interface AuthConfig
    • getAppContext

      public String getAppContext()
      Specified by:
      getAppContext in interface AuthConfig
    • getAuthContextID

      public String getAuthContextID(MessageInfo messageInfo)

      Returns the MessageInfo's string representation as the auth context ID.

      Specified by:
      getAuthContextID in interface AuthConfig
    • refresh

      public void refresh()

      Clears the cached ServerAuthConfig so it will be recreated on next use.

      Specified by:
      refresh in interface AuthConfig
    • isProtected

      public boolean isProtected()

      This implementation always returns false.

      Specified by:
      isProtected in interface AuthConfig
    • getAuthContext

      public ServerAuthContext getAuthContext(String authContextID, Subject serviceSubject, Map properties) throws AuthException

      Loads ServerAuthModule instances from properties keyed with org.apache.catalina.authenticator.jaspic.ServerAuthModule.N where N is 1-based index. The returned context is cached and reused for subsequent calls.

      Specified by:
      getAuthContext in interface ServerAuthConfig
      Throws:
      AuthException
    • createServerAuthContext

      protected ServerAuthContext createServerAuthContext(List<ServerAuthModule> modules)
      Creates the ServerAuthContext. Can be overridden by subclasses to provide a custom implementation.
      Parameters:
      modules - List of ServerAuthModule instances
      Returns:
      The ServerAuthContext instance