Search in sources :

Example 21 with WSFederationException

use of com.sun.identity.wsfederation.common.WSFederationException in project OpenAM by OpenRock.

the class RPSigninResponse method getSPAccountMapper.

private static SPAccountMapper getSPAccountMapper(Map attributes) throws WSFederationException {
    SPAccountMapper acctMapper = null;
    List acctMapperList = (List) attributes.get(SAML2Constants.SP_ACCOUNT_MAPPER);
    if (acctMapperList != null) {
        try {
            acctMapper = (SPAccountMapper) (Class.forName((String) acctMapperList.get(0)).newInstance());
            if (debug.messageEnabled()) {
                debug.message("RPSigninResponse.getSPAccountMapper: mapper = " + (String) acctMapperList.get(0));
            }
        } catch (ClassNotFoundException cfe) {
            throw new WSFederationException(cfe);
        } catch (InstantiationException ie) {
            throw new WSFederationException(ie);
        } catch (IllegalAccessException iae) {
            throw new WSFederationException(iae);
        }
    }
    if (acctMapper == null) {
        throw new WSFederationException(WSFederationUtils.bundle.getString("failedAcctMapper"));
    }
    return acctMapper;
}
Also used : WSFederationException(com.sun.identity.wsfederation.common.WSFederationException) List(java.util.List) SPAccountMapper(com.sun.identity.wsfederation.plugins.SPAccountMapper)

Aggregations

WSFederationException (com.sun.identity.wsfederation.common.WSFederationException)21 List (java.util.List)14 WSFederationMetaManager (com.sun.identity.wsfederation.meta.WSFederationMetaManager)7 ArrayList (java.util.ArrayList)7 Map (java.util.Map)7 SessionException (com.sun.identity.plugin.session.SessionException)6 HashMap (java.util.HashMap)6 HashSet (java.util.HashSet)5 Iterator (java.util.Iterator)5 IDPSSOConfigElement (com.sun.identity.wsfederation.jaxb.entityconfig.IDPSSOConfigElement)4 SPSSOConfigElement (com.sun.identity.wsfederation.jaxb.entityconfig.SPSSOConfigElement)4 Set (java.util.Set)4 DataStoreProviderException (com.sun.identity.plugin.datastore.DataStoreProviderException)3 NameIdentifier (com.sun.identity.saml.assertion.NameIdentifier)3 SAMLException (com.sun.identity.saml.common.SAMLException)3 FederationElement (com.sun.identity.wsfederation.jaxb.wsfederation.FederationElement)3 WSFederationMetaException (com.sun.identity.wsfederation.meta.WSFederationMetaException)3 Date (java.util.Date)3 SessionProvider (com.sun.identity.plugin.session.SessionProvider)2 Attribute (com.sun.identity.saml.assertion.Attribute)2