Merge branch 'feat/sso-models' of github.com:chatwoot/chatwoot into feat/saml-controllers

This commit is contained in:
Shivam Mishra
2025-08-28 16:31:30 +05:30
8 changed files with 23 additions and 75 deletions
-18
View File
@@ -1,9 +1,7 @@
FactoryBot.define do
factory :account_saml_settings do
account
enabled { false }
sso_url { 'https://idp.example.com/saml/sso' }
certificate_fingerprint { nil }
certificate do
key = OpenSSL::PKey::RSA.new(2048)
cert = OpenSSL::X509::Certificate.new
@@ -18,14 +16,8 @@ FactoryBot.define do
cert.to_pem
end
sp_entity_id { 'chatwoot-test' }
enforced_sso { false }
attribute_mappings { {} }
role_mappings { {} }
trait :enabled do
enabled { true }
end
trait :with_role_mappings do
role_mappings do
{
@@ -35,15 +27,5 @@ FactoryBot.define do
}
end
end
trait :with_attribute_mappings do
attribute_mappings do
{
'email' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress',
'name' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name',
'first_name' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname'
}
end
end
end
end