26 references to BrowserToken
Aspire.Dashboard (11)
Authentication\FrontendCompositeAuthenticationHandler.cs (1)
49
FrontendAuthMode.
BrowserToken
=> FrontendAuthenticationDefaults.AuthenticationSchemeBrowserToken,
Configuration\PostConfigureDashboardOptions.cs (2)
54
options.Frontend.AuthMode ??= FrontendAuthMode.
BrowserToken
;
57
if (options.Frontend.AuthMode == FrontendAuthMode.
BrowserToken
&& string.IsNullOrEmpty(options.Frontend.BrowserToken))
Configuration\ValidateDashboardOptions.cs (1)
44
case FrontendAuthMode.
BrowserToken
:
DashboardEndpointsBuilder.cs (1)
19
if (dashboardOptions.Frontend.AuthMode == FrontendAuthMode.
BrowserToken
)
DashboardWebApplication.cs (3)
332
if (options.Frontend.AuthMode == FrontendAuthMode.
BrowserToken
)
739
case FrontendAuthMode.
BrowserToken
:
783
case FrontendAuthMode.
BrowserToken
:
Model\ValidateTokenMiddleware.cs (3)
31
if (_options.CurrentValue.Frontend.AuthMode != FrontendAuthMode.
BrowserToken
)
33
_logger.LogDebug($"Request to validate token URL but auth mode isn't set to {FrontendAuthMode.
BrowserToken
}.");
37
else if (context.Request.Query.TryGetValue("t", out var value) && _options.CurrentValue.Frontend.AuthMode == FrontendAuthMode.
BrowserToken
)
Aspire.Dashboard.Tests (15)
Integration\FrontendBrowserTokenAuthTests.cs (9)
35
config[DashboardConfigNames.DashboardFrontendAuthModeName.ConfigKey] = FrontendAuthMode.
BrowserToken
.ToString();
57
config[DashboardConfigNames.DashboardFrontendAuthModeName.ConfigKey] = FrontendAuthMode.
BrowserToken
.ToString();
88
config[DashboardConfigNames.DashboardFrontendAuthModeName.ConfigKey] = FrontendAuthMode.
BrowserToken
.ToString();
112
config[DashboardConfigNames.DashboardFrontendAuthModeName.ConfigKey] = FrontendAuthMode.
BrowserToken
.ToString();
128
[InlineData(FrontendAuthMode.
BrowserToken
, "TestKey123!", HttpStatusCode.OK, true)]
129
[InlineData(FrontendAuthMode.
BrowserToken
, "Wrong!", HttpStatusCode.OK, false)]
164
config[DashboardConfigNames.DashboardFrontendAuthModeName.ConfigKey] = FrontendAuthMode.
BrowserToken
.ToString();
225
config[DashboardConfigNames.DashboardFrontendAuthModeName.ConfigKey] = FrontendAuthMode.
BrowserToken
.ToString();
252
config[DashboardConfigNames.DashboardFrontendAuthModeName.ConfigKey] = FrontendAuthMode.
BrowserToken
.ToString();
Integration\Playwright\BrowserTokenAuthenticationTests.cs (1)
21
Configuration[DashboardConfigNames.DashboardFrontendAuthModeName.ConfigKey] = nameof(FrontendAuthMode.
BrowserToken
);
Integration\StartupTests.cs (1)
437
Assert.Equal(FrontendAuthMode.
BrowserToken
, app.DashboardOptionsMonitor.CurrentValue.Frontend.AuthMode);
Middleware\ValidateTokenMiddlewareTests.cs (4)
37
using var host = await SetUpHostAsync(FrontendAuthMode.
BrowserToken
, "token").DefaultTimeout();
45
using var host = await SetUpHostAsync(FrontendAuthMode.
BrowserToken
, "token").DefaultTimeout();
53
using var host = await SetUpHostAsync(FrontendAuthMode.
BrowserToken
, "token").DefaultTimeout();
61
using var host = await SetUpHostAsync(FrontendAuthMode.
BrowserToken
, "token").DefaultTimeout();