Created
June 21, 2022 19:37
-
-
Save mxmissile/572cb93da56650d7f58b069069970510 to your computer and use it in GitHub Desktop.
api auth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
builder.Services.Configure<JwtBearerOptions>(options => | |
{ | |
options.Events.OnChallenge += OnChallenge; | |
}); | |
builder.Services.AddAuthentication().AddMicrosoftIdentityWebApi(builder.Configuration); | |
async Task OnChallenge(JwtBearerChallengeContext context) | |
{ | |
Debug.WriteLine("hit me"); | |
await Task.CompletedTask.ConfigureAwait(false); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment