azure-ad-b2c - Azure B2C 前提条件和检查空字符串
问题描述
有没有办法在编排步骤的前提条件步骤中检查声明是否设置为空字符串?
我已经尝试了以下方法,但它不起作用,它永远不会执行 SkipThisOrchestrationStep
<Precondition Type="ClaimEquals" ExecuteActionsIf="true">
<Value>readOnlyPhone</Value>
<Value></Value>
<Action>SkipThisOrchestrationStep</Action>
</Precondition>
</Preconditions>
此外,我也尝试使用 ClaimExists 但这也不起作用
<Preconditions>
<Precondition Type="ClaimsExists" ExecuteActionsIf="false">
<Value>readOnlyPhone</Value>
<Action>SkipThisOrchestrationStep</Action>
</Precondition>
</Preconditions>
背景,声明是由 RestfulProvider Technical Profile 设置的,API 将在有效负载中返回"phoneNumber": ""
解决方案
使用比较声明转换返回布尔值 https ://docs.microsoft.com/en-us/azure/active-directory-b2c/string-transformations#compareclaimtovalue
然后对这个布尔值使用 claimEqual 前提条件。
推荐阅读
- django - 使用 django-storages 和 boto3 在 Django 中调用 CreateMultipartUpload 操作时访问被拒绝
- pandas - Pandas:PyCharm 将名为“T”的 DataFrame 显示为 DataFrame 成员,是否排除使用“T”作为列名?
- javascript - 如果他可以编写自己的 Javascript,最终用户可以联系 SQL DB 吗?
- java - Websphere MQ 连接池
- c# - 查找相关对象
- date - 将 CURRENT_DATE 或 UNIX_TIMESTAMP 转换为 Hive 中的字符串(YYYY-DD-MM 格式)
- sql - 在连接表上使用任意布尔表达式进行查询
- visual-studio - Xamarin Forms Previewer 在 Visual Studio for Mac 中不起作用。给出错误消息:找不到与此 XAML 文件关联的基类
- c++ - 按给定字符串中出现的顺序打印字符及其频率,但我无法理解行“freq[str[i] - 'a']++;”
- javascript - 如何将此产品轮播更改为每项 1 行而不是每项 3 行?