Commit 86df2e3b938d1a47deec8c424a30bb3297f9e521
Committed by
Raphael Akpan
1 parent
ab754656
Exists in
master
Add comments about signing config to initializer
Showing
2 changed files
with
27 additions
and
0 deletions
Show diff stats
README.md
... | ... | @@ -78,6 +78,23 @@ When sending requests to the server the `Content-Type` should be set to `applica |
78 | 78 | |
79 | 79 | All responses will be sent with a `Content-Type` of `application/scim+json`. |
80 | 80 | |
81 | +#### Authentication | |
82 | + | |
83 | +This gem supports both basic and OAuth bearer authentication. | |
84 | + | |
85 | +##### Basic Auth | |
86 | + | |
87 | +```bash | |
88 | +$ curl -X GET 'http://username:password@localhost:3000/scim/v2/Users' | |
89 | +``` | |
90 | + | |
91 | +##### OAuth Bearer | |
92 | + | |
93 | +```bash | |
94 | +$ curl -H 'Authorization: Bearer xxxxxxx.xxxxxx' -X GET 'http://localhost:3000/scim/v2/Users' | |
95 | +``` | |
96 | + | |
97 | + | |
81 | 98 | ### List |
82 | 99 | |
83 | 100 | ##### All | ... | ... |
lib/generators/scim_rails/templates/initializer.rb
... | ... | @@ -22,6 +22,16 @@ ScimRails.configure do |config| |
22 | 22 | # or throws an error (returning 409 Conflict in accordance with SCIM spec) |
23 | 23 | config.scim_user_prevent_update_on_create = false |
24 | 24 | |
25 | + # Cryptographic algorithm used for signing the auth token. | |
26 | + # It supports all algorithms supported by the jwt gem. | |
27 | + # See https://github.com/jwt/ruby-jwt#algorithms-and-usage for supported algorithms | |
28 | + # It is "none" by default, hence generated tokens are unsigned | |
29 | + # config.signing_algorithm = "HS256" | |
30 | + | |
31 | + # Secret token used to sign authorization tokens | |
32 | + # It is `nil` by default, hence generated tokens are unsigned | |
33 | + # config.signing_secret = SECRET_TOKEN | |
34 | + | |
25 | 35 | # Default sort order for pagination is by id. If you |
26 | 36 | # use non sequential ids for user records, uncomment |
27 | 37 | # the below line and configure a determinate order. | ... | ... |