org.apache.directory.shared.kerberos.components
Class AuthorizationData

java.lang.Object
  extended by org.apache.directory.shared.asn1.AbstractAsn1Object
      extended by org.apache.directory.shared.kerberos.components.AuthorizationData
All Implemented Interfaces:
org.apache.directory.shared.asn1.Asn1Object
Direct Known Subclasses:
AdIfRelevant, AdMandatoryForKdc

public class AuthorizationData
extends org.apache.directory.shared.asn1.AbstractAsn1Object

A structure to hold the authorization data.

 AuthorizationData      ::= SEQUENCE OF SEQUENCE {
               ad-type  [0] Int32,
               ad-data  [1] OCTET STRING
 }

Author:
Apache Directory Project

Constructor Summary
AuthorizationData()
          Creates a new set of AuthorizationData
 
Method Summary
 void addEntry(AuthorizationDataEntry entry)
          Add a new AuthorizationDataEntry
 int computeLength()
          Compute the AuthorizationData length
 void createNewAD()
          Create a new currentAD
 ByteBuffer encode(ByteBuffer buffer)
          Encode the EncryptedData message to a PDU.
 boolean equals(Object obj)
          
 List<AuthorizationDataEntry> getAuthorizationData()
           
 AuthorizationDataEntry getCurrentAD()
           
 byte[] getCurrentAdData()
           
 AuthorizationType getCurrentAdType()
           
 int hashCode()
          
 void setCurrentAdData(byte[] adData)
          Set the current AD data
 void setCurrentAdType(AuthorizationType adType)
          Set the current AD type
 String toString()
           
 String toString(String tabs)
           
 
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
 

Constructor Detail

AuthorizationData

public AuthorizationData()
Creates a new set of AuthorizationData

Method Detail

computeLength

public int computeLength()
Compute the AuthorizationData length
 0x30 L1 AuthorizationData sequence
  |
  +-- 0x30 L2 The AD sequence
       |
       +--> 0xA0 L3 adType tag
       |     |
       |     +--> 0x02 L3-1 adType (int)
       |
       +--> 0xA1 L4 adData tag
             |
             +--> 0x04 L<4-1 adData (OCTET STRING)
 


encode

public ByteBuffer encode(ByteBuffer buffer)
                  throws org.apache.directory.shared.asn1.EncoderException
Encode the EncryptedData message to a PDU.

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 where to put the PDU. It should have been allocated before, with the right size.
Returns:
The constructed PDU.
Throws:
org.apache.directory.shared.asn1.EncoderException

getCurrentAdType

public AuthorizationType getCurrentAdType()
Returns:
the currentAD type

setCurrentAdType

public void setCurrentAdType(AuthorizationType adType)
Set the current AD type


getCurrentAdData

public byte[] getCurrentAdData()
Returns:
the currentAD data

setCurrentAdData

public void setCurrentAdData(byte[] adData)
Set the current AD data


getCurrentAD

public AuthorizationDataEntry getCurrentAD()
Returns:
the currentAD

createNewAD

public void createNewAD()
Create a new currentAD


addEntry

public void addEntry(AuthorizationDataEntry entry)
Add a new AuthorizationDataEntry


getAuthorizationData

public List<AuthorizationDataEntry> getAuthorizationData()
Returns:
the authorizationData

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

toString

public String toString(String tabs)
See Also:
Object.toString()

toString

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


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