具有SAML2 B2C自定义策略的查询字符串声明解析器 [英] Query String Claims Resolver with SAML2 B2C Custom Policy

查看:58
本文介绍了具有SAML2 B2C自定义策略的查询字符串声明解析器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从SAML2依赖方请求中读取自定义查询字符串参数?

Is it possible to read a custom query string parameter from a SAML2 relying party request?.

使用{OAUTH-KV:any自定义查询字符串}无效.

Using the {OAUTH-KV:any custom query string} does not work.

示例:

https://mytest.b2clogin.com/mytest.onmicrosoft.com/B2C_1A_TEST_SAML/samlp/sso/login?myparameter = true

我需要阅读"myparameter"价值转化为索赔.

I need to read the "myparameter" value into a claim.

推荐答案

希望您正在尝试执行以下操作:

Hope you are trying to do the following:

<InputClaims>
   <InputClaim ClaimTypeReferenceId="givenName" DefaultValue="{OAUTH-KV:name}" />
 </InputClaims>

要从查询字符串中获取值,您必须配置技术资料的元数据并设置输入声明的 AlwaysUseDefaultValue 属性,如下所示:

To get the value from the query string you have to configure the metadata of the technical profile and set the AlwaysUseDefaultValue property of the input claim like the following:

      <Metadata>
        <Item Key="IncludeClaimResolvingInClaimsHandling">true</Item>
      </Metadata>

 <InputClaims>
   <InputClaim ClaimTypeReferenceId="givenName" AlwaysUseDefaultValue="true" DefaultValue="{OAUTH-KV:name}" />
 </InputClaims>

这篇关于具有SAML2 B2C自定义策略的查询字符串声明解析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