Class EncryptedKeyToken

java.lang.Object
org.apache.rahas.Token
org.apache.rahas.EncryptedKeyToken
All Implemented Interfaces:
Externalizable, Serializable

public class EncryptedKeyToken extends Token
This token is used store Encrypted Key Tokens. This token contains the SHA1 value of the Encrypted Key. These tokens are stored using the storage mechanism provided via the TokenStorage interface.
See Also:
  • Constructor Details

    • EncryptedKeyToken

      public EncryptedKeyToken()
    • EncryptedKeyToken

      public EncryptedKeyToken(String id, Date created, Date expires)
    • EncryptedKeyToken

      public EncryptedKeyToken(String id, org.apache.axiom.om.OMElement tokenElem, Date created, Date expires) throws TrustException
      Throws:
      TrustException
  • Method Details

    • setSHA1

      public void setSHA1(String sha)
      Parameters:
      sha - SHA1 of the encrypted key
    • getSHA1

      public String getSHA1()
      Returns:
      SHA1 value of the encrypted key
    • writeExternal

      public void writeExternal(ObjectOutput out) throws IOException
      Description copied from class: Token
      Implementing serialize logic according to our own protocol. We had to follow this, because OMElement class is not serializable. Making OMElement serializable will have an huge impact on other components. Therefore implementing serialization logic according to a manual protocol.
      Specified by:
      writeExternal in interface Externalizable
      Overrides:
      writeExternal in class Token
      Parameters:
      out - Stream which writes serialized bytes.
      Throws:
      IOException - If unable to serialize particular member.
    • readExternal

      public void readExternal(ObjectInput in) throws ClassNotFoundException, IOException
      Description copied from class: Token
      Implementing de-serialization logic in accordance with the serialization logic.
      Specified by:
      readExternal in interface Externalizable
      Overrides:
      readExternal in class Token
      Parameters:
      in - Stream which used to read data.
      Throws:
      IOException - If unable to de-serialize particular data member.
      ClassNotFoundException