throws ProcessingException, IOException {
IDPConfig idpConfig = (IDPConfig) WebUtils.getAttributeFromFlowScope(
context, IDP_CONFIG);
if (idpConfig == null) {
throw new ProcessingException("IDP configuration is null",
TYPE.BAD_REQUEST);
}
String whr = (String) WebUtils.getAttributeFromFlowScope(context,
FederationConstants.PARAM_HOME_REALM);
if (whr == null) {
throw new ProcessingException("Home realm is null",
TYPE.BAD_REQUEST);
}
String wresult = (String) WebUtils.getAttributeFromFlowScope(context,
FederationConstants.PARAM_RESULT);
if (wresult == null) {
throw new ProcessingException("No security token issued",
TYPE.BAD_REQUEST);
}
TrustedIDPConfig trustedIDPConfig = idpConfig.getTrustedIDPs().get(whr);
if (trustedIDPConfig == null) {
throw new ProcessingException(
"No trusted IDP config found for home realm " + whr,
TYPE.BAD_REQUEST);
}
FederationContext fedContext = getFederationContext(idpConfig,