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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb482273df7b5210882d40b4baa9a524f8981a885a4165d57ff1e12255ad057f
4
- data.tar.gz: 2d452531bc30dcf873834a9412ec111d14eac314c28ae20939da5451a388f066
3
+ metadata.gz: 20805a1ba1bcb48973d41d94dca1e8d631009db673d682b4d420422ffe1ba236
4
+ data.tar.gz: bfb81e6096594674589512479b6a8ef1a6ce8dd379ed48b64771b9283e74bc48
5
5
  SHA512:
6
- metadata.gz: 3c3430f08cd3f30e177905833fa01140257383a826f5403077c13603494a35789bae094b7ae0bd0fdceabc9b8ae6abfa09aec6a2e5bb198aa1e07ede468342a4
7
- data.tar.gz: dd23d00047233114e3cda97f6bc93094a020670927a6bf728fdd14ba30dadf1f985f82e57fd2afbb5b4cfecdfc01f2ae70cf6a9c98f49623b063f5da3eb30215
6
+ metadata.gz: e49b03595c57b9388a99f55c40242da8ef2d0b00cfcf870648d4af1020a9b090a6059e2ef7e7f81651e770a738c3577460ef21d8ccae5086d07dc3d6adb93622
7
+ data.tar.gz: a7bf31dbf8a6923f223e4495a39b94f57bd8900d796e1de67f4e14a8310558e637eec3e5c35cfe3473a23bbf73437d8a1e5b75fd09221669d1091c9a527e929c
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- devise_auth_proxy (0.1.14)
4
+ devise_auth_proxy (0.1.15)
5
5
  devise
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,15 +1,15 @@
1
- # Devise::AuthProxy
1
+ # DeviseAuthProxy
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/devise/auth_proxy`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ A devise extension for proxy user authentication.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
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 'devise-auth_proxy'
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 devise-auth_proxy
21
+ $ gem install devise_auth_proxy
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
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/[USERNAME]/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/[USERNAME]/devise-auth_proxy/blob/master/CODE_OF_CONDUCT.md).
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 Devise::AuthProxy project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/devise-auth_proxy/blob/master/CODE_OF_CONDUCT.md).
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).
@@ -8,9 +8,6 @@ module Devise
8
8
 
9
9
  included do
10
10
  attr_reader :current_password, :password
11
- end
12
-
13
- module ClassMethod
14
11
  def self.find_for_auth_proxy_authentication(env)
15
12
  manager = DeviseAuthProxy::Manager.new(self, env)
16
13
  manager.find_or_create_user
@@ -1,3 +1,3 @@
1
1
  module DeviseAuthProxy
2
- VERSION = "0.1.14"
2
+ VERSION = "0.1.15"
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.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - QuangTK