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;
}
Aggregations