public final class LdapPrincipal
extends java.lang.Object
implements java.security.Principal, java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
private org.apache.directory.api.ldap.model.constants.AuthenticationLevel |
authenticationLevel
the authentication level for this principal
|
private java.net.SocketAddress |
clientAddress |
private org.apache.directory.api.ldap.model.name.Dn |
dn
the normalized distinguished name of the principal
|
private org.apache.directory.api.ldap.model.schema.SchemaManager |
schemaManager
The SchemaManager
|
private static long |
serialVersionUID |
private java.net.SocketAddress |
serverAddress |
private byte[][] |
userPasswords
The userPassword
|
| Constructor and Description |
|---|
LdapPrincipal()
Creates a principal for the no name anonymous user whose Dn is the empty
String.
|
LdapPrincipal(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
Creates a principal for the no name anonymous user whose Dn is the empty
String.
|
LdapPrincipal(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.constants.AuthenticationLevel authenticationLevel)
Creates a new LDAP/X500 principal without any group associations.
|
LdapPrincipal(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.constants.AuthenticationLevel authenticationLevel,
byte[] userPassword)
Creates a new LDAP/X500 principal without any group associations.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Clone the object.
|
org.apache.directory.api.ldap.model.constants.AuthenticationLevel |
getAuthenticationLevel()
Gets the authentication level associated with this LDAP principle.
|
java.net.SocketAddress |
getClientAddress() |
org.apache.directory.api.ldap.model.name.Dn |
getDn()
Gets a cloned copy of the normalized distinguished name of this
principal as a
Dn. |
java.lang.String |
getName()
Returns the normalized distinguished name of the principal as a String.
|
org.apache.directory.api.ldap.model.schema.SchemaManager |
getSchemaManager() |
java.net.SocketAddress |
getServerAddress() |
byte[][] |
getUserPasswords() |
void |
setClientAddress(java.net.SocketAddress clientAddress) |
void |
setSchemaManager(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager) |
void |
setServerAddress(java.net.SocketAddress serverAddress) |
void |
setUserPassword(byte[]... userPasswords) |
java.lang.String |
toString()
Returns string representation of the normalized distinguished name
of this principal.
|
private static final long serialVersionUID
private org.apache.directory.api.ldap.model.name.Dn dn
private org.apache.directory.api.ldap.model.constants.AuthenticationLevel authenticationLevel
private byte[][] userPasswords
private org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager
private java.net.SocketAddress clientAddress
private java.net.SocketAddress serverAddress
public LdapPrincipal(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.constants.AuthenticationLevel authenticationLevel)
dn - the normalized distinguished name of the principalauthenticationLevel - the authentication level for this principalpublic LdapPrincipal(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.constants.AuthenticationLevel authenticationLevel,
byte[] userPassword)
dn - the normalized distinguished name of the principalauthenticationLevel - the authentication level for this principaluserPassword - The user passwordpublic LdapPrincipal()
public LdapPrincipal(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
public org.apache.directory.api.ldap.model.name.Dn getDn()
Dn.Dnpublic java.lang.String getName()
getName in interface java.security.Principalpublic org.apache.directory.api.ldap.model.constants.AuthenticationLevel getAuthenticationLevel()
public byte[][] getUserPasswords()
public void setUserPassword(byte[]... userPasswords)
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic org.apache.directory.api.ldap.model.schema.SchemaManager getSchemaManager()
public void setSchemaManager(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
schemaManager - the schemaManager to setpublic java.net.SocketAddress getClientAddress()
public void setClientAddress(java.net.SocketAddress clientAddress)
clientAddress - the clientAddress to setpublic java.net.SocketAddress getServerAddress()
public void setServerAddress(java.net.SocketAddress serverAddress)
serverAddress - the serverAddress to setpublic java.lang.String toString()
toString in interface java.security.PrincipaltoString in class java.lang.Object