Search in sources :

Example 6 with SAMLToken

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);
    }
}
Also used : CoreTokenException(org.forgerock.openam.cts.exceptions.CoreTokenException) SAMLToken(org.forgerock.openam.cts.api.tokens.SAMLToken) Token(org.forgerock.openam.cts.api.tokens.Token) SAML2TokenRepositoryException(org.forgerock.openam.federation.saml2.SAML2TokenRepositoryException) SAMLToken(org.forgerock.openam.cts.api.tokens.SAMLToken)

Aggregations

SAMLToken (org.forgerock.openam.cts.api.tokens.SAMLToken)6 Token (org.forgerock.openam.cts.api.tokens.Token)4 CoreTokenException (org.forgerock.openam.cts.exceptions.CoreTokenException)2 SAML2TokenRepositoryException (org.forgerock.openam.federation.saml2.SAML2TokenRepositoryException)2 Provider (com.google.inject.Provider)1 TypeLiteral (com.google.inject.TypeLiteral)1 FactoryModuleBuilder (com.google.inject.assistedinject.FactoryModuleBuilder)1 ServerSessionOperationStrategy (com.iplanet.dpro.session.operations.ServerSessionOperationStrategy)1 SessionOperationStrategy (com.iplanet.dpro.session.operations.SessionOperationStrategy)1 SessionService (com.iplanet.dpro.session.service.SessionService)1 LDAPServiceException (com.iplanet.services.ldap.LDAPServiceException)1 SSOException (com.iplanet.sso.SSOException)1 URLValidator (com.sun.identity.shared.validation.URLValidator)1 ServiceManagementDAOWrapper (com.sun.identity.sm.ServiceManagementDAOWrapper)1 ConfigAuditorFactory (com.sun.identity.sm.ldap.ConfigAuditorFactory)1 ArrayList (java.util.ArrayList)1 Calendar (java.util.Calendar)1 CTSPersistentStore (org.forgerock.openam.cts.CTSPersistentStore)1 CoreTokenConfig (org.forgerock.openam.cts.CoreTokenConfig)1 TokenAdapter (org.forgerock.openam.cts.adapters.TokenAdapter)1