Search in sources :

Example 1 with HTTPSOAP11Decoder

use of org.opensaml.saml.saml2.binding.decoding.impl.HTTPSOAP11Decoder in project cas by apereo.

the class ECPProfileHandlerController method decodeSoapRequest.

/**
     * Decode soap 11 context.
     *
     * @param request the request
     * @return the soap 11 context
     */
protected MessageContext decodeSoapRequest(final HttpServletRequest request) {
    try {
        final HTTPSOAP11Decoder decoder = new HTTPSOAP11Decoder();
        decoder.setParserPool(parserPool);
        decoder.setHttpServletRequest(request);
        final BindingDescriptor binding = new BindingDescriptor();
        binding.setId(getClass().getName());
        binding.setShortName(getClass().getName());
        binding.setSignatureCapable(true);
        binding.setSynchronous(true);
        decoder.setBindingDescriptor(binding);
        decoder.initialize();
        decoder.decode();
        return decoder.getMessageContext();
    } catch (final Exception e) {
        LOGGER.error(e.getMessage(), e);
    }
    return null;
}
Also used : BindingDescriptor(org.opensaml.saml.common.binding.BindingDescriptor) AuthenticationException(org.apereo.cas.authentication.AuthenticationException) HTTPSOAP11Decoder(org.opensaml.saml.saml2.binding.decoding.impl.HTTPSOAP11Decoder)

Aggregations

AuthenticationException (org.apereo.cas.authentication.AuthenticationException)1 BindingDescriptor (org.opensaml.saml.common.binding.BindingDescriptor)1 HTTPSOAP11Decoder (org.opensaml.saml.saml2.binding.decoding.impl.HTTPSOAP11Decoder)1