use of org.opensaml.saml.saml2.core.StatusCode in project verify-hub by alphagov.
the class StatusMessageBuilder method build.
public StatusMessage build() {
StatusMessage statusCode = openSamlXmlObjectFactory.createStatusMessage();
statusCode.setMessage(message);
return statusCode;
}
use of org.opensaml.saml.saml2.core.StatusCode in project verify-hub by alphagov.
the class ProtectiveMonitoringLogFormatter method formatAuthnResponse.
public String formatAuthnResponse(Response samlResponse, Direction direction, SignatureStatus signatureStatus) {
Issuer issuer = samlResponse.getIssuer();
String issuerString = issuer != null ? issuer.getValue() : "";
Status status = samlResponse.getStatus();
StatusCode subStatusCode = status.getStatusCode().getStatusCode();
String subStatus = subStatusCode != null ? subStatusCode.getValue() : "";
return String.format(AUTHN_RESPONSE, samlResponse.getID(), samlResponse.getInResponseTo(), direction, samlResponse.getDestination(), issuerString, signatureStatus.valid(), status.getStatusCode().getValue(), subStatus, getStatusDetailValues(status));
}
use of org.opensaml.saml.saml2.core.StatusCode in project ddf by codice.
the class SamlProtocol method createStatus.
public static Status createStatus(String statusValue) {
Status status = statusBuilder.buildObject();
StatusCode statusCode = statusCodeBuilder.buildObject();
statusCode.setValue(statusValue);
status.setStatusCode(statusCode);
return status;
}
use of org.opensaml.saml.saml2.core.StatusCode in project verify-hub by alphagov.
the class ProtectiveMonitoringLogFormatter method formatAuthnResponse.
public String formatAuthnResponse(Response samlResponse, Direction direction, Boolean validSignature) {
Issuer issuer = samlResponse.getIssuer();
String issuerString = issuer != null ? issuer.getValue() : "";
Status status = samlResponse.getStatus();
StatusCode subStatusCode = status.getStatusCode().getStatusCode();
String subStatus = subStatusCode != null ? subStatusCode.getValue() : "";
return String.format(AUTHN_RESPONSE, samlResponse.getID(), samlResponse.getInResponseTo(), direction, samlResponse.getDestination(), issuerString, validSignature, status.getStatusCode().getValue(), subStatus, getStatusDetailValues(status));
}
use of org.opensaml.saml.saml2.core.StatusCode in project cxf by apache.
the class SAML2PResponseComponentBuilder method createStatus.
@SuppressWarnings("unchecked")
public static Status createStatus(String statusCodeValue, String statusMessage) {
if (statusBuilder == null) {
statusBuilder = (SAMLObjectBuilder<Status>) builderFactory.getBuilder(Status.DEFAULT_ELEMENT_NAME);
}
if (statusCodeBuilder == null) {
statusCodeBuilder = (SAMLObjectBuilder<StatusCode>) builderFactory.getBuilder(StatusCode.DEFAULT_ELEMENT_NAME);
}
if (statusMessageBuilder == null) {
statusMessageBuilder = (SAMLObjectBuilder<StatusMessage>) builderFactory.getBuilder(StatusMessage.DEFAULT_ELEMENT_NAME);
}
Status status = statusBuilder.buildObject();
StatusCode statusCode = statusCodeBuilder.buildObject();
statusCode.setValue(statusCodeValue);
status.setStatusCode(statusCode);
if (statusMessage != null) {
StatusMessage statusMessageObject = statusMessageBuilder.buildObject();
statusMessageObject.setMessage(statusMessage);
status.setStatusMessage(statusMessageObject);
}
return status;
}
Aggregations