Name

KerberosPrincipal

Synopsis

This class represents a Kerberos principal, specified as a principal name with an optional realm. If no realm is specified in the name, the default realm (from the krb5.conf configuration file or from the java.security.krb5.realm system property) is used.

javax.security.auth.kerberos.KerberosPrincipal

Figure 19-16. javax.security.auth.kerberos.KerberosPrincipal

public final class KerberosPrincipal implements java.security.Principal, Serializable {
// Public Constructors
     public KerberosPrincipal(String name);  
     public KerberosPrincipal(String name, int nameType);  
// Public Constants
     public static final int KRB_NT_PRINCIPAL;                           =1
     public static final int KRB_NT_SRV_HST;                             =3
     public static final int KRB_NT_SRV_INST;                            =2
     public static final int KRB_NT_SRV_XHST;                            =4
     public static final int KRB_NT_UID;                                 =5
     public static final int KRB_NT_UNKNOWN;                             =0
                  // Public Instance Methods
     public int getNameType( );  
     public String getRealm( );  
// Methods Implementing Principal
     public boolean equals(Object other);  
     public String getName( );  
     public int hashCode( );  
     public String toString( );  
}

Passed To

KerberosKey.KerberosKey( ), KerberosTicket.KerberosTicket( )

Returned By

KerberosKey.getPrincipal( ), KerberosTicket.{getClient( ), getServer( )}

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.