public class PrincipalName extends KrbSequenceType
PrincipalName ::= SEQUENCE {
name-type [0] Int32,
name-string [1] SEQUENCE OF KerberosString
}
The possible name-type are :
| Modifier and Type | Class and Description |
|---|---|
protected static class |
PrincipalName.PrincipalNameField
The possible fields
|
| Constructor and Description |
|---|
PrincipalName()
Creates a PrincipalName instance
|
PrincipalName(List<String> nameStrings,
NameType nameType)
Creates a PrincipalName instance, using a given type and
a list of components
|
PrincipalName(String nameString)
Creates a PrincipalName instance, using a NT_PRINCIPAL name
|
PrincipalName(String nameString,
NameType type)
Creates a PrincipalName instance, using a given type
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
static String |
extractName(String principal)
Get the name part of the PrincipalName, ie, discading the realm part of it.
|
static String |
extractRealm(String principal)
Get the Realm from the name.
|
String |
getName() |
List<String> |
getNameStrings() |
NameType |
getNameType() |
String |
getRealm() |
int |
hashCode() |
static String |
makeSalt(PrincipalName principalName)
Create a SALT based on the PrincipalName, accordingly to RFC 4120 :
"The default salt string, if none is provided via pre-authentication
data, is the concatenation of the principal's realm and name components,
in order, with no separators."
|
void |
setNameStrings(List<String> nameStrings)
Stores the components of a PrincipalName into the associated ASN1 structure
|
void |
setNameType(NameType nameType)
Set the NameType field of this PrincipalName
|
void |
setRealm(String realm)
Store a Realm in this PrincipalName
|
String |
toString() |
getFieldAsInt, getFieldAsTime, setField, setFieldAsString, setFieldAsTimedecodeBody, dumpWith, encodeBody, encodingBodyLength, getFieldAs, getFieldAsAny, getFieldAsInteger, getFieldAsObjId, getFieldAsOctets, getFieldAsString, setAnyFieldValueType, setFieldAs, setFieldAsAny, setFieldAsInt, setFieldAsInt, setFieldAsObjId, setFieldAsOctetsdecode, decode, decode, encode, encode, encodingHeaderLength, encodingLength, getBodyLength, getHeaderLength, isBER, isCER, isDefinitiveLength, isDER, isImplicit, isPrimitive, resetBodyLength, taggedDecode, taggedDecode, taggedDecode, taggedEncode, taggedEncode, taggedEncodingLength, useBER, useCER, useDefinitiveLength, useDER, useImplicit, usePrimitiveisAppSpecific, isCollection, isContextSpecific, isEOC, isNull, isSimple, isTagSpecific, isUniversal, simpleInfo, tag, tagFlags, tagNopublic PrincipalName()
public PrincipalName(String nameString)
nameString - The PrincipalName as a Stringpublic PrincipalName(String nameString, NameType type)
nameString - The PrincipalName as a Stringtype - The nameType to usepublic static String extractRealm(String principal)
principal - The PrincipalName from which we want to extract the Realmpublic static String extractName(String principal)
principal - The PrincipalName to splitpublic static String makeSalt(PrincipalName principalName)
principalName - The PrincipalName for which we want to create a saltpublic NameType getNameType()
public void setNameType(NameType nameType)
nameType - The NameType to storepublic List<String> getNameStrings()
public void setNameStrings(List<String> nameStrings)
nameStrings - The PrincipalName's componentspublic String getRealm()
public void setRealm(String realm)
realm - The Realm to storepublic String getName()
public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object other)
equals in class ObjectObject.equals(Object)public String toString()
toString in class org.apache.kerby.asn1.type.AbstractAsn1Type<org.apache.kerby.asn1.type.Asn1CollectionType>Object.toString()Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.