scimaenaga 0.4.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -0
- data/README.md +8 -22
- data/app/controllers/scim_rails/scim_groups_controller.rb +51 -38
- data/app/controllers/scim_rails/scim_users_controller.rb +27 -65
- data/app/libraries/scim_patch.rb +34 -0
- data/app/libraries/scim_patch_operation.rb +89 -0
- data/app/models/scim_rails/scim_query_parser.rb +5 -3
- data/config/routes.rb +1 -0
- data/lib/generators/scim_rails/templates/initializer.rb +0 -6
- data/lib/scim_rails/config.rb +0 -2
- data/lib/scim_rails/version.rb +1 -1
- data/spec/controllers/scim_rails/scim_groups_controller_spec.rb +224 -129
- data/spec/controllers/scim_rails/scim_users_controller_spec.rb +115 -29
- data/spec/dummy/app/models/user.rb +12 -0
- data/spec/dummy/bin/setup +2 -0
- data/spec/dummy/config/initializers/scim_rails_config.rb +4 -5
- data/spec/dummy/db/migrate/20220117095407_add_country_to_users.rb +5 -0
- data/spec/dummy/db/schema.rb +6 -5
- data/spec/dummy/db/seeds.rb +5 -0
- data/spec/libraries/scim_patch_operation_spec.rb +96 -0
- data/spec/libraries/scim_patch_spec.rb +83 -0
- data/spec/models/scim_query_parser_spec.rb +30 -0
- metadata +13 -5
- data/spec/support/scim_rails_config.rb +0 -59
@@ -1,59 +0,0 @@
|
|
1
|
-
# This file would normally be in config > initializers but
|
2
|
-
# is included here because it is essentially a spec helper
|
3
|
-
|
4
|
-
ScimRails.configure do |config|
|
5
|
-
config.basic_auth_model = "Company"
|
6
|
-
config.scim_users_model = "User"
|
7
|
-
|
8
|
-
config.basic_auth_model_searchable_attribute = :subdomain
|
9
|
-
config.basic_auth_model_authenticatable_attribute = :api_token
|
10
|
-
config.scim_users_scope = :users
|
11
|
-
config.scim_users_list_order = :id
|
12
|
-
|
13
|
-
config.signing_algorithm = "HS256"
|
14
|
-
config.signing_secret = "2d6806dd11c2fece2e81b8ca76dcb0062f5b08e28e3264e8ba1c44bbd3578b70"
|
15
|
-
|
16
|
-
config.user_deprovision_method = :archive!
|
17
|
-
config.user_reprovision_method = :unarchive!
|
18
|
-
|
19
|
-
config.mutable_user_attributes = [
|
20
|
-
:first_name,
|
21
|
-
:last_name,
|
22
|
-
:email
|
23
|
-
]
|
24
|
-
|
25
|
-
config.queryable_user_attributes = {
|
26
|
-
userName: :email,
|
27
|
-
givenName: :first_name,
|
28
|
-
familyName: :last_name,
|
29
|
-
email: :email
|
30
|
-
}
|
31
|
-
|
32
|
-
config.mutable_user_attributes_schema = {
|
33
|
-
name: {
|
34
|
-
givenName: :first_name,
|
35
|
-
familyName: :last_name
|
36
|
-
},
|
37
|
-
emails: [
|
38
|
-
{
|
39
|
-
value: :email
|
40
|
-
}
|
41
|
-
]
|
42
|
-
}
|
43
|
-
|
44
|
-
config.user_schema = {
|
45
|
-
schemas: ["urn:ietf:params:scim:schemas:core:2.0:User"],
|
46
|
-
id: :id,
|
47
|
-
userName: :email,
|
48
|
-
name: {
|
49
|
-
givenName: :first_name,
|
50
|
-
familyName: :last_name
|
51
|
-
},
|
52
|
-
emails: [
|
53
|
-
{
|
54
|
-
value: :email
|
55
|
-
},
|
56
|
-
],
|
57
|
-
active: :unarchived?
|
58
|
-
}
|
59
|
-
end
|