1 17 package org.apache.ldap.server.authn; 18 19 20 import org.apache.ldap.common.name.LdapName; 21 22 import javax.naming.Name ; 23 import java.io.Serializable ; 24 import java.security.Principal ; 25 26 27 34 public final class LdapPrincipal implements Principal , Serializable 35 { 36 private static final long serialVersionUID = 3906650782395676720L; 37 38 39 private final Name name; 40 41 42 public static final LdapPrincipal ANONYMOUS = new LdapPrincipal(); 43 44 45 51 LdapPrincipal( Name name ) 52 { 53 this.name = name; 54 } 55 56 57 61 private LdapPrincipal() 62 { 63 this.name = new LdapName(); 64 } 65 66 67 74 public Name getDn() 75 { 76 return ( Name ) name.clone(); 77 } 78 79 80 85 public String getName() 86 { 87 return name.toString(); 88 } 89 } 90 | Popular Tags |