Class GECATrustManagerLoginModule

  • All Implemented Interfaces:
    javax.security.auth.spi.LoginModule

    public class GECATrustManagerLoginModule
    extends java.lang.Object
    implements javax.security.auth.spi.LoginModule
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean abort()
      Abort the login.
      boolean commit()
      If the login method had success the commit method adds the X500Principal of the subject of the x509 certicate chain to the current subject.
      void initialize​(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map sharedState, java.util.Map options)
      Initialize this LoginModule.
      boolean login()
      Try to login
      boolean logout()
      logout the current subject
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GECATrustManagerLoginModule

        public GECATrustManagerLoginModule()
    • Method Detail

      • initialize

        public void initialize​(javax.security.auth.Subject subject,
                               javax.security.auth.callback.CallbackHandler callbackHandler,
                               java.util.Map sharedState,
                               java.util.Map options)
        Initialize this LoginModule.
        Specified by:
        initialize in interface javax.security.auth.spi.LoginModule
        Parameters:
        subject - the current subject
        callbackHandler - callbackHandler for retrieving system name and X509 certificate chain
        sharedState - shared state (not used)
        options - options (not used)
      • login

        public boolean login()
                      throws javax.security.auth.login.LoginException
        Try to login
        Specified by:
        login in interface javax.security.auth.spi.LoginModule
        Returns:
        true if the login was successful
        Throws:
        javax.security.auth.login.LoginException - if the CallbackHandler does not support the required Callbacks or if an Callback throws an IOException.
      • commit

        public boolean commit()
        If the login method had success the commit method adds the X500Principal of the subject of the x509 certicate chain to the current subject.
        Specified by:
        commit in interface javax.security.auth.spi.LoginModule
        Returns:
        true if X500Principal has been added to the subject
      • abort

        public boolean abort()
        Abort the login.
        Specified by:
        abort in interface javax.security.auth.spi.LoginModule
        Returns:
        always true
      • logout

        public boolean logout()
        logout the current subject
        Specified by:
        logout in interface javax.security.auth.spi.LoginModule
        Returns:
        always true