|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.asn1.AbstractAsn1Object
org.apache.directory.shared.kerberos.messages.KerberosMessage
org.apache.directory.shared.kerberos.messages.Ticket
public class Ticket
Ticket message component as handed out by the ticket granting service. It will store the object described by the ASN.1 grammar :
Ticket ::= [APPLICATION 1] SEQUENCE {
tkt-vno [0] INTEGER (5),
realm [1] Realm,
sname [2] ,
enc-part [3] -- EncTicketPart
}
| Field Summary | |
|---|---|
static int |
TICKET_VNO
Constant for the Ticket version number (5) |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class org.apache.directory.shared.kerberos.messages.KerberosMessage |
|---|
getMessageType, getProtocolVersionNumber, setMessageType, setProtocolVersionNumber |
| Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
|---|
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TICKET_VNO
Ticket version number (5)
| Constructor Detail |
|---|
public Ticket(PrincipalName sName,
EncryptedData encPart)
throws InvalidTicketException
serverPrincipal - The server principalencPart - The encoded part
InvalidTicketExceptionpublic Ticket()
public Ticket(int tktvno,
PrincipalName sName,
EncryptedData encPart)
throws InvalidTicketException
tktvno - The Kerberos version numberserverPrincipal - The server principalencPart - The encoded part
InvalidTicketException| Method Detail |
|---|
public 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.shared.asn1.EncoderException
Ticket :
0x61 LL
0x30 LL
0xA0 LL tktvno
0xA1 LL realm
0xA2 LL
sname (PrincipalName)
0xA3 LL
enc-part (EncryptedData)
encode in interface org.apache.directory.shared.asn1.Asn1Objectencode in class org.apache.directory.shared.asn1.AbstractAsn1Objectorg.apache.directory.shared.asn1.EncoderExceptionpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||