1
0
mirror of https://github.com/bitwarden/server synced 2026-01-11 04:53:18 +00:00

[EC-19] Move SSO Identifier to Org SSO endpoint (#2184)

* [EC-19] Move SSO identifier to Org SSO config endpoint

* [EC-19] Add Jira tech debt issue reference
This commit is contained in:
Shane Melton
2022-09-27 11:49:28 -07:00
committed by GitHub
parent e7c1014f96
commit 822fed8f7a
4 changed files with 7 additions and 0 deletions

View File

@@ -706,8 +706,10 @@ public class OrganizationsController : Controller
var ssoConfig = await _ssoConfigRepository.GetByOrganizationIdAsync(id);
ssoConfig = ssoConfig == null ? model.ToSsoConfig(id) : model.ToSsoConfig(ssoConfig);
organization.Identifier = model.Identifier;
await _ssoConfigService.SaveAsync(ssoConfig, organization);
await _organizationService.UpdateAsync(organization);
return new OrganizationSsoResponseModel(organization, _globalSettings, ssoConfig);
}

View File

@@ -16,6 +16,8 @@ public class OrganizationSsoRequestModel
{
[Required]
public bool Enabled { get; set; }
[StringLength(50)]
public string Identifier { get; set; }
[Required]
public SsoConfigurationDataRequest Data { get; set; }

View File

@@ -12,6 +12,7 @@ public class OrganizationUpdateRequestModel
public string Name { get; set; }
[StringLength(50)]
public string BusinessName { get; set; }
[Obsolete("2022-08-03 Moved to Org SSO request model, left for backwards compatability. Remove with EC-489.")]
[StringLength(50)]
public string Identifier { get; set; }
[EmailAddress]

View File

@@ -16,10 +16,12 @@ public class OrganizationSsoResponseModel : ResponseModel
Data = config.GetData();
}
Identifier = organization.Identifier;
Urls = new SsoUrls(organization.Id.ToString(), globalSettings);
}
public bool Enabled { get; set; }
public string Identifier { get; set; }
public SsoConfigurationData Data { get; set; }
public SsoUrls Urls { get; set; }
}