如何在内的属性交换期间提供多个 URI 作为类型值security-context.xml 中的标签?
我正在使用 Spring Security 3.0.5 在我正在处理的网站中提供身份验证和授权...用于访问我定义如下的电子邮件属性...
现在我想为所有三种属性类型提供支持 所有三个类型。我如何提供对多个属性的支持。
谢谢,
I am using Spring Security 3.0.5 to provide the authentication and authorization in the web site I am working on... for accessing email attribute I have defined as follows...<security:openid-attribute name="email" type="http://schema.openid.net/contact/email" required="true" count="2"/>
Now I want to provide the support for all the three attribute types All the three types. How can I provide support for multiple attributes.
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果没有一些相对广泛的定制,您所描述的内容在 Spring Security 3.0.5 中实际上是不可能的。我可以想到几个选项:
为每个可能的架构组合创建不同的
openid-attribute
映射。例如:此选项的痛苦在于,当您尝试使用这些属性执行某些操作时,您需要查看 3 个不同的属性值。
使用 Spring Security 3.1 功能支持每个
openid-attribute
元素上的identifier-matcher
来缩小 OpenID 提供者对特定模式的使用范围。这样做的好处是,您可能只使用单个属性名称,并期望identifier-matcher
功能选择正确的属性名称。缺点是您需要做一些功课来确定哪些 OpenID 提供商支持哪些架构和属性。不幸的是,这两种情况都不是一个很好的解决方案 - 欢迎来到 OpenID AX 的世界:)
Without some relatively extensive customization, what you describe isn't really possible in Spring Security 3.0.5. You have a couple options that I can think of:
Create different
openid-attribute
mappings for each possible schema combination. For example:The pain of this option is that you would need to look at 3 different attribute values when you are trying to do something with these attributes.
Use the Spring Security 3.1 functionality supporting
identifier-matcher
on eachopenid-attribute
element to narrow the use of particular schemas by OpenID provider. The benefit of this is that you could potentially use only a single attribute name, and expect theidentifier-matcher
functionality to pick the right one. The downside is that you will need to do the homework of figuring out which OpenID providers support which schemas and attributes.Unfortunately, not a great solution in either case - welcome to the world of OpenID AX :)