1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 08:32:50 -05:00

Improve local dev setup for SSO project (#1664)

* Add default SSO appsettings for development

* Add Sso project to setup_secrets.ps1 script

* Use hashmap instead of array
This commit is contained in:
Thomas Rittson
2021-11-03 07:12:43 +10:00
committed by GitHub
parent e57bef6af4
commit 98c167b1c1
2 changed files with 31 additions and 7 deletions

View File

@ -11,11 +11,26 @@ if (!(Test-Path "secrets.json")) {
exit;
}
$projects = "Admin", "Api", "Billing", "Events", "EventsProcessor", "Icons", "Identity", "Notifications";
foreach ($projects in $projects) {
if ($clear -eq $true) {
dotnet user-secrets clear -p "../src/$projects"
}
Get-Content secrets.json | & dotnet user-secrets set -p "../src/$projects"
if ($clear -eq $true) {
Write-Output "Deleting all existing user secrets"
}
$projects = @{
Admin = "../src/Admin"
Api = "../src/Api"
Billing = "../src/Billing"
Events = "../src/Events"
EventsProcessor = "../src/EventsProcessor"
Icons = "../src/Icons"
Identity = "../src/Identity"
Notifications = "../src/Notifications"
Sso = "../bitwarden_license/src/Sso"
}
foreach ($key in $projects.keys) {
if ($clear -eq $true) {
dotnet user-secrets clear -p $projects[$key]
}
$output = Get-Content secrets.json | & dotnet user-secrets set -p $projects[$key]
Write-Output "$output - $key"
}