Package org.apache.rahas
Class EncryptedKeyToken
java.lang.Object
org.apache.rahas.Token
org.apache.rahas.EncryptedKeyToken
- All Implemented Interfaces:
Externalizable,Serializable
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:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionEncryptedKeyToken(String id, Date created, Date expires) EncryptedKeyToken(String id, org.apache.axiom.om.OMElement tokenElem, Date created, Date expires) -
Method Summary
Modifier and TypeMethodDescriptiongetSHA1()voidImplementing de-serialization logic in accordance with the serialization logic.voidvoidImplementing serialize logic according to our own protocol.Methods inherited from class org.apache.rahas.Token
getAttachedReference, getCreated, getExpires, getId, getIssuerAddress, getPreviousToken, getProperties, getSecret, getState, getToken, getUnattachedReference, isChanged, setAttachedReference, setChanged, setExpires, setIssuerAddress, setPreviousToken, setProperties, setSecret, setState, setToken, setUnattachedReference
-
Constructor Details
-
EncryptedKeyToken
public EncryptedKeyToken() -
EncryptedKeyToken
-
EncryptedKeyToken
public EncryptedKeyToken(String id, org.apache.axiom.om.OMElement tokenElem, Date created, Date expires) throws TrustException - Throws:
TrustException
-
-
Method Details
-
setSHA1
- Parameters:
sha- SHA1 of the encrypted key
-
getSHA1
- Returns:
- SHA1 value of the encrypted key
-
writeExternal
Description copied from class:TokenImplementing 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:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classToken- Parameters:
out- Stream which writes serialized bytes.- Throws:
IOException- If unable to serialize particular member.
-
readExternal
Description copied from class:TokenImplementing de-serialization logic in accordance with the serialization logic.- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classToken- Parameters:
in- Stream which used to read data.- Throws:
IOException- If unable to de-serialize particular data member.ClassNotFoundException
-