Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

ForbidAsync uses challenge schemes instead of forbid schemes #917

@davidfowl

Description

@davidfowl

While looking through the code I noticed that nothing uses the configured forbid schemes by default (GetDefaultForbidSchemeAsync).

public virtual async Task ForbidAsync(HttpContext context, string scheme, AuthenticationProperties properties)
{
if (scheme == null)
{
var defaultChallengeScheme = await Schemes.GetDefaultChallengeSchemeAsync();
scheme = defaultChallengeScheme?.Name;
if (scheme == null)
{
throw new InvalidOperationException($"No authenticationScheme was specified, and there was no DefaultChallengeScheme found.");
}
}

Seems like ForbidAsync should use the specificed ForbidScheme (if any).

/cc @HaoK

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions