use of org.forgerock.openam.cts.api.tokens.SAMLToken in project OpenAM by OpenRock.
the class SAML2CTSPersistentStore method saveSAML2Token.
/**
* {@inheritDoc}
*/
@Override
public void saveSAML2Token(String primaryKey, String secondaryKey, Object samlObj, long expirationTime) throws SAML2TokenRepositoryException {
// Save the SAML2 Token.
try {
// Perform the Save of the Token to the Token Repository.
SAMLToken samlToken = new SAMLToken(primaryKey, secondaryKey, expirationTime, samlObj);
Token token = tokenAdapter.toToken(samlToken);
persistentStore.createAsync(token);
} catch (CoreTokenException e) {
debug.error("SAML2CTSPersistentStore.saveSAML2Token(): failed to save SAML2 " + "token using primary key:" + primaryKey, e);
throw new SAML2TokenRepositoryException(e.getMessage(), e);
}
}
Aggregations