Merge branch 'feat/sso-models' of github.com:chatwoot/chatwoot into feat/saml-controllers
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user