From 85597d5b3cd54f78bd2afc8e8691f1aa34551a9d Mon Sep 17 00:00:00 2001 From: HOW-DELL Date: Wed, 3 Aug 2022 18:27:08 +0800 Subject: [PATCH] Simplified authorization --- JwtWebApiTutorial/Program.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/JwtWebApiTutorial/Program.cs b/JwtWebApiTutorial/Program.cs index cd6d235..1868dde 100644 --- a/JwtWebApiTutorial/Program.cs +++ b/JwtWebApiTutorial/Program.cs @@ -18,10 +18,11 @@ { options.AddSecurityDefinition("oauth2", new OpenApiSecurityScheme { - Description = "Standard Authorization header using the Bearer scheme (\"bearer {token}\")", + Description = "Standard Authorization header using the Bearer scheme", In = ParameterLocation.Header, Name = "Authorization", - Type = SecuritySchemeType.ApiKey + Type = SecuritySchemeType.Http, + Scheme = "Bearer" }); options.OperationFilter();