public class Ticket extends KerberosMessage
Ticket ::= [APPLICATION 1] SEQUENCE {
tkt-vno [0] INTEGER (5),
realm [1] Realm,
sname [2] ,
enc-part [3] -- EncTicketPart
}
| Modifier and Type | Field and Description |
|---|---|
static int |
TICKET_VNO
Constant for the
Ticket version number (5) |
| Constructor and Description |
|---|
Ticket()
Creates a new instance of Ticket.
|
Ticket(int tktvno,
PrincipalName sName,
EncryptedData encPart)
Creates a new instance of Ticket.
|
Ticket(PrincipalName sName,
EncryptedData encPart)
Creates a new instance of Ticket.
|
| Modifier and Type | Method and Description |
|---|---|
int |
computeLength()
Compute the Ticket length
|
ByteBuffer |
encode(ByteBuffer buffer)
Encode the Ticket message to a PDU.
|
boolean |
equals(Object obj) |
EncryptedData |
getEncPart()
Returns the
EncryptedData. |
EncTicketPart |
getEncTicketPart() |
String |
getRealm()
Returns the server realm.
|
PrincipalName |
getSName()
Returns the server
PrincipalName. |
int |
getTktVno()
Gets the Ticket Version number
|
int |
hashCode() |
void |
setEncPart(EncryptedData encPart)
Set the encrypted ticket part
|
void |
setEncTicketPart(EncTicketPart encTicketPart) |
void |
setRealm(String realm)
Set the server realm
|
void |
setSName(PrincipalName sName)
Set the server principalName
|
void |
setTktVno(int tktVno)
Sets the Ticket Version number
|
String |
toString() |
String |
toString(String tabs)
Pretty print the instance
|
getMessageType, getProtocolVersionNumber, setMessageType, setProtocolVersionNumberpublic static final int TICKET_VNO
Ticket version number (5)public Ticket(PrincipalName sName, EncryptedData encPart) throws InvalidTicketException
serverPrincipal - The server principalencPart - The encoded partInvalidTicketExceptionpublic Ticket()
public Ticket(int tktvno,
PrincipalName sName,
EncryptedData encPart)
throws InvalidTicketException
tktvno - The Kerberos version numberserverPrincipal - The server principalencPart - The encoded partInvalidTicketExceptionpublic EncryptedData getEncPart()
EncryptedData.EncryptedData.public void setEncPart(EncryptedData encPart)
encPart - the encrypted ticket partpublic String getRealm()
public void setRealm(String realm)
realm - the server realmpublic PrincipalName getSName()
PrincipalName.PrincipalName.public void setSName(PrincipalName sName)
sName - the server principalNamepublic int getTktVno()
public void setTktVno(int tktVno)
tktVno - The new version numberpublic EncTicketPart getEncTicketPart()
public void setEncTicketPart(EncTicketPart encTicketPart)
encTicketPart - the encTicketPart to setpublic int computeLength()
Ticket :
0x61 L1 Ticket [APPLICATION 1]
|
+--> 0x30 L2 Ticket SEQUENCE
|
+--> 0xA0 L3 tkt-vno tag
| |
| +--> 0x02 L3-1 tkt-vno (int, 5)
|
+--> 0xA1 L4 realm tag
| |
| +--> 0x1B L4-1 realm (KerberosString)
|
+--> 0xA2 L5 sname (PrincipalName)
|
+--> 0xA3 L6 enc-part (EncryptedData)
public ByteBuffer encode(ByteBuffer buffer) throws org.apache.directory.api.asn1.EncoderException
Ticket :
0x61 LL
0x30 LL
0xA0 LL tktvno
0xA1 LL realm
0xA2 LL
sname (PrincipalName)
0xA3 LL
enc-part (EncryptedData)
org.apache.directory.api.asn1.EncoderExceptionpublic String toString()
toString in class ObjectObject.toString()Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.