org.apache.directory.shared.kerberos.messages
Class ApReq

java.lang.Object
  extended by org.apache.directory.shared.asn1.AbstractAsn1Object
      extended by org.apache.directory.shared.kerberos.messages.KerberosMessage
          extended by org.apache.directory.shared.kerberos.messages.ApReq
All Implemented Interfaces:
org.apache.directory.shared.asn1.Asn1Object

public class ApReq
extends KerberosMessage

AP-REQ message component . It will store the object described by the ASN.1 grammar :

 AP-REQ          ::= [APPLICATION 14] SEQUENCE {
         pvno            [0] INTEGER (5),
         msg-type        [1] INTEGER (14),
         ap-options      [2] APOptions,
         ticket          [3] Ticket,
         authenticator   [4] EncryptedData -- Authenticator
 }
 

Author:
Apache Directory Project

Constructor Summary
ApReq()
          Creates a new instance of ApplicationRequest.
 
Method Summary
 void clearOption(int option)
          Clears the option at a specified index.
 int computeLength()
          Compute the AP-REQ length
 ByteBuffer encode(ByteBuffer buffer)
          Encode the AP-REQ component
 ApOptions getApOptions()
          Returns the ApOptions.
 EncryptedData getAuthenticator()
          Returns the EncryptedData.
 boolean getOption(int option)
          Returns the option at a specified index.
 Ticket getTicket()
          Returns the Ticket.
 void setApOptions(ApOptions options)
          Sets the ApOptions.
 void setAuthenticator(EncryptedData authenticator)
          Sets the EncryptedData.
 void setOption(ApOptions apOptions)
          Sets the option at a specified index.
 void setTicket(Ticket ticket)
          Sets the Ticket.
 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApReq

public ApReq()
Creates a new instance of ApplicationRequest.

Method Detail

getApOptions

public ApOptions getApOptions()
Returns the ApOptions.

Returns:
The ApOptions.

getTicket

public Ticket getTicket()
Returns the Ticket.

Returns:
The Ticket.

getOption

public boolean getOption(int option)
Returns the option at a specified index.

Parameters:
option -
Returns:
The option.

setOption

public void setOption(ApOptions apOptions)
Sets the option at a specified index.

Parameters:
option -

clearOption

public void clearOption(int option)
Clears the option at a specified index.

Parameters:
option -

getAuthenticator

public EncryptedData getAuthenticator()
Returns the EncryptedData.

Returns:
The EncryptedData.

setAuthenticator

public void setAuthenticator(EncryptedData authenticator)
Sets the EncryptedData.

Parameters:
authenticator - The encrypted authenticator

setApOptions

public void setApOptions(ApOptions options)
Sets the ApOptions.

Parameters:
options -

setTicket

public void setTicket(Ticket ticket)
Sets the Ticket.

Parameters:
ticket -

computeLength

public int computeLength()
Compute the AP-REQ length
 AP-REQ :
 
 0x6E L1 AP-REQ [APPLICATION 14]
  |
  +--> 0x30 L2
        |
        +--> 0xA0 0x03 pvno tag
        |     |
        |     +--> 0x02 0x01 0x05 pvno (5)
        |
        +--> 0xA1 0x03 msg-type tag
        |     |
        |     +--> 0x02 0x01 0x0E msg-type (14)
        |
        +--> 0xA2 0x03 APOptions tag
        |     |
        |     +--> 0x03 0x05 0x00 b1 b2 b3 b4 APOtions
        |
        +--> 0xA3 L3 ticket tag
        |     |
        |     +--> 0x61 L3-1 ticket
        |
        +--> 0xA4 L4 authenticator tag
              |
              +--> 0x30 L4-1 authenticator (encrypted)
 


encode

public ByteBuffer encode(ByteBuffer buffer)
                  throws org.apache.directory.shared.asn1.EncoderException
Encode the AP-REQ component

Specified by:
encode in interface org.apache.directory.shared.asn1.Asn1Object
Overrides:
encode in class org.apache.directory.shared.asn1.AbstractAsn1Object
Parameters:
buffer - The buffer containing the encoded result
Returns:
The encoded component
Throws:
org.apache.directory.shared.asn1.EncoderException - If the encoding failed

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.