Skip to content

Commit e261423

Browse files
authored
7.0.0
- net7.0 support added - Information log on handler is changed to Debug log when Authorization header is not found on the request - Added package validations - Readme updated - Readme added to package
1 parent 2efd63e commit e261423

13 files changed

+323
-26
lines changed

.github/workflows/codeql-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Setup .NET Core SDK
3636
uses: actions/setup-dotnet@v1.9.0
3737
with:
38-
dotnet-version: 6.0.101
38+
dotnet-version: 7.0.100
3939

4040
# Initializes the CodeQL tools for scanning.
4141
- name: Initialize CodeQL

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Easy to use and very light weight Microsoft style Basic Scheme Authentication Im
77

88
## .NET (Core) Frameworks Supported
99
.NET Framework 4.6.1 and/or NetStandard 2.0 onwards
10-
Multi targeted: net6.0; net5.0; netcoreapp3.1; netcoreapp3.0; netstandard2.0; net461
10+
Multi targeted: net7.0; net6.0; net5.0; netcoreapp3.1; netcoreapp3.0; netstandard2.0; net461
1111

1212
<br/>
1313

@@ -300,6 +300,7 @@ public void ConfigureServices(IServiceCollection services)
300300
## Release Notes
301301
| Version | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Notes |
302302
|---------|-------|
303+
|7.0.0 | <ul><li>net7.0 support added</li><li>Information log on handler is changed to Debug log when Authorization header is not found on the request</li><li>Added package validations</li><li>Sample project for net7.0 added</li><li>Readme updated</li><li>Readme added to package</li></ul> |
303304
|6.0.1 | <ul><li>net6.0 support added</li><li>Information log on handler is changed to Debug log when IgnoreAuthenticationIfAllowAnonymous is enabled [#9](https://github.com/mihirdilip/aspnetcore-authentication-basic/issues/9)</li><li>Sample project added</li><li>Readme updated</li><li>Copyright year updated on License</li></ul> |
304305
|5.1.0 | <ul><li>Visibility of the handler changed to public</li><li>Tests added</li><li>Readme updated</li><li>Copyright year updated on License</li></ul> |
305306
|5.0.0 | <ul><li>Net 5.0 target framework added</li><li>IgnoreAuthenticationIfAllowAnonymous added to the BasicOptions from netcoreapp3.0 onwards</li></ul> |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using Microsoft.AspNetCore.Mvc;
2+
using System.Text;
3+
4+
namespace SampleWebApi_7_0.Controllers
5+
{
6+
[Route("api/[controller]")]
7+
[ApiController]
8+
public class ValuesController : ControllerBase
9+
{
10+
// GET api/values
11+
[HttpGet]
12+
public ActionResult<IEnumerable<string>> Get()
13+
{
14+
return new string[] { "value1", "value2" };
15+
}
16+
17+
[HttpGet("claims")]
18+
public ActionResult<string> Claims()
19+
{
20+
var sb = new StringBuilder();
21+
foreach (var claim in User.Claims)
22+
{
23+
sb.AppendLine($"{claim.Type}: {claim.Value}");
24+
}
25+
return sb.ToString();
26+
}
27+
28+
[HttpGet("forbid")]
29+
public new IActionResult Forbid()
30+
{
31+
return base.Forbid();
32+
}
33+
}
34+
}

samples/SampleWebApi_7_0/Program.cs

+157
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
using AspNetCore.Authentication.Basic;
2+
using Microsoft.AspNetCore.Authorization;
3+
using SampleWebApi.Repositories;
4+
using SampleWebApi.Services;
5+
6+
var builder = WebApplication.CreateBuilder(args);
7+
8+
// Add User repository to the dependency container.
9+
builder.Services.AddTransient<IUserRepository, InMemoryUserRepository>();
10+
11+
// Add the Basic scheme authentication here..
12+
// It requires Realm to be set in the options if SuppressWWWAuthenticateHeader is not set.
13+
// If an implementation of IBasicUserValidationService interface is registered in the dependency register as well as OnValidateCredentials delegete on options.Events is also set then this delegate will be used instead of an implementation of IBasicUserValidationService.
14+
builder.Services.AddAuthentication(BasicDefaults.AuthenticationScheme)
15+
16+
// The below AddBasic without type parameter will require OnValidateCredentials delegete on options.Events to be set unless an implementation of IBasicUserValidationService interface is registered in the dependency register.
17+
// Please note if both the delgate and validation server are set then the delegate will be used instead of BasicUserValidationService.
18+
//.AddBasic(options =>
19+
20+
// The below AddBasic with type parameter will add the BasicUserValidationService to the dependency register.
21+
// Please note if OnValidateCredentials delegete on options.Events is also set then this delegate will be used instead of BasicUserValidationService.
22+
.AddBasic<BasicUserValidationService>(options =>
23+
{
24+
options.Realm = "Sample Web API";
25+
26+
//// Optional option to suppress the browser login dialog for ajax calls.
27+
//options.SuppressWWWAuthenticateHeader = true;
28+
29+
//// Optional option to ignore authentication if AllowAnonumous metadata/filter attribute is added to an endpoint.
30+
//options.IgnoreAuthenticationIfAllowAnonymous = true;
31+
32+
//// Optional events to override the basic original logic with custom logic.
33+
//// Only use this if you know what you are doing at your own risk. Any of the events can be assigned.
34+
options.Events = new BasicEvents
35+
{
36+
37+
//// A delegate assigned to this property will be invoked just before validating credentials.
38+
//OnValidateCredentials = async (context) =>
39+
//{
40+
// // custom code to handle credentials, create principal and call Success method on context.
41+
// var userRepository = context.HttpContext.RequestServices.GetRequiredService<IUserRepository>();
42+
// var user = await userRepository.GetUserByUsername(context.Username);
43+
// var isValid = user != null && user.Password == context.Password;
44+
// if (isValid)
45+
// {
46+
// context.Response.Headers.Add("ValidationCustomHeader", "From OnValidateCredentials");
47+
// var claims = new[]
48+
// {
49+
// new Claim(ClaimTypes.NameIdentifier, context.Username, ClaimValueTypes.String, context.Options.ClaimsIssuer),
50+
// new Claim(ClaimTypes.Name, context.Username, ClaimValueTypes.String, context.Options.ClaimsIssuer),
51+
// new Claim("CustomClaimType", "Custom Claim Value - from OnValidateCredentials")
52+
// };
53+
// context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name));
54+
// context.Success();
55+
// }
56+
// else
57+
// {
58+
// context.NoResult();
59+
// }
60+
//},
61+
62+
//// A delegate assigned to this property will be invoked just before validating credentials.
63+
//// NOTE: Same as above delegate but slightly different implementation which will give same result.
64+
//OnValidateCredentials = async (context) =>
65+
//{
66+
// // custom code to handle credentials, create principal and call Success method on context.
67+
// var userRepository = context.HttpContext.RequestServices.GetRequiredService<IUserRepository>();
68+
// var user = await userRepository.GetUserByUsername(context.Username);
69+
// var isValid = user != null && user.Password == context.Password;
70+
// if (isValid)
71+
// {
72+
// context.Response.Headers.Add("ValidationCustomHeader", "From OnValidateCredentials");
73+
// var claims = new[]
74+
// {
75+
// new Claim("CustomClaimType", "Custom Claim Value - from OnValidateCredentials")
76+
// };
77+
// context.ValidationSucceeded(claims); // claims are optional
78+
// }
79+
// else
80+
// {
81+
// context.ValidationFailed();
82+
// }
83+
//},
84+
85+
//// A delegate assigned to this property will be invoked before a challenge is sent back to the caller when handling unauthorized response.
86+
//OnHandleChallenge = async (context) =>
87+
//{
88+
// // custom code to handle authentication challenge unauthorized response.
89+
// context.Response.StatusCode = StatusCodes.Status401Unauthorized;
90+
// context.Response.Headers.Add("ChallengeCustomHeader", "From OnHandleChallenge");
91+
// await context.Response.WriteAsync("{\"CustomBody\":\"From OnHandleChallenge\"}");
92+
// context.Handled(); // important! do not forget to call this method at the end.
93+
//},
94+
95+
//// A delegate assigned to this property will be invoked if Authorization fails and results in a Forbidden response.
96+
//OnHandleForbidden = async (context) =>
97+
//{
98+
// // custom code to handle forbidden response.
99+
// context.Response.StatusCode = StatusCodes.Status403Forbidden;
100+
// context.Response.Headers.Add("ForbidCustomHeader", "From OnHandleForbidden");
101+
// await context.Response.WriteAsync("{\"CustomBody\":\"From OnHandleForbidden\"}");
102+
// context.Handled(); // important! do not forget to call this method at the end.
103+
//},
104+
105+
//// A delegate assigned to this property will be invoked when the authentication succeeds. It will not be called if OnValidateCredentials delegate is assigned.
106+
//// It can be used for adding claims, headers, etc to the response.
107+
//OnAuthenticationSucceeded = (context) =>
108+
//{
109+
// //custom code to add extra bits to the success response.
110+
// context.Response.Headers.Add("SuccessCustomHeader", "From OnAuthenticationSucceeded");
111+
// var customClaims = new List<Claim>
112+
// {
113+
// new Claim("CustomClaimType", "Custom Claim Value - from OnAuthenticationSucceeded")
114+
// };
115+
// context.AddClaims(customClaims);
116+
// //or can add like this - context.Principal.AddIdentity(new ClaimsIdentity(customClaims));
117+
// return Task.CompletedTask;
118+
//},
119+
120+
//// A delegate assigned to this property will be invoked when the authentication fails.
121+
//OnAuthenticationFailed = (context) =>
122+
//{
123+
// // custom code to handle failed authentication.
124+
// context.Fail("Failed to authenticate");
125+
// return Task.CompletedTask;
126+
//}
127+
128+
};
129+
});
130+
131+
builder.Services.AddControllers(options =>
132+
{
133+
// ALWAYS USE HTTPS (SSL) protocol in production when using ApiKey authentication.
134+
//options.Filters.Add<RequireHttpsAttribute>();
135+
136+
}); //.AddXmlSerializerFormatters() // To enable XML along with JSON;
137+
138+
// All the requests will need to be authorized.
139+
// Alternatively, add [Authorize] attribute to Controller or Action Method where necessary.
140+
builder.Services.AddAuthorization(options =>
141+
{
142+
options.FallbackPolicy = new AuthorizationPolicyBuilder()
143+
.RequireAuthenticatedUser()
144+
.Build();
145+
});
146+
147+
var app = builder.Build();
148+
149+
app.UseHttpsRedirection();
150+
151+
app.UseAuthentication(); // NOTE: DEFAULT TEMPLATE DOES NOT HAVE THIS, THIS LINE IS REQUIRED AND HAS TO BE ADDED!!!
152+
153+
app.UseAuthorization();
154+
155+
app.MapControllers();
156+
157+
app.Run();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://json.schemastore.org/launchsettings.json",
3+
"iisSettings": {
4+
"windowsAuthentication": false,
5+
"anonymousAuthentication": true,
6+
"iisExpress": {
7+
"applicationUrl": "http://localhost:3920",
8+
"sslPort": 44304
9+
}
10+
},
11+
"profiles": {
12+
"IIS Express": {
13+
"commandName": "IISExpress",
14+
"launchBrowser": true,
15+
"launchUrl": "api/values",
16+
"environmentVariables": {
17+
"ASPNETCORE_ENVIRONMENT": "Development"
18+
}
19+
}
20+
}
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net7.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
</PropertyGroup>
8+
9+
<Import Project="..\SampleWebApi.Shared\SampleWebApi.Shared.projitems" Label="Shared" />
10+
11+
<ItemGroup>
12+
<PackageReference Include="AspNetCore.Authentication.Basic" Version="7.0.0" />
13+
</ItemGroup>
14+
15+
<!--<ItemGroup>
16+
<ProjectReference Include="..\..\src\AspNetCore.Authentication.Basic\AspNetCore.Authentication.Basic.csproj" />
17+
</ItemGroup>-->
18+
19+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning"
6+
}
7+
}
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning"
6+
}
7+
},
8+
"AllowedHosts": "*"
9+
}

