在服务提供商中使用自定义用户的Spring-SAML

我正在GitHub上使用vdenotaris Spring SAML2示例项目,并尝试插入我自己的UserDetailsS​​ervice来检查未维护的自定义角色和状态(例如,actIVE,DEactIVATED,LOCKED等)。由IdP提供。

我尝试与标记为DEactIVATED的用户一起将UserCache插入AuthenticationmanagerBuilder中(我希望这导致登录过程失败)。代码如下所示。

    @Autowired
    private DataSource dataSource;

    @Autowired
    private UserCache userDetailsService;

    @Override
    protected void configure(AuthenticationmanagerBuilder auth) throws Exception {
        auth
                .jdbcAuthentication()
                    .userCache(userDetailsService)
                    .dataSource(dataSource)
            .and()
                .authenticationProvider(samlAuthenticationProvider());
    }

我正在使用SSO圈子免费IDP。预期的结果是登录失败,但似乎登录成功。也许我应该改为扩展SAMLAuthenticationProvider类以包含我想要的内容?

lixb07072014 回答:在服务提供商中使用自定义用户的Spring-SAML

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3152434.html

大家都在问