Skip to content

Commit 4706375

Browse files
Sync changes from main to net8 - Applied recent commits, updated versions & framework, preserved .csproj files (#490)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent ba769ee commit 4706375

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/TickerQ.Dashboard/Authentication/AuthService.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ public async Task<AuthResult> AuthenticateAsync(HttpContext context)
3232
return AuthResult.Success("anonymous");
3333
}
3434

35+
// Authentication performed by host application
36+
if (_config.Mode == AuthMode.Host)
37+
{
38+
return AuthenticateHostAsync(context);
39+
}
40+
3541
// Get authorization header or query parameter
3642
var authHeader = GetAuthorizationValue(context);
3743
if (string.IsNullOrEmpty(authHeader))
@@ -45,7 +51,6 @@ public async Task<AuthResult> AuthenticateAsync(HttpContext context)
4551
AuthMode.Basic => await AuthenticateBasicAsync(authHeader),
4652
AuthMode.ApiKey => await AuthenticateApiKeyAsync(authHeader),
4753
AuthMode.Custom => await AuthenticateCustomAsync(authHeader),
48-
AuthMode.Host => await AuthenticateHostAsync(context),
4954
_ => AuthResult.Failure("Invalid authentication mode")
5055
};
5156
}

0 commit comments

Comments
 (0)