Class LDAPLoginModule

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

    public class LDAPLoginModule
    extends java.lang.Object
    implements javax.security.auth.spi.LoginModule
    Authenticates to LDAP server and stores some inetOrgPerson (RFC 2798) attributes to the user principal. Role principals are also added. Configuration options: connectionURL: LDAP connection URL baseDN: Distinguished name of base node accountsDN: DN part where accounts can be found rolesDN: DN part where roles (groupOfNames) can be found example JAAS config file: JAASLDAPLoginTest { ips.net.auth.jaas.LDAPLoginModule Sufficient connectionURL="ldaps://ldap.example.org:636" baseDN="dc=example,dc=org" accountsDN="ou=People" rolesDN="ou=roles,ou=webapp" debug=true; };
    Author:
    klausj
    • Constructor Summary

      Constructors 
      Constructor Description
      LDAPLoginModule()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean abort()  
      boolean commit()  
      void initialize​(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map sharedState, java.util.Map options)  
      boolean login()  
      boolean logout()  
      • Methods inherited from class java.lang.Object

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

      • LDAPLoginModule

        public LDAPLoginModule()
    • 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)
        Specified by:
        initialize in interface javax.security.auth.spi.LoginModule
      • login

        public boolean login()
                      throws javax.security.auth.login.LoginException
        Specified by:
        login in interface javax.security.auth.spi.LoginModule
        Throws:
        javax.security.auth.login.LoginException
      • commit

        public boolean commit()
                       throws javax.security.auth.login.LoginException
        Specified by:
        commit in interface javax.security.auth.spi.LoginModule
        Throws:
        javax.security.auth.login.LoginException
      • abort

        public boolean abort()
                      throws javax.security.auth.login.LoginException
        Specified by:
        abort in interface javax.security.auth.spi.LoginModule
        Throws:
        javax.security.auth.login.LoginException
      • logout

        public boolean logout()
                       throws javax.security.auth.login.LoginException
        Specified by:
        logout in interface javax.security.auth.spi.LoginModule
        Throws:
        javax.security.auth.login.LoginException