![](/img/trans.png)
[英]How to pass and validate the signInEmail claim during External IDP login using Azure B2C custom policy?
[英]How to appy string transformation for azure b2c idp url usin claim resolver
用例:作為一名開發人員,我想從 b2c idp url 中提取 redirect_uri,然后應用聲明轉換,最好是一個字符串,以提取某些信息並使用它在內容定義下構建 loadURi 並動態顯示 html 頁面
從上面的redirect_uri = https://something.somedomain.com--使用聲明轉換我想提取somedomain
<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://docs.microsoft.com/en-us/azure/active-directory-b2c/string-transformations
其中,對字符串比較、聲明轉換、變更案例、比較等場景進行了詳細說明。
此外,請參閱以下聲明解析器文檔鏈接,該鏈接解釋了直接登錄和其他場景的技術配置文件中包含的各種參數:-
https://docs.microsoft.com/en-us/azure/active-directory-b2c/claim-resolver-overview
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.