public class Authenticator extends KerberosMessage
Authenticator ::= [APPLICATION 2] SEQUENCE {
authenticator-vno [0] INTEGER (5),
crealm [1] Realm,
cname [2] ,
cksum [3] OPTIONAL,
cusec [4] Microseconds,
ctime [5] KerberosTime,
subkey [6] OPTIONAL,
seq-number [7] UInt32 OPTIONAL,
authorization-data [8] OPTIONAL
}
| Modifier and Type | Field and Description |
|---|---|
private int |
authenticatorLength |
private int |
authenticatorSeqLength |
private int |
authenticatorVnoLength |
private AuthorizationData |
authorizationData
The authorization Data
|
private int |
authorizationDataLength |
private Checksum |
cksum
The checksum
|
private int |
cksumLength |
private PrincipalName |
cname
The client principalName
|
private int |
cnameLength |
private java.lang.String |
crealm
The client realm
|
private byte[] |
crealmBytes |
private int |
crealmLength |
private KerberosTime |
ctime
The client time
|
private int |
ctimeLength |
private int |
cusec
The client microseconds
|
private int |
cusecLength |
private static boolean |
IS_DEBUG
Speedup for logs
|
private static org.slf4j.Logger |
LOG
The logger
|
private java.lang.Integer |
seqNumber
The sequence number
|
private int |
seqNumberLength |
private EncryptionKey |
subKey
The sub-session key
|
private int |
subkeyLength |
private int |
versionNumber
The authenticator version number
|
| Constructor and Description |
|---|
Authenticator()
Creates a new instance of Authenticator.
|
| Modifier and Type | Method and Description |
|---|---|
int |
computeLength()
Compute the Authenticator length
|
java.nio.ByteBuffer |
encode(java.nio.ByteBuffer buffer)
Encode the Authenticator message to a PDU.
|
AuthorizationData |
getAuthorizationData()
Returns the
AuthorizationData. |
Checksum |
getCksum() |
PrincipalName |
getCName() |
java.lang.String |
getCRealm() |
KerberosTime |
getCtime() |
int |
getCusec() |
java.lang.Integer |
getSeqNumber() |
EncryptionKey |
getSubKey() |
int |
getVersionNumber()
Returns the version number of the
Authenticator. |
private void |
reset()
reset the fields used while computing length
|
void |
setAuthorizationData(AuthorizationData authorizationData) |
void |
setCksum(Checksum cksum) |
void |
setCName(PrincipalName cname) |
void |
setCRealm(java.lang.String crealm) |
void |
setCTime(KerberosTime ctime) |
void |
setCusec(int cusec) |
void |
setSeqNumber(int seqNumber) |
void |
setSubKey(EncryptionKey subKey) |
void |
setVersionNumber(int versionNumber) |
java.lang.String |
toString() |
getMessageType, getProtocolVersionNumber, setMessageType, setProtocolVersionNumberprivate static final org.slf4j.Logger LOG
private static final boolean IS_DEBUG
private int versionNumber
private java.lang.String crealm
private PrincipalName cname
private Checksum cksum
private int cusec
private KerberosTime ctime
private EncryptionKey subKey
private java.lang.Integer seqNumber
private AuthorizationData authorizationData
private int authenticatorVnoLength
private int crealmLength
private byte[] crealmBytes
private int cnameLength
private int cksumLength
private int cusecLength
private int ctimeLength
private int subkeyLength
private int seqNumberLength
private int authorizationDataLength
private int authenticatorSeqLength
private int authenticatorLength
public AuthorizationData getAuthorizationData()
AuthorizationData.AuthorizationData.public void setAuthorizationData(AuthorizationData authorizationData)
authorizationData - the authorizationData to setpublic Checksum getCksum()
public void setCksum(Checksum cksum)
cksum - the cksum to setpublic PrincipalName getCName()
public void setCName(PrincipalName cname)
cname - the cname to setpublic java.lang.String getCRealm()
public void setCRealm(java.lang.String crealm)
crealm - the crealm to setpublic KerberosTime getCtime()
public void setCTime(KerberosTime ctime)
ctime - the ctime to setpublic int getCusec()
public void setCusec(int cusec)
cusec - the cusec to setpublic java.lang.Integer getSeqNumber()
public void setSeqNumber(int seqNumber)
seqNumber - the seqNumber to setpublic EncryptionKey getSubKey()
public void setSubKey(EncryptionKey subKey)
subKey - the subKey to setpublic int getVersionNumber()
Authenticator.Authenticator.public void setVersionNumber(int versionNumber)
versionNumber - the versionNumber to setpublic int computeLength()
Authenticator :
0x62 L1 Authenticator [APPLICATION 2]
|
+--> 0x30 L2 Authenticator SEQUENCE
|
+--> 0xA0 03 authenticator-vno tag
| |
| +--> 0x02 0x01 0x05 authenticator-vno (int, 5)
|
+--> 0xA1 L3 crealm tag
| |
| +--> 0x1B L3-1 crealm (KerberosString)
|
+--> 0xA2 L4 cname (PrincipalName)
|
+--> 0xA3 L5 cksum (CheckSum)
|
+--> 0xA4 L6 cusec tag
| |
| +--> 0x02 L6-1 nnn cusec value (Integer)
|
+--> 0xA5 0x11 ctime tag
| |
| +--> 0x18 0x0F ttt ctime (KerberosTime)
|
+--> 0xA6 L7 subkey (EncryptionKey)
|
+--> 0xA7 L8 seq-number tag
| |
| +--> 0x02 L8-1 nnn seq-number (Integer)
|
+--> 0xA8 L9 authorization-data (AuthorizationData)
public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
throws org.apache.directory.api.asn1.EncoderException
Authenticator :
0x62 LL
0x30 LL
0xA0 0x03
0x02 0x01 0x05 authenticator-vno
0xA1 LL
0x1B LL abcd crealm
0xA2 LL
0x30 LL abcd cname
[0xA3 LL
0x30 LL abcd] cksum
0xA4 LL
0x02 LL nnn cusec
0xA5 0x11
0x18 0x0F ttt ctime
[0xA6 LL
0x30 LL abcd] subkey
[0xA7 LL
0x02 LL nnn] seq-number
[0xA8 LL
0x30 LL abcd] authorization-data
org.apache.directory.api.asn1.EncoderExceptionprivate void reset()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()