Class LDAPAuthentication

java.lang.Object
com.erudika.para.server.security.LDAPAuthentication
All Implemented Interfaces:
Serializable, Principal

public class LDAPAuthentication extends Object
Represents a user authentication with LDAP.
Author:
Alex Bogdanovski [[email protected]]
See Also:
  • Constructor Details

    • LDAPAuthentication

      public LDAPAuthentication(Object principal, Object credentials)
      Default constructor.
      Parameters:
      principal - an LDAP uid
      credentials - password
  • Method Details

    • withApp

      public LDAPAuthentication withApp(com.erudika.para.core.App app)
      Parameters:
      app - App
      Returns:
      this
    • getApp

      public com.erudika.para.core.App getApp()
      Returns:
      the App
    • getLdapSettings

      public Map<String,String> getLdapSettings()
      Returns:
      LDAP settings map
    • unauthenticated

      public static org.springframework.security.authentication.UsernamePasswordAuthenticationToken unauthenticated(Object arg0, Object arg1)
    • authenticated

      public static org.springframework.security.authentication.UsernamePasswordAuthenticationToken authenticated(Object arg0, Object arg1, Collection<? extends org.springframework.security.core.GrantedAuthority> arg2)
    • getCredentials

      public Object getCredentials()
    • getPrincipal

      public Object getPrincipal()
    • setAuthenticated

      public void setAuthenticated(boolean arg0) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • eraseCredentials

      public void eraseCredentials()
    • getAuthorities

      public Collection<org.springframework.security.core.GrantedAuthority> getAuthorities()
    • getName

      public String getName()
      Specified by:
      getName in interface Principal
    • isAuthenticated

      public boolean isAuthenticated()
    • getDetails

      public Object getDetails()
    • setDetails

      public void setDetails(Object arg0)
    • equals

      public boolean equals(Object arg0)
      Specified by:
      equals in interface Principal
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Principal
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Specified by:
      toString in interface Principal
      Overrides:
      toString in class Object