Skip to content

Commit

Permalink
VIH-7741 log in with DOM1 (#1183)
Browse files Browse the repository at this point in the history
Add a middleware to be IDAM agnostic and retrieve roles from the Bookings API and inject the claims
Support ms edge chromium for DOM1 devices
Use dom1 darkly config
---------

Co-authored-by: hmcts-ado-cnp <174565+hmcts-ado-cnp[bot]@users.noreply.github.com>
Co-authored-by: v1ferrarij <[email protected]>
Co-authored-by: Oliver Scott <[email protected]>
  • Loading branch information
4 people authored Apr 28, 2023
1 parent 490605c commit 662e559
Show file tree
Hide file tree
Showing 53 changed files with 1,426 additions and 871 deletions.
13 changes: 7 additions & 6 deletions AdminWebsite/AdminWebsite.AcceptanceTests/Hooks/ConfigHooks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ private void RegisterSauceLabsSettings(TestContext context)
context.WebConfig.SauceLabsConfiguration.RealDeviceApiKey.Should().NotBeNullOrWhiteSpace();
}

private string GetTargetTestEnvironment()
private static string GetTargetTestEnvironment()
{
return NUnit.Framework.TestContext.Parameters["TargetTestEnvironment"] ?? string.Empty;
}

private bool RunOnSauceLabsFromLocal()
private static bool RunOnSauceLabsFromLocal()
{
return NUnit.Framework.TestContext.Parameters["RunOnSauceLabs"] != null &&
NUnit.Framework.TestContext.Parameters["RunOnSauceLabs"].Equals("true");
Expand All @@ -152,21 +152,22 @@ private void RegisterNotifySettings(TestContext context)
ConfigurationManager.VerifyConfigValuesSet(context.WebConfig.NotifyConfiguration);
}

private void RunningAdminWebLocally(TestContext context)
private static void RunningAdminWebLocally(TestContext context)
{
context.WebConfig.VhServices.RunningAdminWebLocally = context.WebConfig.VhServices.AdminWebUrl.Contains("localhost");
}

private async Task GenerateBearerTokens(TestContext context)
private static async Task GenerateBearerTokens(TestContext context)
{
var tokenProvider = new TokenProvider(Options.Create(context.WebConfig.AzureAdConfiguration));
context.Token = await tokenProvider.GetClientAccessToken(context.WebConfig.AzureAdConfiguration.ClientId, context.WebConfig.AzureAdConfiguration.ClientSecret, context.WebConfig.VhServices.TestApiResourceId);
context.Token.Should().NotBeNullOrEmpty();
}

