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
ConstructorDescriptionEncryptedKeyToken
(String id, Date created, Date expires) EncryptedKeyToken
(String id, org.apache.axiom.om.OMElement tokenElem, Date created, Date expires) -
Method Summary
Modifier and TypeMethodDescriptiongetSHA1()
void
Implementing de-serialization logic in accordance with the serialization logic.void
void
Implementing 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: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 interfaceExternalizable
- Overrides:
writeExternal
in classToken
- Parameters:
out
- Stream which writes serialized bytes.- Throws:
IOException
- If unable to serialize particular member.
-
readExternal
Description copied from class:Token
Implementing de-serialization logic in accordance with the serialization logic.- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classToken
- Parameters:
in
- Stream which used to read data.- Throws:
IOException
- If unable to de-serialize particular data member.ClassNotFoundException
-