A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/dotnet-architecture/eShopOnContainers/issues/1423 below:

Why is "OpenIdConnect" in AuthenticationSchemes a string literal instead of a string constant? · Issue #1423 · dotnet-architecture/eShopOnContainers · GitHub

I can see this in the AccountController of the Web MVC project

[Authorize(AuthenticationSchemes = "OpenIdConnect")]
public class AccountController : Controller
{
    ...

I tried to search for an explanation for that and found this: https://docs.microsoft.com/en-us/aspnet/core/security/authorization/limitingidentitybyscheme?view=aspnetcore-3.1

But the example there uses constant strings, like JwtBearerDefaults.AuthenticationScheme, instead of a literal string, like "OpenIdConnect".

May I ask why that is the case? Is there no string constant for "OpenIdConnect"? How would one know which strings to put in there?

Thanks.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4