private void SetBookingConfirmToggleStatus(TestContext context)
{
var featureToggle = new FeatureToggles(_configRoot["FeatureToggle:SDKKey"]);
{
var featureToggle =
new FeatureToggles(_configRoot["FeatureToggle:SDKKey"], _configRoot["AzureAd:ResourceId"]);
context.WebConfig.BookingConfirmToggle = featureToggle.BookAndConfirmToggle();
}
}
Expand Down
45 changes: 19 additions & 26 deletions AdminWebsite/AdminWebsite.AcceptanceTests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,55 +250,48 @@
},
"LaunchDarkly.CommonSdk": {
"type": "Transitive",
"resolved": "5.5.0",
"contentHash": "FXr09X++bZu66k8O/aMKlSntSZiuaeKXd0Op6LTpJ6P/l2QvfyJbM7OlhKi/KLJr1CO5TlOKvZjD7ud9EgCNsg==",
"resolved": "6.0.1",
"contentHash": "VznCYcyVawa93/hIv9i8mIGSskvMJ4rN9fkwkRU5GDnFlE69UFf2whQ5N3OrLmh4Or5dxJ0k7mnQEIxBf+eosw==",
"dependencies": {
"LaunchDarkly.JsonStream": "[1.0.3, 2.0.0)",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.EventSource": {
"type": "Transitive",
"resolved": "4.1.3",
"contentHash": "qMb0NI+BrhjkmyVm0y/SrrDSOn+Hnm5h/bzafNryLcJ4pTjCUtFVuwYqfrmLbmC1LvUDKmK5Ae5F0/X4gFIi8A==",
"resolved": "5.0.1",
"contentHash": "DN44Ry5M4lyrjiF7LEu0Ijco7Wm8R7mJopN+giYsYjkQlszsXdFvm3POoehIDAOtL1HHl5bZvF9k9xK034u3IA==",
"dependencies": {
"LaunchDarkly.Logging": "[1.0.1, 2.0.0)"
"LaunchDarkly.Logging": "[1.0.1, 3.0.0)"
}
},
"LaunchDarkly.InternalSdk": {
"type": "Transitive",
"resolved": "2.3.2",
"contentHash": "OuOBThDVuvM0xkYup8YD/4Sz4oixDnSVBp6Qda0WwPKE/c9vE3gD+VdG0PU32VgrLRzv5PUldkMikCGWKzPpNg==",
"resolved": "3.1.2",
"contentHash": "wag5BzohWxzrAQN6eH6PPevfHcTBSnsbdDF6EBMeaAxcTL6hRB8T/QU7AwfUIp941KzS9fQusFo9OJLm+ZQ6BA==",
"dependencies": {
"LaunchDarkly.CommonSdk": "[5.5.0, 6.0.0)",
"LaunchDarkly.Logging": "[1.0.1, 2.0.0)",
"LaunchDarkly.CommonSdk": "6.0.1",
"LaunchDarkly.Logging": "[2.0.0, 3.0.0)",
"System.Collections.Immutable": "1.7.1"
}
},
"LaunchDarkly.JsonStream": {
"type": "Transitive",
"resolved": "1.0.3",
"contentHash": "WZxC5jQoYTqKrlrWmqV16PlNKCfDp5mQ0IuQEOOSTyVJPUPamm0IIHsyDRbDmNidNKedgFqjn8WaKBNVkakLyA=="
},
"LaunchDarkly.Logging": {
"type": "Transitive",
"resolved": "1.0.1",
"contentHash": "rWgD2CIB3rvhdgN4WkwIT9JQTK1SayubtmR4efhJis/fmlhi5J4roXtkvBs07C1mU/06farZWCXdF+KnCjdfjg==",
"resolved": "2.0.0",
"contentHash": "lsLKNqAZ7HIlkdTIrf4FetfRA1SUDE3WlaZQn79aSVkLjYWEhUhkDDK7hORGh4JoA3V2gXN+cIvJQax2uR/ijA==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "3.1.9"
"Microsoft.Extensions.Logging.Abstractions": "6.0.0"
}
},
"LaunchDarkly.ServerSdk": {
"type": "Transitive",
"resolved": "6.3.2",
"contentHash": "IBHoKWgSN4O11/DVm7pF0cWb6uwLcmUsrf8KeTOHnJ+WNrlSQ+S6RFRI4IXbGOeT2D5o+OpaDoQmWBwMiO/vYQ==",
"resolved": "7.0.3",
"contentHash": "zJJZDvqAMlaHO2WEP9lMdxkcrTGes3mBBlUYAzFDNuPuCzNDVFhgrj+uQnitZhLo6BBIcb3UvSuEdJKikPOuWg==",
"dependencies": {
"LaunchDarkly.Cache": "1.0.2",
"LaunchDarkly.CommonSdk": "5.5.0",
"LaunchDarkly.EventSource": "4.1.3",
"LaunchDarkly.InternalSdk": "2.3.2",
"LaunchDarkly.JsonStream": "1.0.3",
"LaunchDarkly.Logging": "1.0.1",
"LaunchDarkly.CommonSdk": "6.0.1",
"LaunchDarkly.EventSource": "5.0.1",
"LaunchDarkly.InternalSdk": "3.1.2",
"LaunchDarkly.Logging": "2.0.0",
"System.Collections.Immutable": "1.7.1"
}
},
Expand Down Expand Up @@ -2641,7 +2634,7 @@
"dependencies": {
"BookingsApi.Client": "[1.43.32, )",
"FluentValidation.AspNetCore": "[10.4.0, )",
"LaunchDarkly.ServerSdk": "[6.3.2, )",
"LaunchDarkly.ServerSdk": "[7.0.3, )",
"MicroElements.Swashbuckle.FluentValidation": "[5.7.0, )",
"Microsoft.ApplicationInsights": "[2.21.0, )",
"Microsoft.ApplicationInsights.AspNetCore": "[2.21.0, )",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Moq" Version="4.16.0" />
<PackageReference Include="nunit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.54.0.64047">
<PrivateAssets>all</PrivateAssets>
Expand Down
Loading

0 comments on commit 662e559

Please sign in to comment.