private Principal handleSAMLResponse(ResponseType responseType, SAML2HandlerResponse response)
throws ProcessingException {
if (responseType == null)
throw logger.nullArgumentError("response type");
StatusType statusType = responseType.getStatus();
if (statusType == null)
throw logger.nullArgumentError("Status Type from the IDP");
String statusValue = statusType.getStatusCode().getValue().toASCIIString();
if (JBossSAMLURIConstants.STATUS_SUCCESS.get().equals(statusValue) == false)
throw logger.samlHandlerIDPAuthenticationFailedError();
List<RTChoiceType> assertions = responseType.getAssertions();
if (assertions.size() == 0)