如何禁用身份验证进行测试?

时间:2020-02-27 22:28:29

标签: asp.net-mvc authentication asp.net-core asp.net-core-3.0

在Startup.cs> ConfigureServices方法中,我已实现身份验证:

services.AddAuthentication(sharedOptions =>
{
    //scheme options
})
.AddWsFederation(options =>
{
    // wsfed options with ADFS
})
.AddCookie(options =>
{
    // cookie ooptions
});

我无法在本地测试代码,因为它要求我向存在[Authorize]操作过滤器的ADFS进行身份验证。

我可以实现哪些方法,以便在开发中跳过身份验证,而在生产中需要它?

0 个答案:

没有答案