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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user