devise_auth_proxy 0.1.21 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 534445c6cec839a905a3613b9176120f861c8ffa675480fe8d3bed6af578d7d1
4
- data.tar.gz: 32d16d25d81b7fa809a3d0f4098cee4d1b503d02e02aa005a210c2ff9c359cb7
3
+ metadata.gz: f48da9026374575851d42fa970741c996e24d095039cd46a044130fda595b9c2
4
+ data.tar.gz: a753b83b27ca69ca517524521d1af05cffb3807a6b5e31168a0b26b35da71dba
5
5
  SHA512:
6
- metadata.gz: 9c829539ca1cd28fcc88b6c22bdf246c893e08d4ffc6a53597556035c56f672aaa826ff5199542d7eb80587eeae910e4a459a0a3b5ad3251d5a1eace3b0e0cf4
7
- data.tar.gz: 3097326e004414afb88e6eb2f45f2064e4914084e9001874cae9f4e72c9b838112e9e8ed5558eb5f984b5919fdb20f4bd42e366922ae220ccc3d189dff2f4d7c
6
+ metadata.gz: 714c1ea62a39dab0087f874ce637cb1576c4b142a132e59f17aeed0a870d299f720041573da16f3197d7428ad8cf81dddb4979ea42dc903ba99c35b6fb3df1c4
7
+ data.tar.gz: 4f3bf097a00d7610e902a789a80f03adce1fe790ca71947adeb5f5273e042afe2ca9ee97b25b316757e672e8136fcb8cb08fec976eae68bfd33bd661c95b8140
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- devise_auth_proxy (0.1.21)
4
+ devise_auth_proxy (0.2.0)
5
5
  devise
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -24,12 +24,14 @@ Or install it yourself as:
24
24
 
25
25
  Invoke hook
26
26
  * Add `:auth_proxy_authenticatable` symbol to `devise` statement in User model, before other authentication strategies (e.g., `:database_authenticatable`).
27
+ * Add `include DeviseAuthProxy::Helper` to ApplicationController to override `after_sign_out_path_for` of devise if you want to modify the redirect url after sign out.
27
28
 
28
- Configuaration options:
29
+ Configuration options:
29
30
  * `env_key` - String (default: 'AUTH_PROXY'). Request environment key for the proxy user id.
30
31
  * `attribute_map` - Hash (default: {}). Map of User model attributes to request environment keys for updating the local user when auto-creation is enabled.
31
32
  * `auto_create` - Boolean (default: false). Whether to auto-create a local user from the proxy user attributes. Note: Also requires adding the Warden callbacks as shown below.
32
33
  * `auto_update` - Boolean (default: false). Whether to auto-update authenticated user attributes from proxy user attributes.
34
+ * `default_role` - List (default: []). A list of role default for new user. If your application integrate with CanCan of something like that.
33
35
  * `logout_url` - String (default: '/'). For redirecting to a proxy user logout URL after signing out of the Rails application. Include DeviseAuthProxy::ControllerBehavior in your application controller to enable (by overriding Devise's after_sign_out_path_for).
34
36
 
35
37
 
@@ -43,6 +45,7 @@ DeviseAuthProxy.configure do |config|
43
45
  config.auto_create = true
44
46
  config.auto_update = true
45
47
  config.attribute_map = { email: 'mail' }
48
+ config.default_role = ['role_name / role_id']
46
49
  config.logout_url = "http://localhost:3000/logout"
47
50
  end
48
51
  ```
@@ -1,3 +1,3 @@
1
1
  module DeviseAuthProxy
2
- VERSION = "0.1.21"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_auth_proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.21
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - QuangTK