Class BaseAuthModule

java.lang.Object
org.eclipse.jetty.security.jaspi.modules.BaseAuthModule
All Implemented Interfaces:
javax.security.auth.message.config.ServerAuthContext, javax.security.auth.message.module.ServerAuthModule, javax.security.auth.message.ServerAuth
Direct Known Subclasses:
BasicAuthenticationAuthModule

public abstract class BaseAuthModule extends Object implements javax.security.auth.message.module.ServerAuthModule, javax.security.auth.message.config.ServerAuthContext
Simple abstract module implementing a Javax Authentication ServerAuthModule and ServerAuthContext. To be used as a building block for building more sophisticated auth modules.
  • Field Details

  • Constructor Details

    • BaseAuthModule

      public BaseAuthModule()
    • BaseAuthModule

      public BaseAuthModule(CallbackHandler callbackHandler)
  • Method Details

    • getSupportedMessageTypes

      public Class[] getSupportedMessageTypes()
      Specified by:
      getSupportedMessageTypes in interface javax.security.auth.message.module.ServerAuthModule
    • initialize

      public void initialize(javax.security.auth.message.MessagePolicy requestPolicy, javax.security.auth.message.MessagePolicy responsePolicy, CallbackHandler handler, Map options) throws javax.security.auth.message.AuthException
      Specified by:
      initialize in interface javax.security.auth.message.module.ServerAuthModule
      Throws:
      javax.security.auth.message.AuthException
    • cleanSubject

      public void cleanSubject(javax.security.auth.message.MessageInfo messageInfo, Subject subject) throws javax.security.auth.message.AuthException
      Specified by:
      cleanSubject in interface javax.security.auth.message.ServerAuth
      Throws:
      javax.security.auth.message.AuthException
    • secureResponse

      public javax.security.auth.message.AuthStatus secureResponse(javax.security.auth.message.MessageInfo messageInfo, Subject serviceSubject) throws javax.security.auth.message.AuthException
      Specified by:
      secureResponse in interface javax.security.auth.message.ServerAuth
      Throws:
      javax.security.auth.message.AuthException
    • isMandatory

      protected boolean isMandatory(javax.security.auth.message.MessageInfo messageInfo)
      Parameters:
      messageInfo - message info to examine for mandatory flag
      Returns:
      whether authentication is mandatory or optional
    • login

      protected boolean login(Subject clientSubject, String credentials, String authMethod, javax.security.auth.message.MessageInfo messageInfo) throws IOException, UnsupportedCallbackException
      Throws:
      IOException
      UnsupportedCallbackException
    • login

      protected boolean login(Subject clientSubject, String username, Credential credential, String authMethod, javax.security.auth.message.MessageInfo messageInfo) throws IOException, UnsupportedCallbackException
      Throws:
      IOException
      UnsupportedCallbackException