@Override
protected void doDecode(MessageContext messageContext) throws MessageDecodingException {
if (!(messageContext instanceof SAMLMessageContext)) {
log.error("Invalid message context type, this decoder only support SAMLMessageContext");
throw new MessageDecodingException(
"Invalid message context type, this decoder only support SAMLMessageContext");
}
org.springframework.security.saml.context.SAMLMessageContext samlMessageContext = (org.springframework.security.saml.context.SAMLMessageContext) messageContext;
if (!(samlMessageContext.getInboundMessageTransport() instanceof HTTPInTransport)) {
log.error("Invalid inbound message transport type, this decoder only support HTTPInTransport");
throw new MessageDecodingException("Invalid inbound message transport type, this decoder only support HTTPInTransport");
}
HTTPInTransport inTransport = (HTTPInTransport) samlMessageContext.getInboundMessageTransport();
HTTPOutTransport outTransport = (HTTPOutTransport) samlMessageContext.getOutboundMessageTransport();
/*
* Artifact parameter.
*/
String artifactId = DatatypeHelper.safeTrimOrNullString(inTransport.getParameterValue("SAMLart"));
if (artifactId == null) {
log.error("SAMLart parameter was missing or did not contain a value.");
throw new MessageDecodingException("SAMLArt parameter was missing or did not contain a value.");
}
log.debug("Artifact id: {}", artifactId);
/*