Class TestLoginModule

java.lang.Object
com.sun.grid.security.login.TestLoginModule
All Implemented Interfaces:
LoginModule

public class TestLoginModule extends Object implements LoginModule
  • Constructor Details

    • TestLoginModule

      public TestLoginModule()
  • Method Details

    • initialize

      public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options)
      Initialize the TestLoginModule
      Specified by:
      initialize in interface LoginModule
      Parameters:
      subject - the current subject
      callbackHandler - the callbackhandler (must at least handle a NameCallback and a PasswordCallback).
      sharedState - not used
      options - contains the options for the TestLoginModule.
    • login

      public boolean login() throws LoginException
      Perform the login.
      Specified by:
      login in interface LoginModule
      Returns:
      true on successfull authentication. false if username of password is invalid.
      Throws:
      LoginException -
      • if the callbackhandler reports an error
      • if some options are missing (please check the jass.config file)
      • if the underlying authentication system report an error
    • commit

      public boolean commit()
      Commit the login (adds the principals to the subject)
      Specified by:
      commit in interface LoginModule
      Returns:
      true of the principals has been added to the subject.
    • abort

      public boolean abort()
      Abort the login.
      Specified by:
      abort in interface LoginModule
      Returns:
      Always true
    • logout

      public boolean logout()
      Removes all previously added prinicipals from the subject.
      Specified by:
      logout in interface LoginModule
      Returns:
      Always true