gds-sso 9.4.0 → 10.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +1 -0
- data/app/controllers/api/user_controller.rb +1 -0
- data/app/views/authorisations/cant_signin.html.erb +1 -1
- data/lib/gds-sso/user.rb +7 -6
- data/lib/gds-sso/version.rb +1 -1
- data/spec/controller/api_user_controller_spec.rb +2 -1
- data/spec/internal/db/combustion_test.sqlite +0 -0
- data/spec/internal/db/schema.rb +2 -1
- data/spec/internal/log/test.log +1426 -1429
- data/spec/requests/end_to_end_spec.rb +2 -0
- data/spec/unit/user_spec.rb +8 -2
- metadata +49 -91
@@ -9,6 +9,8 @@ describe "Integration of client using GDS-SSO with signonotron" do
|
|
9
9
|
end
|
10
10
|
|
11
11
|
before :each do
|
12
|
+
# points to an internal app, using combustion gem
|
13
|
+
# see spec/internal
|
12
14
|
@client_host = 'www.example-client.com'
|
13
15
|
Capybara.current_driver = :mechanize
|
14
16
|
Capybara::Mechanize.local_hosts << @client_host
|
data/spec/unit/user_spec.rb
CHANGED
@@ -11,12 +11,18 @@ describe GDS::SSO::User do
|
|
11
11
|
'uid' => 'abcde',
|
12
12
|
'credentials' => {'token' => 'abcdefg', 'secret' => 'abcdefg'},
|
13
13
|
'info' => {'name' => 'Matt Patterson', 'email' => 'matt@alphagov.co.uk'},
|
14
|
-
'extra' => {'user' => {'permissions' => [], 'organisation_slug' => nil}}
|
14
|
+
'extra' => {'user' => {'permissions' => [], 'organisation_slug' => nil, 'disabled' => false}}
|
15
15
|
}
|
16
16
|
end
|
17
17
|
|
18
18
|
it "should extract the user params from the oauth hash" do
|
19
|
-
expected = {'uid' => 'abcde',
|
19
|
+
expected = {'uid' => 'abcde',
|
20
|
+
'name' => 'Matt Patterson',
|
21
|
+
'email' => 'matt@alphagov.co.uk',
|
22
|
+
"permissions" => [],
|
23
|
+
"organisation_slug" => nil,
|
24
|
+
'disabled' => false,
|
25
|
+
}
|
20
26
|
expect(GDS::SSO::User.user_params_from_auth_hash(@auth_hash)).to eq(expected)
|
21
27
|
end
|
22
28
|
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gds-sso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 10.0.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Matt Patterson
|
@@ -10,140 +9,123 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2014-
|
12
|
+
date: 2014-11-20 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: rails
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- -
|
18
|
+
- - ">="
|
21
19
|
- !ruby/object:Gem::Version
|
22
20
|
version: 3.0.0
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
|
-
- -
|
25
|
+
- - ">="
|
29
26
|
- !ruby/object:Gem::Version
|
30
27
|
version: 3.0.0
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: warden
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
|
-
- - ~>
|
32
|
+
- - "~>"
|
37
33
|
- !ruby/object:Gem::Version
|
38
34
|
version: '1.2'
|
39
35
|
type: :runtime
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
|
-
- - ~>
|
39
|
+
- - "~>"
|
45
40
|
- !ruby/object:Gem::Version
|
46
41
|
version: '1.2'
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: oauth2
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
|
-
- - ~>
|
46
|
+
- - "~>"
|
53
47
|
- !ruby/object:Gem::Version
|
54
48
|
version: '1.0'
|
55
49
|
type: :runtime
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
|
-
- - ~>
|
53
|
+
- - "~>"
|
61
54
|
- !ruby/object:Gem::Version
|
62
55
|
version: '1.0'
|
63
56
|
- !ruby/object:Gem::Dependency
|
64
57
|
name: omniauth
|
65
58
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
59
|
requirements:
|
68
|
-
- - ~>
|
60
|
+
- - "~>"
|
69
61
|
- !ruby/object:Gem::Version
|
70
62
|
version: '1.2'
|
71
63
|
type: :runtime
|
72
64
|
prerelease: false
|
73
65
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
66
|
requirements:
|
76
|
-
- - ~>
|
67
|
+
- - "~>"
|
77
68
|
- !ruby/object:Gem::Version
|
78
69
|
version: '1.2'
|
79
70
|
- !ruby/object:Gem::Dependency
|
80
71
|
name: omniauth-gds
|
81
72
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
73
|
requirements:
|
84
|
-
- - ~>
|
74
|
+
- - "~>"
|
85
75
|
- !ruby/object:Gem::Version
|
86
76
|
version: '3.1'
|
87
77
|
type: :runtime
|
88
78
|
prerelease: false
|
89
79
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
80
|
requirements:
|
92
|
-
- - ~>
|
81
|
+
- - "~>"
|
93
82
|
- !ruby/object:Gem::Version
|
94
83
|
version: '3.1'
|
95
84
|
- !ruby/object:Gem::Dependency
|
96
85
|
name: warden-oauth2
|
97
86
|
requirement: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
87
|
requirements:
|
100
|
-
- - ~>
|
88
|
+
- - "~>"
|
101
89
|
- !ruby/object:Gem::Version
|
102
90
|
version: 0.0.1
|
103
91
|
type: :runtime
|
104
92
|
prerelease: false
|
105
93
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
94
|
requirements:
|
108
|
-
- - ~>
|
95
|
+
- - "~>"
|
109
96
|
- !ruby/object:Gem::Version
|
110
97
|
version: 0.0.1
|
111
98
|
- !ruby/object:Gem::Dependency
|
112
99
|
name: rack-accept
|
113
100
|
requirement: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
101
|
requirements:
|
116
|
-
- - ~>
|
102
|
+
- - "~>"
|
117
103
|
- !ruby/object:Gem::Version
|
118
104
|
version: 0.4.4
|
119
105
|
type: :runtime
|
120
106
|
prerelease: false
|
121
107
|
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
108
|
requirements:
|
124
|
-
- - ~>
|
109
|
+
- - "~>"
|
125
110
|
- !ruby/object:Gem::Version
|
126
111
|
version: 0.4.4
|
127
112
|
- !ruby/object:Gem::Dependency
|
128
113
|
name: multi_json
|
129
114
|
requirement: !ruby/object:Gem::Requirement
|
130
|
-
none: false
|
131
115
|
requirements:
|
132
|
-
- - ~>
|
116
|
+
- - "~>"
|
133
117
|
- !ruby/object:Gem::Version
|
134
118
|
version: '1.0'
|
135
119
|
type: :runtime
|
136
120
|
prerelease: false
|
137
121
|
version_requirements: !ruby/object:Gem::Requirement
|
138
|
-
none: false
|
139
122
|
requirements:
|
140
|
-
- - ~>
|
123
|
+
- - "~>"
|
141
124
|
- !ruby/object:Gem::Version
|
142
125
|
version: '1.0'
|
143
126
|
- !ruby/object:Gem::Dependency
|
144
127
|
name: rake
|
145
128
|
requirement: !ruby/object:Gem::Requirement
|
146
|
-
none: false
|
147
129
|
requirements:
|
148
130
|
- - '='
|
149
131
|
- !ruby/object:Gem::Version
|
@@ -151,7 +133,6 @@ dependencies:
|
|
151
133
|
type: :development
|
152
134
|
prerelease: false
|
153
135
|
version_requirements: !ruby/object:Gem::Requirement
|
154
|
-
none: false
|
155
136
|
requirements:
|
156
137
|
- - '='
|
157
138
|
- !ruby/object:Gem::Version
|
@@ -159,7 +140,6 @@ dependencies:
|
|
159
140
|
- !ruby/object:Gem::Dependency
|
160
141
|
name: capybara
|
161
142
|
requirement: !ruby/object:Gem::Requirement
|
162
|
-
none: false
|
163
143
|
requirements:
|
164
144
|
- - '='
|
165
145
|
- !ruby/object:Gem::Version
|
@@ -167,7 +147,6 @@ dependencies:
|
|
167
147
|
type: :development
|
168
148
|
prerelease: false
|
169
149
|
version_requirements: !ruby/object:Gem::Requirement
|
170
|
-
none: false
|
171
150
|
requirements:
|
172
151
|
- - '='
|
173
152
|
- !ruby/object:Gem::Version
|
@@ -175,7 +154,6 @@ dependencies:
|
|
175
154
|
- !ruby/object:Gem::Dependency
|
176
155
|
name: rspec-rails
|
177
156
|
requirement: !ruby/object:Gem::Requirement
|
178
|
-
none: false
|
179
157
|
requirements:
|
180
158
|
- - '='
|
181
159
|
- !ruby/object:Gem::Version
|
@@ -183,7 +161,6 @@ dependencies:
|
|
183
161
|
type: :development
|
184
162
|
prerelease: false
|
185
163
|
version_requirements: !ruby/object:Gem::Requirement
|
186
|
-
none: false
|
187
164
|
requirements:
|
188
165
|
- - '='
|
189
166
|
- !ruby/object:Gem::Version
|
@@ -191,7 +168,6 @@ dependencies:
|
|
191
168
|
- !ruby/object:Gem::Dependency
|
192
169
|
name: capybara-mechanize
|
193
170
|
requirement: !ruby/object:Gem::Requirement
|
194
|
-
none: false
|
195
171
|
requirements:
|
196
172
|
- - '='
|
197
173
|
- !ruby/object:Gem::Version
|
@@ -199,7 +175,6 @@ dependencies:
|
|
199
175
|
type: :development
|
200
176
|
prerelease: false
|
201
177
|
version_requirements: !ruby/object:Gem::Requirement
|
202
|
-
none: false
|
203
178
|
requirements:
|
204
179
|
- - '='
|
205
180
|
- !ruby/object:Gem::Version
|
@@ -207,7 +182,6 @@ dependencies:
|
|
207
182
|
- !ruby/object:Gem::Dependency
|
208
183
|
name: combustion
|
209
184
|
requirement: !ruby/object:Gem::Requirement
|
210
|
-
none: false
|
211
185
|
requirements:
|
212
186
|
- - '='
|
213
187
|
- !ruby/object:Gem::Version
|
@@ -215,7 +189,6 @@ dependencies:
|
|
215
189
|
type: :development
|
216
190
|
prerelease: false
|
217
191
|
version_requirements: !ruby/object:Gem::Requirement
|
218
|
-
none: false
|
219
192
|
requirements:
|
220
193
|
- - '='
|
221
194
|
- !ruby/object:Gem::Version
|
@@ -223,7 +196,6 @@ dependencies:
|
|
223
196
|
- !ruby/object:Gem::Dependency
|
224
197
|
name: gem_publisher
|
225
198
|
requirement: !ruby/object:Gem::Requirement
|
226
|
-
none: false
|
227
199
|
requirements:
|
228
200
|
- - '='
|
229
201
|
- !ruby/object:Gem::Version
|
@@ -231,7 +203,6 @@ dependencies:
|
|
231
203
|
type: :development
|
232
204
|
prerelease: false
|
233
205
|
version_requirements: !ruby/object:Gem::Requirement
|
234
|
-
none: false
|
235
206
|
requirements:
|
236
207
|
- - '='
|
237
208
|
- !ruby/object:Gem::Version
|
@@ -239,7 +210,6 @@ dependencies:
|
|
239
210
|
- !ruby/object:Gem::Dependency
|
240
211
|
name: sqlite3
|
241
212
|
requirement: !ruby/object:Gem::Requirement
|
242
|
-
none: false
|
243
213
|
requirements:
|
244
214
|
- - '='
|
245
215
|
- !ruby/object:Gem::Version
|
@@ -247,7 +217,6 @@ dependencies:
|
|
247
217
|
type: :development
|
248
218
|
prerelease: false
|
249
219
|
version_requirements: !ruby/object:Gem::Requirement
|
250
|
-
none: false
|
251
220
|
requirements:
|
252
221
|
- - '='
|
253
222
|
- !ruby/object:Gem::Version
|
@@ -255,7 +224,6 @@ dependencies:
|
|
255
224
|
- !ruby/object:Gem::Dependency
|
256
225
|
name: timecop
|
257
226
|
requirement: !ruby/object:Gem::Requirement
|
258
|
-
none: false
|
259
227
|
requirements:
|
260
228
|
- - '='
|
261
229
|
- !ruby/object:Gem::Version
|
@@ -263,7 +231,6 @@ dependencies:
|
|
263
231
|
type: :development
|
264
232
|
prerelease: false
|
265
233
|
version_requirements: !ruby/object:Gem::Requirement
|
266
|
-
none: false
|
267
234
|
requirements:
|
268
235
|
- - '='
|
269
236
|
- !ruby/object:Gem::Version
|
@@ -271,17 +238,15 @@ dependencies:
|
|
271
238
|
- !ruby/object:Gem::Dependency
|
272
239
|
name: wwtd
|
273
240
|
requirement: !ruby/object:Gem::Requirement
|
274
|
-
none: false
|
275
241
|
requirements:
|
276
|
-
- -
|
242
|
+
- - ">="
|
277
243
|
- !ruby/object:Gem::Version
|
278
244
|
version: '0'
|
279
245
|
type: :development
|
280
246
|
prerelease: false
|
281
247
|
version_requirements: !ruby/object:Gem::Requirement
|
282
|
-
none: false
|
283
248
|
requirements:
|
284
|
-
- -
|
249
|
+
- - ">="
|
285
250
|
- !ruby/object:Gem::Version
|
286
251
|
version: '0'
|
287
252
|
description: Client for GDS' OAuth 2-based SSO
|
@@ -292,78 +257,71 @@ executables: []
|
|
292
257
|
extensions: []
|
293
258
|
extra_rdoc_files: []
|
294
259
|
files:
|
260
|
+
- Gemfile
|
261
|
+
- README.md
|
262
|
+
- Rakefile
|
263
|
+
- app/controllers/api/user_controller.rb
|
264
|
+
- app/controllers/authentications_controller.rb
|
265
|
+
- app/views/authentications/failure.html.erb
|
295
266
|
- app/views/authorisations/cant_signin.html.erb
|
296
267
|
- app/views/authorisations/unauthorised.html.erb
|
297
268
|
- app/views/layouts/unauthorised.html.erb
|
298
|
-
- app/views/authentications/failure.html.erb
|
299
|
-
- app/controllers/authentications_controller.rb
|
300
|
-
- app/controllers/api/user_controller.rb
|
301
269
|
- config/routes.rb
|
302
|
-
- lib/gds-sso
|
270
|
+
- lib/gds-sso.rb
|
271
|
+
- lib/gds-sso/api_access.rb
|
303
272
|
- lib/gds-sso/bearer_token.rb
|
304
|
-
- lib/gds-sso/version.rb
|
305
273
|
- lib/gds-sso/config.rb
|
274
|
+
- lib/gds-sso/controller_methods.rb
|
306
275
|
- lib/gds-sso/failure_app.rb
|
307
|
-
- lib/gds-sso/warden_config.rb
|
308
276
|
- lib/gds-sso/lint/user_spec.rb
|
309
277
|
- lib/gds-sso/user.rb
|
310
|
-
- lib/gds-sso/
|
311
|
-
- lib/gds-sso.rb
|
312
|
-
- README.md
|
313
|
-
- Gemfile
|
314
|
-
- Rakefile
|
315
|
-
- spec/unit/session_serialisation_spec.rb
|
316
|
-
- spec/unit/user_spec.rb
|
317
|
-
- spec/unit/api_access_spec.rb
|
318
|
-
- spec/support/timecop.rb
|
319
|
-
- spec/support/signonotron2_integration_helpers.rb
|
320
|
-
- spec/requests/end_to_end_spec.rb
|
321
|
-
- spec/spec_helper.rb
|
278
|
+
- lib/gds-sso/version.rb
|
279
|
+
- lib/gds-sso/warden_config.rb
|
322
280
|
- spec/controller/api_user_controller_spec.rb
|
323
|
-
- spec/tasks/signonotron_tasks.rake
|
324
|
-
- spec/fixtures/integration/signonotron2.sql
|
325
281
|
- spec/fixtures/integration/authorize_api_users.sql
|
282
|
+
- spec/fixtures/integration/signonotron2.sql
|
326
283
|
- spec/fixtures/integration/signonotron2_database.yml
|
327
|
-
- spec/internal/log/test.log
|
328
|
-
- spec/internal/db/schema.rb
|
329
|
-
- spec/internal/db/combustion_test.sqlite
|
330
284
|
- spec/internal/app/controllers/application_controller.rb
|
331
285
|
- spec/internal/app/controllers/example_controller.rb
|
332
286
|
- spec/internal/app/models/user.rb
|
333
287
|
- spec/internal/config/database.yml
|
334
|
-
- spec/internal/config/routes.rb
|
335
288
|
- spec/internal/config/initializers/gds-sso.rb
|
289
|
+
- spec/internal/config/routes.rb
|
290
|
+
- spec/internal/db/combustion_test.sqlite
|
291
|
+
- spec/internal/db/schema.rb
|
292
|
+
- spec/internal/log/test.log
|
336
293
|
- spec/internal/public/favicon.ico
|
294
|
+
- spec/requests/end_to_end_spec.rb
|
295
|
+
- spec/spec_helper.rb
|
296
|
+
- spec/support/signonotron2_integration_helpers.rb
|
297
|
+
- spec/support/timecop.rb
|
298
|
+
- spec/tasks/signonotron_tasks.rake
|
299
|
+
- spec/unit/api_access_spec.rb
|
300
|
+
- spec/unit/session_serialisation_spec.rb
|
301
|
+
- spec/unit/user_spec.rb
|
337
302
|
homepage: https://github.com/alphagov/gds-sso
|
338
303
|
licenses:
|
339
304
|
- MIT
|
305
|
+
metadata: {}
|
340
306
|
post_install_message:
|
341
307
|
rdoc_options: []
|
342
308
|
require_paths:
|
343
309
|
- lib
|
344
310
|
required_ruby_version: !ruby/object:Gem::Requirement
|
345
|
-
none: false
|
346
311
|
requirements:
|
347
|
-
- -
|
312
|
+
- - ">="
|
348
313
|
- !ruby/object:Gem::Version
|
349
314
|
version: '0'
|
350
|
-
segments:
|
351
|
-
- 0
|
352
|
-
hash: 21293373726415033
|
353
315
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
354
|
-
none: false
|
355
316
|
requirements:
|
356
|
-
- -
|
317
|
+
- - ">="
|
357
318
|
- !ruby/object:Gem::Version
|
358
319
|
version: '0'
|
359
|
-
segments:
|
360
|
-
- 0
|
361
|
-
hash: 21293373726415033
|
362
320
|
requirements: []
|
363
321
|
rubyforge_project: gds-sso
|
364
|
-
rubygems_version:
|
322
|
+
rubygems_version: 2.2.2
|
365
323
|
signing_key:
|
366
|
-
specification_version:
|
324
|
+
specification_version: 4
|
367
325
|
summary: Client for GDS' OAuth 2-based SSO
|
368
326
|
test_files:
|
369
327
|
- spec/unit/session_serialisation_spec.rb
|