You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Logger.LogInformation("AllowAnonymous found on the endpoint so request was not authenticated.");
returnAuthenticateResult.NoResult();
}
Problem:
The log statement at line 56 breaks the promise to ignore authentication if the endpoint is annotated with [AllowAnonymous].
Expected behavior:
When querying an endpoint annotated with [AllowAnonymous], authentication logic should be ignored.
Actual behavior:
When querying an endpoint annotated with [AllowAnonymous], two lines of log output are produced, stating that nothing is going on. (logspam)
Example:
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
info: AspNetCore.Authentication.Basic.BasicHandler[0]
No 'Authorization' header found in the request.
Hi @hcshmk, your request is updated with 6.0.1 release just published. Sorry it took a while as I was waiting for .net6.0 release and then got busy with other stuff.
Code in question:
aspnetcore-authentication-basic/src/AspNetCore.Authentication.Basic/BasicHandler.cs
Lines 54 to 58 in ce690a6
Problem:
The log statement at line 56 breaks the promise to ignore authentication if the endpoint is annotated with
[AllowAnonymous]
.Expected behavior:
When querying an endpoint annotated with
[AllowAnonymous]
, authentication logic should be ignored.Actual behavior:
When querying an endpoint annotated with
[AllowAnonymous]
, two lines of log output are produced, stating that nothing is going on. (logspam)Example:
Pull request:
#8
The text was updated successfully, but these errors were encountered: