|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsun.security.mule.krb5.PrincipalName
public class PrincipalName
This class encapsulates a Kerberos principal.
| Field Summary | |
|---|---|
static int |
KRB_NT_PRINCIPAL
Just the name of the principal as in DCE, or for users |
static int |
KRB_NT_SRV_HST
Service with host name as instance (telnet, rcommands) |
static int |
KRB_NT_SRV_INST
Service and other unique instance (krbtgt) |
static int |
KRB_NT_SRV_XHST
Service with host as remaining components |
static int |
KRB_NT_UID
Unique ID |
static int |
KRB_NT_UNKNOWN
Name type not known |
static char |
NAME_COMPONENT_SEPARATOR
|
static String |
NAME_COMPONENT_SEPARATOR_STR
|
static char |
NAME_REALM_SEPARATOR
|
static String |
NAME_REALM_SEPARATOR_STR
|
static char |
REALM_COMPONENT_SEPARATOR
|
static String |
REALM_COMPONENT_SEPARATOR_STR
|
static int |
TGS_DEFAULT_NT
|
static String |
TGS_DEFAULT_SRV_NAME
TGS Name |
| Constructor Summary | |
|---|---|
protected |
PrincipalName()
|
|
PrincipalName(sun.security.util.DerValue encoding)
Returns the ASN.1 encoding of the |
|
PrincipalName(String[] nameParts)
|
|
PrincipalName(String[] nameParts,
int type)
|
|
PrincipalName(String name,
Config kerberosConfig)
|
|
PrincipalName(String name,
int type,
Config kerberosConfig)
|
|
PrincipalName(String name,
String realm,
Config kerberosConfig)
|
protected |
PrincipalName(String primary,
String instance,
String realm,
int type)
Creates a KRB_NT_SRV_INST name from the supplied name components and realm. |
| Method Summary | |
|---|---|
byte[] |
asn1Encode()
Encodes a PrincipalName object. |
Object |
clone()
|
boolean |
equals(Object o)
|
boolean |
equals(PrincipalName other)
|
String |
getInstanceComponent()
Returns the instance component of a name. |
String |
getName()
|
String |
getNameString()
|
String[] |
getNameStrings()
|
int |
getNameType()
|
String |
getPrincipalNameAsString()
|
Realm |
getRealm()
|
String |
getRealmAsString()
|
String |
getRealmString()
|
String |
getSalt()
|
int |
hashCode()
|
boolean |
match(PrincipalName pname)
Checks if two PrincipalName objects have identical values in their corresponding data fields. |
static PrincipalName |
parse(sun.security.util.DerInputStream data,
byte explicitTag,
boolean optional)
Parse (unmarshal) a PrincipalName from a DER
input stream. |
protected static String[] |
parseName(String name)
|
void |
setRealm(Realm new_nameRealm)
|
void |
setRealm(String realmsString)
|
void |
setSalt(String salt)
|
byte[][] |
toByteArray()
|
String |
toString()
|
void |
writePrincipal(CCacheOutputStream cos)
Writes data field values of PrincipalName in FCC format to an output stream. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int KRB_NT_UNKNOWN
public static final int KRB_NT_PRINCIPAL
public static final int KRB_NT_SRV_INST
public static final int KRB_NT_SRV_HST
public static final int KRB_NT_SRV_XHST
public static final int KRB_NT_UID
public static final String TGS_DEFAULT_SRV_NAME
public static final int TGS_DEFAULT_NT
public static final char NAME_COMPONENT_SEPARATOR
public static final char NAME_REALM_SEPARATOR
public static final char REALM_COMPONENT_SEPARATOR
public static final String NAME_COMPONENT_SEPARATOR_STR
public static final String NAME_REALM_SEPARATOR_STR
public static final String REALM_COMPONENT_SEPARATOR_STR
| Constructor Detail |
|---|
protected PrincipalName()
public PrincipalName(String[] nameParts,
int type)
throws IllegalArgumentException,
IOException
IllegalArgumentException
IOException
public PrincipalName(String[] nameParts)
throws IOException
IOException
public PrincipalName(sun.security.util.DerValue encoding)
throws Asn1Exception,
IOException
This definition reflects the Network Working Group RFC 4120 specification available at http://www.ietf.org/rfc/rfc4120.txt.
encoding - a Der-encoded data.
Asn1Exception - if an error occurs while decoding
an ASN1 encoded data.
Asn1Exception - if there is an ASN1 encoding error
IOException - if an I/O error occurs
IllegalArgumentException - if encoding is null
reading encoded data.
public PrincipalName(String name,
int type,
Config kerberosConfig)
throws RealmException
RealmException
public PrincipalName(String name,
Config kerberosConfig)
throws RealmException
RealmException
public PrincipalName(String name,
String realm,
Config kerberosConfig)
throws RealmException
RealmException
protected PrincipalName(String primary,
String instance,
String realm,
int type)
throws KrbException
primary - the primary component of the nameinstance - the instance component of the namerealm - the realm
KrbException| Method Detail |
|---|
public Object clone()
clone in class Objectpublic boolean equals(Object o)
equals in class Objectpublic boolean equals(PrincipalName other)
public static PrincipalName parse(sun.security.util.DerInputStream data,
byte explicitTag,
boolean optional)
throws Asn1Exception,
IOException
PrincipalName from a DER
input stream. This form
parsing might be used when expanding a value which is part of
a constructed sequence and uses explicitly tagged type.
data - the Der input stream value, which contains one or
more marshaled value.explicitTag - tag number.optional - indicate if this data field is optional
PrincipalName.
Asn1Exception - on error.
IOExceptionprotected static String[] parseName(String name)
public String getRealmAsString()
public String getPrincipalNameAsString()
public int hashCode()
hashCode in class Objectpublic String getName()
public int getNameType()
public String[] getNameStrings()
public byte[][] toByteArray()
public String getRealmString()
public Realm getRealm()
public void setRealm(Realm new_nameRealm)
throws RealmException
RealmException
public void setRealm(String realmsString)
throws RealmException
RealmExceptionpublic String getSalt()
public void setSalt(String salt)
public String toString()
toString in class Objectpublic String getNameString()
public byte[] asn1Encode()
throws Asn1Exception,
IOException
PrincipalName object.
Asn1Exception - if an error occurs while decoding an ASN1 encoded data.
IOException - if an I/O error occurs while reading encoded data.public boolean match(PrincipalName pname)
PrincipalName objects have identical values in their corresponding data fields.
pname - the other PrincipalName object.
public void writePrincipal(CCacheOutputStream cos)
throws IOException
PrincipalName in FCC format to an output stream.
cos - a CCacheOutputStream for writing data.
IOException - if an I/O exception occurs.CCacheOutputStreampublic String getInstanceComponent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||