gds-sso 16.0.0 → 16.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/authentications_controller.rb +1 -1
- data/lib/gds-sso/version.rb +1 -1
- data/lib/gds-sso.rb +2 -0
- data/spec/controller/controller_methods_spec.rb +0 -14
- data/spec/fixtures/integration/authorize_api_users.sql +2 -2
- data/spec/internal/db/combustion_test.sqlite +0 -0
- data/spec/internal/log/test.log +828 -820
- data/spec/support/controller_spy.rb +14 -0
- data/spec/support/serializable_user.rb +3 -0
- data/spec/support/signon_integration_helpers.rb +1 -1
- data/spec/support/test_user.rb +29 -0
- data/spec/unit/session_serialisation_spec.rb +0 -4
- data/spec/unit/user_spec.rb +0 -30
- metadata +38 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68d52bff4bfbb14f4bbf15b0cb1a50aa3e0a7dc2c5bb878fac313f7d5d2d5176
|
4
|
+
data.tar.gz: 00a89b7a401bb7fa4f5378522eac3248757dcab45b6c078d5e55e71f08638c8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b806fd8e9dc753b82e1064798693241f9e9f573d4ab76def2f24af754a1399f517891fadb0cd709a2491da41a9377958378daaf5d00b82e5bd80aa031c9ffc3
|
7
|
+
data.tar.gz: 5512a069b49a307da70325f56751b382394269eaf2ca2ed21d2802684f9e860e5f2b2b92ddf0cb008984622dd8225b78a74d838c2c4b35e63a64cf2792cfe765
|
data/lib/gds-sso/version.rb
CHANGED
data/lib/gds-sso.rb
CHANGED
@@ -27,6 +27,8 @@ module GDS
|
|
27
27
|
# TODO - check this one - Stolen from Devise because it looked sensible...
|
28
28
|
config.before_eager_load(&:reload_routes!)
|
29
29
|
|
30
|
+
OmniAuth.config.allowed_request_methods = %i[post get]
|
31
|
+
|
30
32
|
config.app_middleware.use ::OmniAuth::Builder do
|
31
33
|
next if GDS::SSO::Config.api_only
|
32
34
|
|
@@ -1,20 +1,6 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
RSpec.describe GDS::SSO::ControllerMethods, "#authorise_user!" do
|
4
|
-
class ControllerSpy < ApplicationController
|
5
|
-
include GDS::SSO::ControllerMethods
|
6
|
-
|
7
|
-
def initialize(current_user)
|
8
|
-
@current_user = current_user
|
9
|
-
end
|
10
|
-
|
11
|
-
def authenticate_user!
|
12
|
-
true
|
13
|
-
end
|
14
|
-
|
15
|
-
attr_reader :current_user
|
16
|
-
end
|
17
|
-
|
18
4
|
let(:current_user) { double }
|
19
5
|
let(:expected_error) { GDS::SSO::ControllerMethods::PermissionDeniedException }
|
20
6
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
DELETE FROM `oauth_access_tokens`;
|
2
2
|
|
3
3
|
INSERT INTO oauth_access_tokens (resource_owner_id, application_id, token, refresh_token, expires_in, created_at)
|
4
|
-
VALUES (1, 1, 'caaeb53be5c7277fb0ef158181bfd1537b57f9e3b83eb795be3cd0af6e118b28', '1bc343797483954d7306d67e96687feccdfdaa8b23ed662ae23e2b03e6661d16',
|
4
|
+
VALUES (1, 1, 'caaeb53be5c7277fb0ef158181bfd1537b57f9e3b83eb795be3cd0af6e118b28', '1bc343797483954d7306d67e96687feccdfdaa8b23ed662ae23e2b03e6661d16', 30758400000, '2012-06-27 13:57:47');
|
5
5
|
|
6
6
|
INSERT INTO oauth_access_tokens (resource_owner_id, application_id, token, refresh_token, expires_in, created_at)
|
7
|
-
VALUES (1, 2, '98c72f4da02fdc43398e029d05567542944d2a9b0df3c20b0accd8bd6c5dc728', 'e2da0489a58219fd4f542139909737627874ceacd2af23f5c268ccecb36e85af',
|
7
|
+
VALUES (1, 2, '98c72f4da02fdc43398e029d05567542944d2a9b0df3c20b0accd8bd6c5dc728', 'e2da0489a58219fd4f542139909737627874ceacd2af23f5c268ccecb36e85af', 30758400000, '2014-07-14 09:06:14');
|
Binary file
|