org.apache.ldap.server.authn
Class LdapPrincipal

java.lang.Object
  extended byorg.apache.ldap.server.authn.LdapPrincipal
All Implemented Interfaces:
java.security.Principal, java.io.Serializable

public final class LdapPrincipal
extends java.lang.Object
implements java.security.Principal, java.io.Serializable

An alternative X500 user implementation that has access to the distinguished name of the principal as well as the String representation.

Version:
$Rev: 168482 $
Author:
Apache Directory Project
See Also:
Serialized Form

Field Summary
static LdapPrincipal ANONYMOUS
          the no name anonymous user whose DN is the empty String
 
Method Summary
 javax.naming.Name getDn()
          Gets a cloned copy of the normalized distinguished name of this principal as a JNDI Name.
 java.lang.String getName()
          Gets the normalized distinguished name of the principal as a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.security.Principal
equals, hashCode, toString
 

Field Detail

ANONYMOUS

public static final LdapPrincipal ANONYMOUS
the no name anonymous user whose DN is the empty String

Method Detail

getDn

public javax.naming.Name getDn()
Gets a cloned copy of the normalized distinguished name of this principal as a JNDI Name. It must be cloned to protect this Principal from alteration.

Returns:
the normalized distinguished name of the principal as a JNDI Name

getName

public java.lang.String getName()
Gets the normalized distinguished name of the principal as a String.

Specified by:
getName in interface java.security.Principal
See Also:
Principal.getName()


Copyright © 2002-2005 . All Rights Reserved.