1

我对nuget示例中描述的功能有疑问,尤其是在核心和角度方面。我有一个带有 angular4 的前面,所有请求都通过那里。我用它重定向到 Idp 表单,他再次打电话给我向我传递断言。如何使用 angular 捕获 saml 响应以将其传递回 AssertionConsumerService 方法并获取声明?

更新:我试图将调用直接传递到后面,现在在恢复声明时出现以下错误:{“error”:“IDX13102:读取 Saml2SecurityToken 的 'AuthnContext' 时引发异常。内部异常:'System.ArgumentException:IDX13300: 'value' 必须是绝对 Uri,在 C:\agent1\_work\109\s\src\Microsoft 中的 Microsoft.IdentityModel.Tokens.Saml2.Saml2AuthenticationContext.set_ClassReference(Uri value) 处为:'XXX'\r\n。 IdentityModel.Tokens.Saml\Saml2\Saml2AuthenticationContext.cs:line 108\r\n 在 Microsoft.IdentityModel.Tokens.Saml2.Saml2AuthenticationContext..ctor(Uri classReference, Uri declarationReference) 在 C:\agent1\_work\109\s\ src\Microsoft.IdentityModel.Tokens.Saml\Saml2\Saml2AuthenticationContext.cs:第 77 行\r\n 在 Microsoft.IdentityModel.Tokens.Saml2.Saml2Serializer。C:\agent1\_work\109\s\src\Microsoft.IdentityModel.Tokens.Saml\Saml2\Saml2Serializer.cs:line 661' 中的 ReadAuthenticationContext(XmlDictionaryReader 阅读器)。"}

有任何想法吗?

4

1 回答 1

1

恐怕不可能通过前端客户端 lige 传递响应,例如 Angular。响应需要通过重定向或发布直接返回到 AssertionConsumerService 端点。在 AssertionConsumerService 端点接受 Authn 响应(SAML 2.0 令牌)后,您可以加载 Angular 客户端。

于 2020-02-07T10:09:13.577 回答