protected override async Task <bool> HandleUnauthorizedAsync(ChallengeContext context) { Response.StatusCode = 401; var unauthorizedContext = new BearerUnauthorizedContext(Context, Options); await Options.Events.Unauthorized(unauthorizedContext); return(true); }
public Task Unauthorized(BearerUnauthorizedContext context) { return(OnUnauthorized(context)); }