Skip to content
This repository was archived by the owner on Oct 2, 2024. It is now read-only.

Commit 88b3575

Browse files
committed
Remove unnecessary async/await from authentication filter. #12
1 parent 1197ef4 commit 88b3575

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/SerilogWeb.Classic.WebApi/Classic/WebApi/StoreWebApInfoInHttpContextAuthenticationFilter.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ internal class StoreWebApInfoInHttpContextAuthenticationFilter : IAuthentication
1212
{
1313
public bool AllowMultiple => false;
1414

15-
public async Task AuthenticateAsync(HttpAuthenticationContext context, CancellationToken cancellationToken)
15+
public Task AuthenticateAsync(HttpAuthenticationContext context, CancellationToken cancellationToken)
1616
{
1717
context.ActionContext.StoreWebApInfoInHttpContext();
18-
await Task.FromResult(0);
18+
return Task.FromResult(0);
1919
}
2020

21-
public async Task ChallengeAsync(HttpAuthenticationChallengeContext context, CancellationToken cancellationToken)
21+
public Task ChallengeAsync(HttpAuthenticationChallengeContext context, CancellationToken cancellationToken)
2222
{
23-
await Task.FromResult(0);
23+
return Task.FromResult(0);
2424
}
2525
}
2626
}

0 commit comments

Comments
 (0)