No authenticationScheme was specified, and there was no DefaultChallengeScheme found with default authentification and custom authorization

前端 未结 5 720
滥情空心
滥情空心 2020-12-05 01:35

I have a .NET Core 2.0 app and have a problem with authorization. I want to use custom authorization with special requests. Header and standard default authentication. First

5条回答
  •  渐次进展
    2020-12-05 02:07

    Many answer above are correct but same time convoluted with other aspects of authN/authZ. What actually resolves the exception in question is this line:

    services.AddScheme(YourAuthenticationSchemeName, options =>
        {
            options.YourProperty = yourValue;
        })
    

提交回复
热议问题