Java Code Examples for org.opensaml.saml2.core.Status#setStatusMessage()
The following examples show how to use
org.opensaml.saml2.core.Status#setStatusMessage() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultResponseBuilder.java From carbon-identity with Apache License 2.0 | 6 votes |
private Status buildStatus(String status, String statMsg) { Status stat = new StatusBuilder().buildObject(); // Set the status code StatusCode statCode = new StatusCodeBuilder().buildObject(); statCode.setValue(status); stat.setStatusCode(statCode); // Set the status Message if (statMsg != null) { StatusMessage statMesssage = new StatusMessageBuilder().buildObject(); statMesssage.setMessage(statMsg); stat.setStatusMessage(statMesssage); } return stat; }
Example 2
Source File: SingleLogoutMessageBuilder.java From carbon-identity with Apache License 2.0 | 6 votes |
private Status buildStatus(String status, String statMsg) { Status stat = new StatusBuilder().buildObject(); //Set the status code StatusCode statCode = new StatusCodeBuilder().buildObject(); statCode.setValue(status); stat.setStatusCode(statCode); //Set the status Message if (statMsg != null) { StatusMessage statMesssage = new StatusMessageBuilder().buildObject(); statMesssage.setMessage(statMsg); stat.setStatusMessage(statMesssage); } return stat; }
Example 3
Source File: SAMLResponseBuilder.java From carbon-identity with Apache License 2.0 | 6 votes |
/** * Get status * * @param status * @param statMsg * @return Status object */ private Status buildStatus(String status, String statMsg) { Status stat = new StatusBuilder().buildObject(); // Set the status code StatusCode statCode = new StatusCodeBuilder().buildObject(); statCode.setValue(status); stat.setStatusCode(statCode); // Set the status Message if (statMsg != null) { StatusMessage statMesssage = new StatusMessageBuilder().buildObject(); statMesssage.setMessage(statMsg); stat.setStatusMessage(statMesssage); } return stat; }
Example 4
Source File: StatusUnmarshaller.java From lams with GNU General Public License v2.0 | 5 votes |
/** {@inheritDoc} */ protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) throws UnmarshallingException { Status status = (Status) parentSAMLObject; if (childSAMLObject instanceof StatusCode) { status.setStatusCode((StatusCode) childSAMLObject); } else if (childSAMLObject instanceof StatusMessage) { status.setStatusMessage((StatusMessage) childSAMLObject); } else if (childSAMLObject instanceof StatusDetail) { status.setStatusDetail((StatusDetail) childSAMLObject); } else { super.processChildElement(parentSAMLObject, childSAMLObject); } }
Example 5
Source File: ErrorResponseBuilder.java From carbon-identity with Apache License 2.0 | 5 votes |
/** * Set the StatusMessage for Status of Response * * @param statusMsg * @return */ private Status buildStatusMsg(Status status, String statusMsg) { if (statusMsg != null) { StatusMessage statusMesssage = new StatusMessageBuilder().buildObject(); statusMesssage.setMessage(statusMsg); status.setStatusMessage(statusMesssage); } return status; }
Example 6
Source File: ErrorResponseBuilder.java From carbon-identity with Apache License 2.0 | 5 votes |
private static Status buildStatus() { Status stat = new StatusBuilder().buildObject(); //Set the status code StatusCode statCode = new StatusCodeBuilder().buildObject(); statCode.setValue("urn:oasis:names:tc:SAML:2.0:status:Responder"); stat.setStatusCode(statCode); StatusMessage statMesssage = new StatusMessageBuilder().buildObject(); statMesssage.setMessage("Error when processing the Authentication Request"); stat.setStatusMessage(statMesssage); return stat; }
Example 7
Source File: StatusGenerator.java From MaxKey with Apache License 2.0 | 4 votes |
public Status generateStatus( String value, String subStatus, String message ) { Status status = builderStatus(); StatusCode statusCode = builderStatusCode(value); StatusCode subStatusCode =builderStatusCode(value); statusCode.setStatusCode(subStatusCode); status.setStatusCode(statusCode); StatusMessage statusMessage = builderStatusMessage(message); status.setStatusMessage(statusMessage); return status; }