devise-multi-radius-authenticatable 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: 33be02fd9225ced103b86617484e87c2008602a3
4
- data.tar.gz: 52486855979a8293a3dc4b4cdde25cd7899273cc
3
+ metadata.gz: f109c13f2cd608c4f82e2f95332c3a240e944440
4
+ data.tar.gz: cfac8db766249ff74c85928a022de1a7b9bab060
5
5
  SHA512:
6
- metadata.gz: fddfcf4842b11236fc1e261191fcbdbe354cf8208c151f1a226136b49384c664607a5f4ed4da1706e24ef9b9ff0b22b4b3588840253b056c84554cc28d6dbd2b
7
- data.tar.gz: 30f6afd9306663d2167a809654f50d38d4d983b50955833dd4736f7fed8e208d1f7dc3df9e3838771cf9a7e63405a58320372ade242ad50cd754cee86cb84055
6
+ metadata.gz: 3dde925e263151edbd770b86ad4ade059638bd39f0da8d8c606c018fddcb9edb7d79f1dc0864a7447539d798668bf7d2e0e215e03ab05b9f91736aeef0316306
7
+ data.tar.gz: b5670e505615e0c2b410d9770c2d96f914c6cccbd1a13ef4064843ac1b756251a3ad5cf1d80395aa0b4efb07e0caa99e6b0ac96f02b2c08b2182e1b78d9ac856
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Devise Radius Authenticatable
2
2
  =============================
3
3
 
4
- [![Gem Version](https://badge.fury.io/rb/devise-radius-authenticatable.png)](http://badge.fury.io/rb/devise-radius-authenticatable)
4
+ [![Gem Version](https://badge.fury.io/rb/devise-multi-radius-authenticatable.svg)](https://badge.fury.io/rb/devise-multi-radius-authenticatable)
5
5
  [![Build Status](https://travis-ci.org/mzaccari/devise-radius-authenticatable.png)](https://travis-ci.org/mzaccari/devise-radius-authenticatable)
6
6
  [![Code Climate](https://codeclimate.com/github/cbascom/devise-radius-authenticatable.png)](https://codeclimate.com/github/cbascom/devise-radius-authenticatable)
7
7
 
@@ -53,7 +53,7 @@ Options:
53
53
  Documentation
54
54
  -------------
55
55
 
56
- The rdocs for the gem are available here: http://rubydoc.info/github/cbascom/devise-radius-authenticatable/master/frames
56
+ The rdocs for the gem are available here: http://rubydoc.info/github/mzaccari/devise-radius-authenticatable/master
57
57
 
58
58
  Usage
59
59
  -----
@@ -75,6 +75,64 @@ Configuration
75
75
 
76
76
  The radius_authenticatable module is configured through the normal devise initializer `config/initializers/devise.rb`. The initial values are added to the file when you run the devise_radius_authenticatable:install generator as described previously.
77
77
 
78
+ Example:
79
+
80
+ ```ruby
81
+ Devise.setup do |config|
82
+ # ==> Configuration for radius_authenticatable
83
+ # The radius_authenticatable strategy can be used in place of the
84
+ # database_authenticatable strategy or alongside it. The default order of the
85
+ # strategies is the reverse of how they were loaded. You can control this
86
+ # order by explicitly telling warden the order in which to apply the strategies.
87
+ # See the Warden Configuration section for further details.
88
+ #
89
+ # Configure the hostname or IP address of an individual radius server to use.
90
+ # config.radius_server = '127.0.0.1'
91
+
92
+ # Configure multiple radius servers with optional port.
93
+ config.radius_servers = ['127.0.0.1:1812']
94
+
95
+ # Configure the port to use when connecting to the radius server.
96
+ config.radius_server_port = 1812
97
+
98
+ # Configure the shared secret needed to connect to the radius server.
99
+ config.radius_server_secret = 'testing123'
100
+
101
+ # Configure the time in seconds to wait for a radius server to respond.
102
+ config.radius_server_timeout = 10
103
+
104
+ # Configure the number of times a request should be retried when a radius server
105
+ # does not immediately respond to requests.
106
+ config.radius_server_retries = 0
107
+
108
+ # In some cases you may want to support authentication attempts against
109
+ # multiple radius servers. In these cases the same username could be used on
110
+ # each of the servers. In order to create unique database records, a unique
111
+ # username is generated by using the radius username and the radius server IP
112
+ # address once the authentication has succeeded. This configuration option
113
+ # allows you to chose which database column this calculated UID field will be
114
+ # stored in.
115
+ config.radius_uid_field = :username
116
+
117
+ # If you want to control how the unique identifier is created for each radius
118
+ # user, this can be customized by configuring a proc that accepts the username
119
+ # and the radius server as parameters and returns the uid.
120
+ #
121
+ config.radius_uid_generator = Proc.new { |username, server| "#{username}" }
122
+
123
+ # There is a very basic radius dictionary provided by default. Most of the time
124
+ # this will not be sufficient, so this configuration option allows you to
125
+ # specify the path that contains all of the radius dictionary files that should
126
+ # be loaded.
127
+ #
128
+ config.radius_dictionary_path = '/usr/share/freeradius/'
129
+
130
+ # Option to handle radius timeout as authentication failure
131
+ #
132
+ config.handle_radius_timeout_as_failure = true
133
+ end
134
+ ```
135
+
78
136
  References
79
137
  ----------
80
138
 
@@ -0,0 +1 @@
1
+ require 'devise-radius-authenticatable'
@@ -1,5 +1,5 @@
1
1
  module Devise
2
2
  module RadiusAuthenticatable
3
- VERSION = "0.1.1".freeze
3
+ VERSION = "0.1.2".freeze
4
4
  end
5
5
  end
@@ -44,8 +44,12 @@ module DeviseRadiusAuthenticatable
44
44
  # order by explicitly telling warden the order in which to apply the strategies.
45
45
  # See the Warden Configuration section for further details.
46
46
  #
47
- # Configure the hostname or IP address of the radius server to use.
48
- config.radius_server = '#{server}'
47
+ # Configure the hostname or IP address of an individual radius server to use.
48
+ # config.radius_server = '#{server}'
49
+
50
+ # Configure multiple radius servers with optional port.
51
+ # Example: ['127.0.0.1']
52
+ config.radius_servers = ['#{server}:#{options[:port]}']
49
53
 
50
54
  # Configure the port to use when connecting to the radius server.
51
55
  config.radius_server_port = #{options[:port]}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-multi-radius-authenticatable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Zaccari
@@ -184,6 +184,7 @@ files:
184
184
  - README.md
185
185
  - Rakefile
186
186
  - devise-multi-radius-authenticatable.gemspec
187
+ - lib/devise-multi-radius-authenticatable.rb
187
188
  - lib/devise-radius-authenticatable.rb
188
189
  - lib/devise/models/radius_authenticatable.rb
189
190
  - lib/devise/radius_authenticatable.rb