sun.security.mule.krb5.internal
Class Ticket

java.lang.Object
  extended by sun.security.mule.krb5.internal.Ticket
All Implemented Interfaces:
Cloneable

public class Ticket
extends Object
implements Cloneable

Implements the ASN.1 Ticket type.

Ticket ::= [APPLICATION 1] SEQUENCE { tkt-vno [0] INTEGER (5), realm [1] Realm, sname [2] PrincipalName, enc-part [3] EncryptedData -- EncTicketPart }

This definition reflects the Network Working Group RFC 4120 specification available at http://www.ietf.org/rfc/rfc4120.txt.


Field Summary
 EncryptedData encPart
           
 Realm realm
           
 PrincipalName sname
           
 int tkt_vno
           
 
Constructor Summary
Ticket(byte[] data)
           
Ticket(sun.security.util.DerValue encoding)
           
Ticket(Realm new_realm, PrincipalName new_sname, EncryptedData new_encPart)
           
 
Method Summary
 byte[] asn1Encode()
          Encodes a Ticket object.
 Object clone()
           
static Ticket parse(sun.security.util.DerInputStream data, byte explicitTag, boolean optional)
          Parse (unmarshal) a Ticket from a DER input stream.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tkt_vno

public int tkt_vno

realm

public Realm realm

sname

public PrincipalName sname

encPart

public EncryptedData encPart
Constructor Detail

Ticket

public Ticket(Realm new_realm,
              PrincipalName new_sname,
              EncryptedData new_encPart)

Ticket

public Ticket(byte[] data)
       throws Asn1Exception,
              RealmException,
              KrbApErrException,
              IOException
Throws:
Asn1Exception
RealmException
KrbApErrException
IOException

Ticket

public Ticket(sun.security.util.DerValue encoding)
       throws Asn1Exception,
              RealmException,
              KrbApErrException,
              IOException
Throws:
Asn1Exception
RealmException
KrbApErrException
IOException
Method Detail

clone

public Object clone()
Overrides:
clone in class Object

asn1Encode

public byte[] asn1Encode()
                  throws Asn1Exception,
                         IOException
Encodes a Ticket object.

Returns:
byte array of encoded ticket object.
Throws:
Asn1Exception - if an error occurs while decoding an ASN1 encoded data.
IOException - if an I/O error occurs while reading encoded data.

parse

public static Ticket parse(sun.security.util.DerInputStream data,
                           byte explicitTag,
                           boolean optional)
                    throws Asn1Exception,
                           IOException,
                           RealmException,
                           KrbApErrException
Parse (unmarshal) a Ticket 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.

Parameters:
data - the Der input stream value, which contains one or more marshaled value.
explicitTag - tag number.
optional - indicate if this data field is optional
Returns:
an instance of Ticket.
Throws:
Asn1Exception - on error.
IOException
RealmException
KrbApErrException


Copyright © 2013. All Rights Reserved.