如何解析从SAML响应获得的值?
我想获取特定AttributeName的AttributeValue。
这样的东西。
<saml:Attribute AttributeName="FirstName" AttributeNamespace="http://schemas.xmlsoap.org/claims">
<saml:AttributeValue>MY FirstName</saml:AttributeValue>
</saml:Attribute>
请帮我。
提前致谢!
最佳答案
大多数Java应用程序都使用opensaml library来解析SAML请求和响应。使用opensaml解组后,您可以前往属性声明并提取值。还有一些SO question可能对您有帮助。