Azure B2C自定义策略如何测试错误页面自定义屏幕 [英] Azure B2C custom policy how to test an error page custom screen

查看:58
本文介绍了Azure B2C自定义策略如何测试错误页面自定义屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的B2C环境中,我们正在使用自定义屏幕进行测试,以更改自定义策略中每个屏幕的用户界面.

In our B2C environment, we are testing using custom screens to change the user interface of each screen in our custom policies.

到目前为止,我已经能够更新它们并对其进行测试.但是,当涉及到错误页面时:

So far I have been able to update these and test them. However when it comes to the error page:

<ContentDefinition Id="api.error">
  <LoadUri>~/tenant/templates/AzureBlue/exception.cshtml</LoadUri>
  <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
  <DataUri>urn:com:microsoft:aad:b2c:elements:contract:globalexception:1.2.0</DataUri>
  <Metadata>
    <Item Key="DisplayName">Error page</Item>
  </Metadata>
</ContentDefinition>

我已经更新了LoadUri行以指向我们的自定义屏幕:

I have updated the LoadUri line to point to our custom screen:

<LoadUri>https://xxxxx.blob.core.windows.net/xxxxx/custom-error.html</LoadUri>

但是,我该如何测试显示的内容?对于其他屏幕,您可以逐步执行每个策略.但是错误屏幕仅应在发生相关错误时显示.我该如何发起错误才能做到这一点?

However, how can I go about testing what this displays? For the other screens it is possible as you step through each policy. But the error screen should only show when a relevant error occurs. How can I initiate an error to do this?

推荐答案

您可以通过转到授权"端点来测试错误"页面,而无需传递客户端ID.例如:

You can test the Error page by going to the Authorization endpoint without passing a client Id. For example:

https://mytenant.b2clogin.com/mytenant.onmicrosoft.com/B2C_1_signup_signin/oauth2/authorize

这篇关于Azure B2C自定义策略如何测试错误页面自定义屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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