|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.security.auth.kerberos.KerberosPrincipal
public final class KerberosPrincipal
This represents a Kerberos principal. See the Kerberos authentication RFC for more information: RFC 1510.
| Field Summary | |
|---|---|
static int |
KRB_NT_PRINCIPAL
Constant from the RFC: "Just the name of the principal as in DCE, or for users". |
static int |
KRB_NT_SRV_HST
Constant from the RFC: "Service and other unique instance (krbtgt)". |
static int |
KRB_NT_SRV_INST
Constant from the RFC: "Service with host name as instance (telnet, rcommands)". |
static int |
KRB_NT_SRV_XHST
Constant from the RFC: "Service with host as remaining components". |
static int |
KRB_NT_UID
Constant from the RFC: "Unique ID". |
static int |
KRB_NT_UNKNOWN
Constant from the RFC: "Name type not known". |
| Constructor Summary | |
|---|---|
KerberosPrincipal(String name)
Create a new instance with the given name and a type of KRB_NT_PRINCIPAL. |
|
KerberosPrincipal(String name,
int type)
Create a new instance with the given name and type. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
equals compares this object to another object. |
String |
getName()
Return the name of this principal. |
int |
getNameType()
Return the type of this principal. |
String |
getRealm()
Return the realm of this principal. |
int |
hashCode()
hashCode returns a hash code for this object. |
String |
toString()
toString creates a printable string that represents this object for debugging purposes. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int KRB_NT_PRINCIPAL
public static final int KRB_NT_SRV_HST
public static final int KRB_NT_SRV_INST
public static final int KRB_NT_SRV_XHST
public static final int KRB_NT_UID
public static final int KRB_NT_UNKNOWN
| Constructor Detail |
|---|
public KerberosPrincipal(String name)
KRB_NT_PRINCIPAL.
name - the principal's name
public KerberosPrincipal(String name,
int type)
throws gnu.classpath.NotImplementedException
name - the principal's nametype - the principal's type
gnu.classpath.NotImplementedException| Method Detail |
|---|
public String getName()
getName in interface PrincipalPrincipalpublic String getRealm()
public int getNameType()
public int hashCode()
ObjectThe default implementation returns System.identityHashCode(this).
hashCode in interface PrincipalhashCode in class Objectpublic boolean equals(Object other)
ObjectEquals must be symmetric (a.equals(b) == b.equals(a)), reflexive (a.equals(a)==true) and transitive (a.equals(b) && b.equals(c) IMPLIES (a.equals(c))) and not change over time (a.equals(b) == a.equals(b)). a.equals(null) should always return false.
If a.equals(b) is true for two objects a and b, then a.hashCode()==b.hashCode() must hold.
The default implementation of equals returns this==other.
equals in interface Principalequals in class Objectother - the other object.
public String toString()
ObjectThe default implementation returns getClass().getName() + '@' + Integer.toHexString(hashCode()).
toString in interface PrincipaltoString in class Object
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||