SAML Http Request Intercept with Spring Boot

前端 未结 3 994
南笙
南笙 2021-01-12 13:57

In reference to this SO question Add request parameter to SAML request using Spring Security SAML

I am wanting to replace the default HTTPRedirectDeflateBinding bean

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-12 14:43

    You can redeclare the SAMLProcessor bean - which is used by SAMLProcessingFilter - and add your own binding bean in its bindings list. This is an example, I used in my project.

    @Bean
    public SAMLProcessorImpl processor() {
        Collection bindings = new ArrayList<>();
        bindings.add(httpRedirectDeflateBinding());
        bindings.add(httpPostBinding());
        bindings.add(artifactBinding(parserPool(), velocityEngine()));
        bindings.add(httpSOAP11Binding());
        bindings.add(httpPAOS11Binding());
    
        return new SAMLProcessorImpl(bindings);
    }
    

    Hope it works for you.

提交回复
热议问题