Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure B2C自定义策略REST API-实现QueryString输入声明并处理JSON数组响应_Json_Azure_Rest_Azure Ad B2c - Fatal编程技术网

Azure B2C自定义策略REST API-实现QueryString输入声明并处理JSON数组响应

Azure B2C自定义策略REST API-实现QueryString输入声明并处理JSON数组响应,json,azure,rest,azure-ad-b2c,Json,Azure,Rest,Azure Ad B2c,我目前有一个在自定义策略中实现的RESTAPI,它运行良好。SendClaimsIn类型为Body,响应为JSON对象。有很多这样的例子来帮助我解决这个问题。但现在我有了第二个REST API调用,其格式如下: 根据我阅读的内容,我应该使用REST URL作为: 我应该使用SendClaimsIn类型的查询字符串。但是InputClaim应该是什么样的呢?我认为这会起作用,但我不确定(在本例中,signInName是一个电子邮件地址): ] 文档似乎表明我应该使用StringCollecti

我目前有一个在自定义策略中实现的RESTAPI,它运行良好。SendClaimsIn类型为Body,响应为JSON对象。有很多这样的例子来帮助我解决这个问题。但现在我有了第二个REST API调用,其格式如下:

根据我阅读的内容,我应该使用REST URL作为:

我应该使用SendClaimsIn类型的查询字符串。但是InputClaim应该是什么样的呢?我认为这会起作用,但我不确定(在本例中,signInName是一个电子邮件地址):

]

文档似乎表明我应该使用StringCollection声明转换,但我还没有找到一个例子清楚地说明如何使用上面的json格式实现转换。我在WAG上尝试过类似的方法,但我没有看到错误,也没有看到API应该返回的任何参数:

        <OutputClaim ClaimTypeReferenceId="displayName" PartnerClaimType="[0].commonName"/>
        <OutputClaim ClaimTypeReferenceId="givenName" PartnerClaimType="[0].firstName"/>
        <OutputClaim ClaimTypeReferenceId="surname" PartnerClaimType="[0].lastName"/>


因此,如果有人能在“QueryString”的格式和引用返回的JSON的方式上填写空白,我将不胜感激。

谢谢@Pete,请遵循文档中提到的这些示例。
    "commonName": "Pete",
    "firstName": "Pete",
    "lastName": "Helgren"
}
        <OutputClaim ClaimTypeReferenceId="displayName" PartnerClaimType="[0].commonName"/>
        <OutputClaim ClaimTypeReferenceId="givenName" PartnerClaimType="[0].firstName"/>
        <OutputClaim ClaimTypeReferenceId="surname" PartnerClaimType="[0].lastName"/>