private String extractStatusCode(StatusCodeType statusCode) { if (statusCode == null || statusCode.getValue() == null) { return "UNKNOWN"; } if (Objects.equals(JBossSAMLURIConstants.STATUS_RESPONDER.get(), statusCode.getValue().toString())) { return extractStatusCode(statusCode.getStatusCode()); } return statusCode.getValue().toString(); } }
@Override public boolean challenge(HttpFacade exchange) { SamlAuthenticationError error = new SamlAuthenticationError(SamlAuthenticationError.Reason.ERROR_STATUS, responseType); exchange.getRequest().setError(error); exchange.getResponse().sendError(403); return true; }
@Override public boolean challenge(HttpFacade exchange) { SamlAuthenticationError error = new SamlAuthenticationError(SamlAuthenticationError.Reason.INVALID_SIGNATURE, statusResponse); exchange.getRequest().setError(error); exchange.getResponse().sendError(403); return true; }
@Override public boolean challenge(HttpFacade exchange) { SamlAuthenticationError error = new SamlAuthenticationError(SamlAuthenticationError.Reason.ERROR_STATUS, statusResponse); exchange.getRequest().setError(error); exchange.getResponse().sendError(403); return true; }
@Override public String toString() { return "SamlAuthenticationError [reason=" + reason + ", status=" + ((status == null || status.getStatus() == null) ? "UNKNOWN" : extractStatusCode(status.getStatus().getStatusCode())) + "]"; }
@Override public boolean challenge(HttpFacade exchange) { SamlAuthenticationError error = new SamlAuthenticationError(SamlAuthenticationError.Reason.INVALID_SIGNATURE, responseType); exchange.getRequest().setError(error); exchange.getResponse().sendError(403); return true; }
@Override public boolean challenge(HttpFacade exchange) { SamlAuthenticationError error = new SamlAuthenticationError(SamlAuthenticationError.Reason.EXTRACTION_FAILURE); exchange.getRequest().setError(error); exchange.getResponse().sendError(403); return true; }
@Override public boolean challenge(HttpFacade exchange) { SamlAuthenticationError error = new SamlAuthenticationError(SamlAuthenticationError.Reason.EXTRACTION_FAILURE); exchange.getRequest().setError(error); exchange.getResponse().sendError(403); return true; }