【问题标题】:SAMLAuthenticationProvider doesnot maintain the "details" information that is received in the Authentication objectSAMLAuthenticationProvider 不维护在 Authentication 对象中接收到的“详细信息”信息
【发布时间】:2016-11-03 01:31:08
【问题描述】:

目前我在使用 SAMLAUthenticationProvider 时观察到以下行为。在“authenticate”方法中,有这一行: ExpiringAuthenticationToken result = .... //这里初始化这个对象 结果.setDetails(userDetails); 我在这里面临的问题是,如果我在传入的身份验证对象中设置了一个“详细信息”对象,那么该信息不会传递回我的应用程序。但对于其他身份验证提供程序,例如 abstractldapprovider、abstractuserdetialsauthenticationprovider,情况并非如此。在这些提供程序中,createsuccessfulauthentication() 将附加的“详细信息”信息从父身份验证对象保留/复制到新的身份验证对象。

有没有办法用 SAMLAuthenticationProvider 实现同样的事情。目前我可以看到“覆盖”整个身份验证方法并为所有 saml 处理调用 super.authenticate,只需更改 setDetails 行即可实现此目的。

如果有更好的解决方案,请告诉我。

【问题讨论】:

    标签: spring-saml


    【解决方案1】:

    每个身份提供者都有自己的规则来为经过身份验证的用户传回详细信息。

    例如,在 SSOCircle 中,必须在添加新的服务提供者时设置属性。转到“Manage Matadata”,然后单击“Add new Service Provider”,然后检查要包含在它发回的断言中的属性。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-06
      • 2023-04-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多