Fix comment in minimal APIs AuthN sample

Move the comment about requiring the JwtBearer package to the sample that actually uses JwtBearer.
pull/28241/head
Damian Edwards 2023-01-30 11:06:41 -08:00 committed by GitHub
parent b04c7cdb06
commit 63e40a0bd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,6 @@
#elif FIRST #elif FIRST
// <snippet_1> // <snippet_1>
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
// Requires Microsoft.AspNetCore.Authentication.JwtBearer
builder.Services.AddAuthentication(); builder.Services.AddAuthentication();
var app = builder.Build(); var app = builder.Build();
@ -13,6 +12,7 @@ app.Run();
#elif JWT1 #elif JWT1
// <snippet_jwt1> // <snippet_jwt1>
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
// Requires Microsoft.AspNetCore.Authentication.JwtBearer
builder.Services.AddAuthentication().AddJwtBearer(); builder.Services.AddAuthentication().AddJwtBearer();
var app = builder.Build(); var app = builder.Build();