gds-sso 13.4.0 → 13.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -198,4 +198,19 @@ describe "Integration of client using GDS-SSO with signon" do
198
198
  expect(page.driver.response.status).to eq(401)
199
199
  end
200
200
  end
201
+
202
+ context "when in api_only mode" do
203
+ around :all do |examples|
204
+ GDS::SSO::Config.api_only = true
205
+ Combustion::Application.reload_routes!
206
+ examples.run
207
+ GDS::SSO::Config.api_only = false
208
+ Combustion::Application.reload_routes!
209
+ end
210
+
211
+ specify "accessing without a bearer token is not authorized" do
212
+ visit "http://#{@client_host}/restricted"
213
+ expect(page.driver.response.status).to eq(401)
214
+ end
215
+ end
201
216
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gds-sso
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.4.0
4
+ version: 13.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-11 00:00:00.000000000 Z
11
+ date: 2017-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -291,31 +291,31 @@ required_rubygems_version: !ruby/object:Gem::Requirement
291
291
  version: '0'
292
292
  requirements: []
293
293
  rubyforge_project: gds-sso
294
- rubygems_version: 2.5.2.1
294
+ rubygems_version: 2.6.13
295
295
  signing_key:
296
296
  specification_version: 4
297
297
  summary: Client for GDS' OAuth 2-based SSO
298
298
  test_files:
299
- - spec/internal/config/database.yml
300
- - spec/internal/config/initializers/gds-sso.rb
301
- - spec/internal/config/routes.rb
302
- - spec/internal/public/favicon.ico
299
+ - spec/requests/end_to_end_spec.rb
300
+ - spec/spec_helper.rb
301
+ - spec/unit/api_access_spec.rb
302
+ - spec/unit/bearer_token_spec.rb
303
+ - spec/unit/session_serialisation_spec.rb
304
+ - spec/unit/user_spec.rb
303
305
  - spec/internal/app/controllers/application_controller.rb
304
306
  - spec/internal/app/controllers/example_controller.rb
305
307
  - spec/internal/app/models/user.rb
308
+ - spec/internal/config/routes.rb
309
+ - spec/internal/config/database.yml
310
+ - spec/internal/config/initializers/gds-sso.rb
306
311
  - spec/internal/log/test.log
307
- - spec/internal/db/combustion_test.sqlite
312
+ - spec/internal/public/favicon.ico
308
313
  - spec/internal/db/schema.rb
309
- - spec/controller/api_user_controller_spec.rb
310
- - spec/controller/controller_methods_spec.rb
314
+ - spec/internal/db/combustion_test.sqlite
311
315
  - spec/support/timecop.rb
312
316
  - spec/support/backport_controller_test_params.rb
313
317
  - spec/support/signon_integration_helpers.rb
314
318
  - spec/fixtures/integration/signon.sql
315
319
  - spec/fixtures/integration/authorize_api_users.sql
316
- - spec/unit/api_access_spec.rb
317
- - spec/unit/session_serialisation_spec.rb
318
- - spec/unit/user_spec.rb
319
- - spec/unit/bearer_token_spec.rb
320
- - spec/spec_helper.rb
321
- - spec/requests/end_to_end_spec.rb
320
+ - spec/controller/api_user_controller_spec.rb
321
+ - spec/controller/controller_methods_spec.rb