protected override async Task <bool> HandleUnauthorizedAsync(ChallengeContext context)
        {
            Response.StatusCode = 401;

            var unauthorizedContext = new BearerUnauthorizedContext(Context, Options);
            await Options.Events.Unauthorized(unauthorizedContext);

            return(true);
        }
示例#2
0
 public Task Unauthorized(BearerUnauthorizedContext context)
 {
     return(OnUnauthorized(context));
 }