src/AspNetCore.Authentication.Basic.sln

+17-9
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F7494366-E
3131
EndProject
3232
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNetCore.Authentication.Basic.Tests", "..\test\AspNetCore.Authentication.Basic.Tests\AspNetCore.Authentication.Basic.Tests.csproj", "{335B0D1F-A428-4D2E-AF87-269C75F5F138}"
3333
EndProject
34-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleWebApi_6_0", "..\samples\SampleWebApi_6_0\SampleWebApi_6_0.csproj", "{9232DA41-CA69-4FE3-B0C9-D8D85FEC272A}"
34+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleWebApi_6_0", "..\samples\SampleWebApi_6_0\SampleWebApi_6_0.csproj", "{9232DA41-CA69-4FE3-B0C9-D8D85FEC272A}"
35+
EndProject
36+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleWebApi_7_0", "..\samples\SampleWebApi_7_0\SampleWebApi_7_0.csproj", "{D5C8BCC5-C997-475E-9E71-5BF807294BB6}"
3537
EndProject
3638
Global
37-
GlobalSection(SharedMSBuildProjectFiles) = preSolution
38-
..\samples\SampleWebApi.Shared\SampleWebApi.Shared.projitems*{0801aed9-ea38-4e7e-af4d-26e9b67e5254}*SharedItemsImports = 5
39-
..\samples\SampleWebApi.Shared\SampleWebApi.Shared.projitems*{2705db4c-3bce-4cfc-9a30-b4bfd1f28c56}*SharedItemsImports = 5
40-
..\samples\SampleWebApi.Shared\SampleWebApi.Shared.projitems*{897e5c9c-8c0a-4fb6-960c-4d11aafd4491}*SharedItemsImports = 5
41-
..\samples\SampleWebApi.Shared\SampleWebApi.Shared.projitems*{9232da41-ca69-4fe3-b0c9-d8d85fec272a}*SharedItemsImports = 5
42-
..\samples\SampleWebApi.Shared\SampleWebApi.Shared.projitems*{b82830a0-fdfc-469d-b2a8-d657cd216451}*SharedItemsImports = 5
43-
..\samples\SampleWebApi.Shared\SampleWebApi.Shared.projitems*{e544fb20-29f3-41f5-a78e-6164f9c43b3c}*SharedItemsImports = 13
44-
EndGlobalSection
4539
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4640
Debug|Any CPU = Debug|Any CPU
4741
Release|Any CPU = Release|Any CPU
@@ -75,6 +69,10 @@ Global
7569
{9232DA41-CA69-4FE3-B0C9-D8D85FEC272A}.Debug|Any CPU.Build.0 = Debug|Any CPU
7670
{9232DA41-CA69-4FE3-B0C9-D8D85FEC272A}.Release|Any CPU.ActiveCfg = Release|Any CPU
7771
{9232DA41-CA69-4FE3-B0C9-D8D85FEC272A}.Release|Any CPU.Build.0 = Release|Any CPU
72+
{D5C8BCC5-C997-475E-9E71-5BF807294BB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
73+
{D5C8BCC5-C997-475E-9E71-5BF807294BB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
74+
{D5C8BCC5-C997-475E-9E71-5BF807294BB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
75+
{D5C8BCC5-C997-475E-9E71-5BF807294BB6}.Release|Any CPU.Build.0 = Release|Any CPU
7876
EndGlobalSection
7977
GlobalSection(SolutionProperties) = preSolution
8078
HideSolutionNode = FALSE
@@ -87,8 +85,18 @@ Global
8785
{B82830A0-FDFC-469D-B2A8-D657CD216451} = {CF13271D-BF3F-4167-BEBA-DD02D33992F2}
8886
{335B0D1F-A428-4D2E-AF87-269C75F5F138} = {F7494366-ED1D-4342-AE5D-DD6BE67C63DF}
8987
{9232DA41-CA69-4FE3-B0C9-D8D85FEC272A} = {CF13271D-BF3F-4167-BEBA-DD02D33992F2}
88+
{D5C8BCC5-C997-475E-9E71-5BF807294BB6} = {CF13271D-BF3F-4167-BEBA-DD02D33992F2}
9089
EndGlobalSection
9190
GlobalSection(ExtensibilityGlobals) = postSolution
9291
SolutionGuid = {70815049-1680-480A-BF5A-00536D6C9C20}
9392
EndGlobalSection
93+
GlobalSection(SharedMSBuildProjectFiles) = preSolution
94+
..\samples\SampleWebApi.Shared\SampleWebApi.Shared.projitems*{0801aed9-ea38-4e7e-af4d-26e9b67e5254}*SharedItemsImports = 5
95+
..\samples\SampleWebApi.Shared\SampleWebApi.Shared.projitems*{2705db4c-3bce-4cfc-9a30-b4bfd1f28c56}*SharedItemsImports = 5
96+
..\samples\SampleWebApi.Shared\SampleWebApi.Shared.projitems*{897e5c9c-8c0a-4fb6-960c-4d11aafd4491}*SharedItemsImports = 5
97+
..\samples\SampleWebApi.Shared\SampleWebApi.Shared.projitems*{9232da41-ca69-4fe3-b0c9-d8d85fec272a}*SharedItemsImports = 5
98+
..\samples\SampleWebApi.Shared\SampleWebApi.Shared.projitems*{b82830a0-fdfc-469d-b2a8-d657cd216451}*SharedItemsImports = 5
99+
..\samples\SampleWebApi.Shared\SampleWebApi.Shared.projitems*{d5c8bcc5-c997-475e-9e71-5bf807294bb6}*SharedItemsImports = 5
100+
..\samples\SampleWebApi.Shared\SampleWebApi.Shared.projitems*{e544fb20-29f3-41f5-a78e-6164f9c43b3c}*SharedItemsImports = 13
101+
EndGlobalSection
94102
EndGlobal

src/AspNetCore.Authentication.Basic/AspNetCore.Authentication.Basic.csproj

+17-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1;netcoreapp3.0;netstandard2.0;net461</TargetFrameworks>
5-
<Version>6.0.1</Version>
4+
<TargetFrameworks>net7.0;net6.0;net5.0;netcoreapp3.1;netcoreapp3.0;netstandard2.0;net461</TargetFrameworks>
5+
<Version>7.0.0</Version>
66
<RepositoryUrl>https://github.com/mihirdilip/aspnetcore-authentication-basic/tree/$(Version)</RepositoryUrl>
77
<PackageProjectUrl>https://github.com/mihirdilip/aspnetcore-authentication-basic/tree/$(Version)</PackageProjectUrl>
8-
<PackageTags>aspnetcore, security, authentication, microsoft, microsoft.aspnetcore.authentication, microsoft-aspnetcore-authentication, microsoft.aspnetcore.authentication.basic, microsoft-aspnetcore-authentication-basic, asp-net-core, netstandard, netstandard20, basic-authentication, basicauthentication, dotnetcore, dotnetcore3.1, net5, net5.0, net6, net6.0, asp-net-core-basic-authentication, aspnetcore-basic-authentication, net5-basic-authentication, asp-net-core-authentication, aspnetcore-authentication, net5-authentication, asp, aspnet, basic, authentication-scheme</PackageTags>
9-
<PackageReleaseNotes>- net6.0 support added
10-
- Information log on handler is changed to Debug log when IgnoreAuthenticationIfAllowAnonymous is enabled
8+
<PackageTags>aspnetcore, security, authentication, microsoft, microsoft.aspnetcore.authentication, microsoft-aspnetcore-authentication, microsoft.aspnetcore.authentication.basic, microsoft-aspnetcore-authentication-basic, asp-net-core, netstandard, netstandard20, basic-authentication, basicauthentication, dotnetcore, dotnetcore3.1, net5, net5.0, net6, net6.0, net7, net7.0, asp-net-core-basic-authentication, aspnetcore-basic-authentication, asp-net-core-authentication, aspnetcore-authentication, asp, aspnet, basic, authentication-scheme</PackageTags>
9+
<PackageReleaseNotes>- net7.0 support added
10+
- Information log on handler is changed to Debug log when Authorization header is not found on the request
11+
- Added package validations
1112
- Readme updated
12-
- Copyright year updated on License
13+
- Readme added to package
1314
</PackageReleaseNotes>
1415
<Description>Easy to use and very light weight Microsoft style Basic Scheme Authentication implementation for ASP.NET Core.</Description>
1516
<Authors>Mihir Dilip</Authors>
@@ -22,7 +23,12 @@
2223
<NeutralLanguage />
2324
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
2425
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
26+
<PackageReadmeFile>README.md</PackageReadmeFile>
2527
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
28+
<EnablePackageValidation>true</EnablePackageValidation>
29+
<EnableStrictModeForCompatibleTfms>true</EnableStrictModeForCompatibleTfms>
30+
<EnableStrictModeForCompatibleFrameworksInPackage>true</EnableStrictModeForCompatibleFrameworksInPackage>
31+
<!--<GenerateCompatibilitySuppressionFile>true</GenerateCompatibilitySuppressionFile>-->
2632
</PropertyGroup>
2733

2834
<PropertyGroup>
@@ -62,7 +68,7 @@
6268
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
6369
</ItemGroup>
6470

65-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0' Or '$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'net5.0' Or '$(TargetFramework)' == 'net6.0'">
71+
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0' Or '$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'net5.0' Or '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0'">
6672
<FrameworkReference Include="Microsoft.AspNetCore.App" />
6773
</ItemGroup>
6874

@@ -71,6 +77,10 @@
7177
<Pack>True</Pack>
7278
<PackagePath></PackagePath>
7379
</None>
80+
<None Include="..\..\README.md">
81+
<Pack>True</Pack>
82+
<PackagePath>\</PackagePath>
83+
</None>
7484
</ItemGroup>
7585

7686
</Project>

src/AspNetCore.Authentication.Basic/BasicHandler.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected override async Task<AuthenticateResult> HandleAuthenticateAsync()
5959

6060
if (!Request.Headers.ContainsKey(HeaderNames.Authorization))
6161
{
62-
Logger.LogInformation("No 'Authorization' header found in the request.");
62+
Logger.LogDebug("No 'Authorization' header found in the request.");
6363
return AuthenticateResult.NoResult();
6464
}
6565

0 commit comments

Comments
 (0)