用例:作为一名开发人员,我想从 b2c idp url 中提取redirect_uri,然后应用声明转换(最好是字符串一)来提取某些信息,并使用它在内容定义下构建 loadURI 并动态显示 html 页面
从上面的redirect_uri = https://something.somedomain.com--使用声明转换我想提取somedomain
调用依赖方.xml中的参数如下
<DefaultUserJourney ReferenceId="SignUpOrSignIn" />
<UserJourneyBehaviors>
<ContentDefinitionParameters>
<Parameter Name="redirect_uri">{OIDC:RedirectUri}</Parameter>
</ContentDefinitionParameters>```
Build the LoadUri in contentdefinition of api.selfasserted
```<ContentDefinition Id="api.selfasserted">
<LoadUri>https://somestoragaccount/{OIDC:RedirectUri}/unified.html</LoadUri>
<RecoveryUri>~/common/default_page_error.html</RecoveryUri>
<DataUri>urn:com:microsoft:aad:b2c:elements:contract:selfasserted:2.0.0</DataUri>
<Metadata>
<Item Key="DisplayName">Collect information from user page</Item>
</Metadata>
</ContentDefinition>
• 我建议您参考以下文档中所述的字符串声明转换,供您参考:-
https://learn.microsoft.com/en-us/azure/active-directory-b2c/string-transformations
其中详细讲解了字符串比较、声明转换、变更案例、比较等场景。
另请参阅以下声明解析程序文档链接,其中解释了直接登录和其他场景的技术配置文件中包含的各种参数:-
https://learn.microsoft.com/en-us/azure/active-directory-b2c/claim-resolver-overview