scim_rails_config.rb
1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# This file would normally be in config > initializers but
# is included here because it is essentially a spec helper
ScimRails.configure do |config|
config.basic_auth_model = "Company"
config.scim_users_model = "User"
config.basic_auth_model_searchable_attribute = :subdomain
config.basic_auth_model_authenticatable_attribute = :api_token
config.scim_users_scope = :users
config.scim_users_list_order = :id
config.user_deprovision_method = :archive!
config.user_reprovision_method = :unarchive!
config.mutable_user_attributes = [
:first_name,
:last_name,
:email
]
config.queryable_user_attributes = {
userName: :email,
givenName: :first_name,
familyName: :last_name,
email: :email
}
config.mutable_user_attributes_schema = {
name: {
givenName: :first_name,
familyName: :last_name
},
emails: [
{
value: :email
}
]
}
config.user_schema = {
schemas: ["urn:ietf:params:scim:schemas:core:2.0:User"],
id: :id,
userName: :email,
name: {
givenName: :first_name,
familyName: :last_name
},
emails: [
{
value: :email
},
],
active: :unarchived?
}
end