devise-radius-authenticatable 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,4 +2,5 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.2
4
4
  - 1.9.3
5
- bundler_args: --binstubs
5
+ bundler_args: --binstubs
6
+ script: bundle exec rspec spec
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Devise Radius Authenticatable
2
2
  =============================
3
3
 
4
- [![Build Status](https://secure.travis-ci.org/cbascom/devise-radius-authenticatable.png)](http://travis-ci.org/cbascom/devise-radius-authenticatable)
4
+ [![Build Status](https://travis-ci.org/cbascom/devise-radius-authenticatable.png)](https://travis-ci.org/cbascom/devise-radius-authenticatable)
5
5
 
6
6
  Devise Radius Authenticatable is a Radius authentication strategy for [Devise](http://github.com/plataformatec/devise).
7
7
 
@@ -19,7 +19,7 @@ In the Gemfile for your application:
19
19
 
20
20
  gem "devise", "~> 2.0"
21
21
  gem "devise-radius-authenticatable"
22
-
22
+
23
23
  Setup
24
24
  -----
25
25
 
@@ -1,5 +1,5 @@
1
1
  module Devise
2
2
  module RadiusAuthenticatable
3
- VERSION = "0.0.3".freeze
3
+ VERSION = "0.0.4".freeze
4
4
  end
5
5
  end
@@ -11,8 +11,9 @@ module Devise
11
11
  class RadiusAuthenticatable < Authenticatable
12
12
  # Invoked by warden to execute the strategy.
13
13
  def authenticate!
14
+ auth_params = authentication_hash.merge(:password => password)
14
15
  resource = valid_password? &&
15
- mapping.to.find_for_radius_authentication(params[scope])
16
+ mapping.to.find_for_radius_authentication(auth_params)
16
17
  return fail(:invalid) unless resource
17
18
 
18
19
  if validate(resource)
@@ -7,7 +7,14 @@ describe "login" do
7
7
  visit new_admin_session_path
8
8
  end
9
9
 
10
- it "is successful for a database user" do
10
+ it "is successful for a database user with HTTP Basic Authentication" do
11
+ page.driver.browser.basic_authorize(@admin.email, 'password')
12
+ visit root_path
13
+
14
+ current_path.should == root_path
15
+ end
16
+
17
+ it "is successful for a database user with params authentication" do
11
18
  fill_in "Login", :with => @admin.email
12
19
  fill_in "Password", :with => 'password'
13
20
  click_button "Sign in"
@@ -16,7 +23,14 @@ describe "login" do
16
23
  page.should have_content("Signed in successfully")
17
24
  end
18
25
 
19
- it "is successful for a radius user" do
26
+ it "is successful for a radius user with HTTP Basic Authentication" do
27
+ page.driver.browser.basic_authorize('testuser', 'password')
28
+ visit root_path
29
+
30
+ current_path.should == root_path
31
+ end
32
+
33
+ it "is successful for a radius user with params authentication" do
20
34
  fill_in "Login", :with => 'testuser'
21
35
  fill_in "Password", :with => 'password'
22
36
  click_button "Sign in"
@@ -52,7 +52,7 @@ Devise.setup do |config|
52
52
  # It can be set to an array that will enable http authentication only for the
53
53
  # given strategies, for example, `config.http_authenticatable = [:token]` will
54
54
  # enable it only for token authentication.
55
- # config.http_authenticatable = false
55
+ config.http_authenticatable = true
56
56
 
57
57
  # If http headers should be returned for AJAX requests. True by default.
58
58
  # config.http_authenticatable_on_xhr = true
metadata CHANGED
@@ -1,208 +1,208 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-radius-authenticatable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
4
  prerelease:
5
+ version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Calvin Bascom
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-23 00:00:00.000000000 Z
12
+ date: 2013-01-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
+ type: :runtime
15
16
  name: devise
17
+ prerelease: false
16
18
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
19
  requirements:
19
20
  - - ~>
20
21
  - !ruby/object:Gem::Version
21
22
  version: '2.0'
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
23
  none: false
24
+ version_requirements: !ruby/object:Gem::Requirement
26
25
  requirements:
27
26
  - - ~>
28
27
  - !ruby/object:Gem::Version
29
28
  version: '2.0'
29
+ none: false
30
30
  - !ruby/object:Gem::Dependency
31
+ type: :runtime
31
32
  name: radiustar
33
+ prerelease: false
32
34
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
35
  requirements:
35
36
  - - ~>
36
37
  - !ruby/object:Gem::Version
37
38
  version: 0.0.6
38
- type: :runtime
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
39
  none: false
40
+ version_requirements: !ruby/object:Gem::Requirement
42
41
  requirements:
43
42
  - - ~>
44
43
  - !ruby/object:Gem::Version
45
44
  version: 0.0.6
45
+ none: false
46
46
  - !ruby/object:Gem::Dependency
47
+ type: :development
47
48
  name: rake
49
+ prerelease: false
48
50
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
51
  requirements:
51
52
  - - ~>
52
53
  - !ruby/object:Gem::Version
53
54
  version: '0.9'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
55
  none: false
56
+ version_requirements: !ruby/object:Gem::Requirement
58
57
  requirements:
59
58
  - - ~>
60
59
  - !ruby/object:Gem::Version
61
60
  version: '0.9'
61
+ none: false
62
62
  - !ruby/object:Gem::Dependency
63
+ type: :development
63
64
  name: rails
65
+ prerelease: false
64
66
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
67
  requirements:
67
68
  - - ~>
68
69
  - !ruby/object:Gem::Version
69
70
  version: '3.2'
70
- type: :development
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
71
  none: false
72
+ version_requirements: !ruby/object:Gem::Requirement
74
73
  requirements:
75
74
  - - ~>
76
75
  - !ruby/object:Gem::Version
77
76
  version: '3.2'
77
+ none: false
78
78
  - !ruby/object:Gem::Dependency
79
+ type: :development
79
80
  name: jquery-rails
81
+ prerelease: false
80
82
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
83
  requirements:
83
84
  - - ~>
84
85
  - !ruby/object:Gem::Version
85
86
  version: '2.0'
86
- type: :development
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
87
  none: false
88
+ version_requirements: !ruby/object:Gem::Requirement
90
89
  requirements:
91
90
  - - ~>
92
91
  - !ruby/object:Gem::Version
93
92
  version: '2.0'
93
+ none: false
94
94
  - !ruby/object:Gem::Dependency
95
+ type: :development
95
96
  name: sqlite3
97
+ prerelease: false
96
98
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
99
  requirements:
99
100
  - - ~>
100
101
  - !ruby/object:Gem::Version
101
102
  version: '1.3'
102
- type: :development
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
103
  none: false
104
+ version_requirements: !ruby/object:Gem::Requirement
106
105
  requirements:
107
106
  - - ~>
108
107
  - !ruby/object:Gem::Version
109
108
  version: '1.3'
109
+ none: false
110
110
  - !ruby/object:Gem::Dependency
111
+ type: :development
111
112
  name: rspec
113
+ prerelease: false
112
114
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
115
  requirements:
115
116
  - - ~>
116
117
  - !ruby/object:Gem::Version
117
118
  version: '2.10'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
119
  none: false
120
+ version_requirements: !ruby/object:Gem::Requirement
122
121
  requirements:
123
122
  - - ~>
124
123
  - !ruby/object:Gem::Version
125
124
  version: '2.10'
125
+ none: false
126
126
  - !ruby/object:Gem::Dependency
127
+ type: :development
127
128
  name: rspec-rails
129
+ prerelease: false
128
130
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
131
  requirements:
131
132
  - - ~>
132
133
  - !ruby/object:Gem::Version
133
134
  version: '2.10'
134
- type: :development
135
- prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
135
  none: false
136
+ version_requirements: !ruby/object:Gem::Requirement
138
137
  requirements:
139
138
  - - ~>
140
139
  - !ruby/object:Gem::Version
141
140
  version: '2.10'
141
+ none: false
142
142
  - !ruby/object:Gem::Dependency
143
+ type: :development
143
144
  name: factory_girl
145
+ prerelease: false
144
146
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
147
  requirements:
147
148
  - - ~>
148
149
  - !ruby/object:Gem::Version
149
150
  version: '3.4'
150
- type: :development
151
- prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
151
  none: false
152
+ version_requirements: !ruby/object:Gem::Requirement
154
153
  requirements:
155
154
  - - ~>
156
155
  - !ruby/object:Gem::Version
157
156
  version: '3.4'
157
+ none: false
158
158
  - !ruby/object:Gem::Dependency
159
+ type: :development
159
160
  name: capybara
161
+ prerelease: false
160
162
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
163
  requirements:
163
164
  - - ~>
164
165
  - !ruby/object:Gem::Version
165
166
  version: '1.1'
166
- type: :development
167
- prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
167
  none: false
168
+ version_requirements: !ruby/object:Gem::Requirement
170
169
  requirements:
171
170
  - - ~>
172
171
  - !ruby/object:Gem::Version
173
172
  version: '1.1'
173
+ none: false
174
174
  - !ruby/object:Gem::Dependency
175
+ type: :development
175
176
  name: launchy
177
+ prerelease: false
176
178
  requirement: !ruby/object:Gem::Requirement
177
- none: false
178
179
  requirements:
179
180
  - - ! '>='
180
181
  - !ruby/object:Gem::Version
181
182
  version: '0'
182
- type: :development
183
- prerelease: false
184
- version_requirements: !ruby/object:Gem::Requirement
185
183
  none: false
184
+ version_requirements: !ruby/object:Gem::Requirement
186
185
  requirements:
187
186
  - - ! '>='
188
187
  - !ruby/object:Gem::Version
189
188
  version: '0'
189
+ none: false
190
190
  - !ruby/object:Gem::Dependency
191
+ type: :development
191
192
  name: ammeter
193
+ prerelease: false
192
194
  requirement: !ruby/object:Gem::Requirement
193
- none: false
194
195
  requirements:
195
196
  - - ~>
196
197
  - !ruby/object:Gem::Version
197
198
  version: '0.2'
198
- type: :development
199
- prerelease: false
200
- version_requirements: !ruby/object:Gem::Requirement
201
199
  none: false
200
+ version_requirements: !ruby/object:Gem::Requirement
202
201
  requirements:
203
202
  - - ~>
204
203
  - !ruby/object:Gem::Version
205
204
  version: '0.2'
205
+ none: false
206
206
  description: A new authentication strategy named radius_authenticatable is added to
207
207
  the list of warden strategies when the model requests it. The radius server information
208
208
  is configured through the devise initializer. When a user attempts to authenticate
@@ -302,17 +302,17 @@ rdoc_options: []
302
302
  require_paths:
303
303
  - lib
304
304
  required_ruby_version: !ruby/object:Gem::Requirement
305
- none: false
306
305
  requirements:
307
306
  - - ! '>='
308
307
  - !ruby/object:Gem::Version
309
308
  version: '0'
310
- required_rubygems_version: !ruby/object:Gem::Requirement
311
309
  none: false
310
+ required_rubygems_version: !ruby/object:Gem::Requirement
312
311
  requirements:
313
312
  - - ! '>='
314
313
  - !ruby/object:Gem::Version
315
314
  version: '0'
315
+ none: false
316
316
  requirements: []
317
317
  rubyforge_project:
318
318
  rubygems_version: 1.8.24