devise_auth_proxy 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +32 -8
- data/lib/devise_auth_proxy/model.rb +0 -3
- data/lib/devise_auth_proxy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20805a1ba1bcb48973d41d94dca1e8d631009db673d682b4d420422ffe1ba236
|
4
|
+
data.tar.gz: bfb81e6096594674589512479b6a8ef1a6ce8dd379ed48b64771b9283e74bc48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e49b03595c57b9388a99f55c40242da8ef2d0b00cfcf870648d4af1020a9b090a6059e2ef7e7f81651e770a738c3577460ef21d8ccae5086d07dc3d6adb93622
|
7
|
+
data.tar.gz: a7bf31dbf8a6923f223e4495a39b94f57bd8900d796e1de67f4e14a8310558e637eec3e5c35cfe3473a23bbf73437d8a1e5b75fd09221669d1091c9a527e929c
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
#
|
1
|
+
# DeviseAuthProxy
|
2
2
|
|
3
|
-
|
3
|
+
A devise extension for proxy user authentication.
|
4
4
|
|
5
|
-
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/devise_auth_proxy.svg)](http://badge.fury.io/rb/devise_auth_proxy)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
gem '
|
12
|
+
gem 'devise_auth_proxy'
|
13
13
|
```
|
14
14
|
|
15
15
|
And then execute:
|
@@ -18,11 +18,35 @@ And then execute:
|
|
18
18
|
|
19
19
|
Or install it yourself as:
|
20
20
|
|
21
|
-
$ gem install
|
21
|
+
$ gem install devise_auth_proxy
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
Invoke hook
|
26
|
+
* Add `:auth_proxy_authenticatable` symbol to `devise` statement in User model, before other authentication strategies (e.g., `:database_authenticatable`).
|
27
|
+
|
28
|
+
Configuaration options:
|
29
|
+
* `env_key` - String (default: 'AUTH_PROXY'). Request environment key for the proxy user id.
|
30
|
+
* `attribute_map` - Hash (default: {}). Map of User model attributes to request environment keys for updating the local user when auto-creation is enabled.
|
31
|
+
* `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
|
+
* `auto_update` - Boolean (default: false). Whether to auto-update authenticated user attributes from proxy user attributes.
|
33
|
+
* `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
|
+
|
35
|
+
|
36
|
+
Set options in a Rails initializer (e.g., `config/intializers/devise.rb`):
|
37
|
+
|
38
|
+
```
|
39
|
+
require 'devise_auth_proxy'
|
40
|
+
|
41
|
+
DeviseAuthProxy.configure do |config|
|
42
|
+
config.env_key = 'HTTP_AUTH_PROXY'
|
43
|
+
config.auto_create = true
|
44
|
+
config.auto_update = true
|
45
|
+
config.attribute_map = { email: 'mail' }
|
46
|
+
config.logout_url = "http://localhost:3000/logout"
|
47
|
+
end
|
48
|
+
```
|
49
|
+
|
26
50
|
|
27
51
|
## Development
|
28
52
|
|
@@ -32,7 +56,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
56
|
|
33
57
|
## Contributing
|
34
58
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
59
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/me0den/devise_auth_proxy. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/me0den/devise_auth_proxy/blob/master/CODE_OF_CONDUCT.md).
|
36
60
|
|
37
61
|
|
38
62
|
## License
|
@@ -41,4 +65,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
41
65
|
|
42
66
|
## Code of Conduct
|
43
67
|
|
44
|
-
Everyone interacting in the
|
68
|
+
Everyone interacting in the DeviseAuthProxy project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/me0den/devise_auth_proxy/blob/master/CODE_OF_CONDUCT.md).
|