gds-sso 9.1.2 → 9.2.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.
- data/app/controllers/authentications_controller.rb +1 -3
- data/lib/gds-sso/controller_methods.rb +2 -13
- data/lib/gds-sso/version.rb +1 -1
- data/lib/gds-sso/warden_config.rb +1 -1
- data/spec/internal/db/combustion_test.sqlite +0 -0
- data/spec/internal/log/test.log +180 -188
- data/spec/requests/end_to_end_spec.rb +9 -13
- data/spec/tasks/signonotron_tasks.rake +1 -0
- data/test/session_serialisation_test.rb +1 -1
- metadata +4 -4
@@ -14,9 +14,7 @@ class AuthenticationsController < ActionController::Base
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def sign_out
|
17
|
-
|
18
|
-
cookies.delete(cookie_key)
|
19
|
-
reset_session
|
17
|
+
logout
|
20
18
|
redirect_to GDS::SSO::Config.oauth_root_url + "/users/sign_out"
|
21
19
|
end
|
22
20
|
end
|
@@ -26,16 +26,10 @@ module GDS
|
|
26
26
|
def require_signin_permission!
|
27
27
|
authorise_user!('signin')
|
28
28
|
rescue PermissionDeniedException
|
29
|
-
skip_slimmer
|
30
29
|
render "authorisations/cant_signin", layout: "unauthorised", status: :forbidden
|
31
30
|
end
|
32
31
|
|
33
32
|
def authenticate_user!
|
34
|
-
if user_remotely_signed_out?
|
35
|
-
message = "You have been remotely signed out."
|
36
|
-
skip_slimmer
|
37
|
-
render "authorisations/unauthorised", layout: "unauthorised", status: :forbidden, locals: { message: message }
|
38
|
-
end
|
39
33
|
warden.authenticate!
|
40
34
|
end
|
41
35
|
|
@@ -51,18 +45,13 @@ module GDS
|
|
51
45
|
warden.user if user_signed_in?
|
52
46
|
end
|
53
47
|
|
54
|
-
def
|
55
|
-
warden.
|
48
|
+
def logout
|
49
|
+
warden.logout
|
56
50
|
end
|
57
51
|
|
58
52
|
def warden
|
59
53
|
request.env['warden']
|
60
54
|
end
|
61
|
-
|
62
|
-
def skip_slimmer
|
63
|
-
# If slimmer used, without this you would see a generic 400 error page
|
64
|
-
headers["X-Slimmer-Skip"] = "1"
|
65
|
-
end
|
66
55
|
end
|
67
56
|
end
|
68
57
|
end
|
data/lib/gds-sso/version.rb
CHANGED
@@ -27,7 +27,7 @@ Warden::Manager.serialize_from_session do |tuple|
|
|
27
27
|
# This will reject old sessions that don't have an auth_set time
|
28
28
|
uid, auth_set = tuple
|
29
29
|
if auth_set and (auth_set + GDS::SSO::Config.auth_valid_for) > Time.now.utc
|
30
|
-
GDS::SSO::Config.user_klass.where(:uid => uid).first
|
30
|
+
GDS::SSO::Config.user_klass.where(:uid => uid, :remotely_signed_out => false).first
|
31
31
|
else
|
32
32
|
nil
|
33
33
|
end
|
Binary file
|
data/spec/internal/log/test.log
CHANGED
@@ -1,215 +1,215 @@
|
|
1
1
|
Connecting to database specified by database.yml
|
2
|
-
[1m[36m (1.
|
3
|
-
[1m[35m (
|
4
|
-
[1m[36m (8.
|
5
|
-
[1m[35m (
|
2
|
+
[1m[36m (1.8ms)[0m [1mselect sqlite_version(*)[0m
|
3
|
+
[1m[35m (16.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "uid" varchar(255) NOT NULL, "email" varchar(255) NOT NULL, "remotely_signed_out" boolean, "permissions" text, "organisation_slug" varchar(255))
|
4
|
+
[1m[36m (8.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
5
|
+
[1m[35m (16.6ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
6
6
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7
|
-
[1m[35mSQL (4.
|
8
|
-
[1m[36m (
|
7
|
+
[1m[35mSQL (4.0ms)[0m INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32532"]]
|
8
|
+
[1m[36m (6.1ms)[0m [1mcommit transaction[0m
|
9
9
|
[1m[35m (0.1ms)[0m begin transaction
|
10
|
-
[1m[36mSQL (0.
|
11
|
-
[1m[35m (
|
10
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3753"]]
|
11
|
+
[1m[35m (5.5ms)[0m commit transaction
|
12
12
|
WARNING: Can't mass-assign protected attributes: uid, name, permissions
|
13
13
|
Processing by Api::UserController#update as HTML
|
14
|
-
Parameters: {"uid"=>"
|
15
|
-
Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (3.
|
16
|
-
Completed 403 Forbidden in
|
14
|
+
Parameters: {"uid"=>"a1s2d32532"}
|
15
|
+
Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (3.3ms)
|
16
|
+
Completed 403 Forbidden in 40.0ms (Views: 39.3ms | ActiveRecord: 0.0ms)
|
17
17
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18
|
-
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "
|
19
|
-
[1m[36m (
|
18
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d36815"]]
|
19
|
+
[1m[36m (5.6ms)[0m [1mcommit transaction[0m
|
20
20
|
[1m[35m (0.1ms)[0m begin transaction
|
21
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "
|
22
|
-
[1m[35m (
|
21
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3282"]]
|
22
|
+
[1m[35m (6.5ms)[0m commit transaction
|
23
23
|
Processing by Api::UserController#update as HTML
|
24
|
-
Parameters: {"uid"=>"
|
25
|
-
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = '
|
26
|
-
[1m[35m (0.
|
27
|
-
[1m[36m (0.
|
24
|
+
Parameters: {"uid"=>"a1s2d36815"}
|
25
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d36815' LIMIT 1[0m
|
26
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27
|
+
[1m[36m (0.3ms)[0m [1mUPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '---
|
28
28
|
- signin
|
29
29
|
- new permission
|
30
30
|
', "organisation_slug" = 'justice-league' WHERE "users"."id" = 3[0m
|
31
|
-
[1m[35m (
|
32
|
-
Completed 200 OK in
|
31
|
+
[1m[35m (5.8ms)[0m commit transaction
|
32
|
+
Completed 200 OK in 14.7ms (ActiveRecord: 6.4ms)
|
33
33
|
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 3]]
|
34
34
|
[1m[35m (0.1ms)[0m begin transaction
|
35
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "
|
36
|
-
[1m[35m (
|
35
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39152"]]
|
36
|
+
[1m[35m (6.9ms)[0m commit transaction
|
37
37
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
38
|
-
[1m[35mSQL (0.
|
39
|
-
[1m[36m (
|
38
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34829"]]
|
39
|
+
[1m[36m (5.2ms)[0m [1mcommit transaction[0m
|
40
40
|
WARNING: Can't mass-assign protected attributes: uid, name, permissions
|
41
41
|
Processing by Api::UserController#reauth as HTML
|
42
|
-
Parameters: {"uid"=>"
|
43
|
-
Completed 403 Forbidden in
|
42
|
+
Parameters: {"uid"=>"a1s2d39152"}
|
43
|
+
Completed 403 Forbidden in 2.0ms (Views: 1.1ms | ActiveRecord: 0.0ms)
|
44
44
|
[1m[35m (0.1ms)[0m begin transaction
|
45
|
-
[1m[36mSQL (0.
|
46
|
-
[1m[35m (
|
45
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d36639"]]
|
46
|
+
[1m[35m (6.9ms)[0m commit transaction
|
47
47
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
48
|
-
[1m[35mSQL (0.
|
49
|
-
[1m[36m (
|
48
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3925"]]
|
49
|
+
[1m[36m (6.0ms)[0m [1mcommit transaction[0m
|
50
50
|
Processing by Api::UserController#reauth as HTML
|
51
51
|
Parameters: {"uid"=>"nonexistent-user"}
|
52
52
|
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1
|
53
53
|
Completed 200 OK in 1.2ms (ActiveRecord: 0.2ms)
|
54
54
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
55
|
-
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "
|
56
|
-
[1m[36m (7.
|
55
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37344"]]
|
56
|
+
[1m[36m (7.1ms)[0m [1mcommit transaction[0m
|
57
57
|
[1m[35m (0.1ms)[0m begin transaction
|
58
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "
|
59
|
-
[1m[35m (
|
58
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3518"]]
|
59
|
+
[1m[35m (14.4ms)[0m commit transaction
|
60
60
|
Processing by Api::UserController#reauth as HTML
|
61
|
-
Parameters: {"uid"=>"
|
62
|
-
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = '
|
61
|
+
Parameters: {"uid"=>"a1s2d37344"}
|
62
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d37344' LIMIT 1[0m
|
63
63
|
[1m[35m (0.0ms)[0m begin transaction
|
64
64
|
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
|
65
65
|
- signin
|
66
66
|
' WHERE "users"."id" = 9[0m
|
67
|
-
[1m[35m (
|
68
|
-
Completed 200 OK in
|
67
|
+
[1m[35m (5.2ms)[0m commit transaction
|
68
|
+
Completed 200 OK in 8.5ms (ActiveRecord: 5.6ms)
|
69
69
|
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 9]]
|
70
|
-
Started GET "/" for 127.0.0.1 at 2014-01-
|
70
|
+
Started GET "/" for 127.0.0.1 at 2014-01-28 12:06:18 +0000
|
71
71
|
Processing by ExampleController#index as HTML
|
72
|
-
Completed 200 OK in
|
73
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
72
|
+
Completed 200 OK in 5.7ms (Views: 5.1ms | ActiveRecord: 0.0ms)
|
73
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-28 12:06:18 +0000
|
74
74
|
Processing by ExampleController#restricted as HTML
|
75
75
|
Authenticating with gds_sso strategy
|
76
|
-
Completed in
|
77
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-
|
78
|
-
Started GET "/auth/gds/callback?code=
|
76
|
+
Completed in 40.0ms
|
77
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-28 12:06:18 +0000
|
78
|
+
Started GET "/auth/gds/callback?code=3e2d743d3ba5050a0ec491817483b429ce455460e46c0feb44a8cfea40894585&state=803302fbbbfeac9a63d3f39b21898d25ae6621bcf0a5d20b" for 127.0.0.1 at 2014-01-28 12:06:19 +0000
|
79
79
|
Processing by AuthenticationsController#callback as HTML
|
80
|
-
Parameters: {"code"=>"
|
80
|
+
Parameters: {"code"=>"3e2d743d3ba5050a0ec491817483b429ce455460e46c0feb44a8cfea40894585", "state"=>"803302fbbbfeac9a63d3f39b21898d25ae6621bcf0a5d20b"}
|
81
81
|
Authenticating with gds_sso strategy
|
82
|
-
[1m[35mUser Load (0.
|
82
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
83
83
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
84
84
|
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]
|
85
|
-
[1m[36m (
|
85
|
+
[1m[36m (8.1ms)[0m [1mcommit transaction[0m
|
86
86
|
[1m[35m (0.1ms)[0m begin transaction
|
87
87
|
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
|
88
88
|
- signin
|
89
89
|
' WHERE "users"."id" = 11[0m
|
90
|
-
[1m[35m (
|
90
|
+
[1m[35m (5.4ms)[0m commit transaction
|
91
91
|
Redirected to http://www.example-client.com/restricted
|
92
|
-
Completed 302 Found in
|
93
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
92
|
+
Completed 302 Found in 21.2ms (ActiveRecord: 14.3ms)
|
93
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-28 12:06:20 +0000
|
94
94
|
Processing by ExampleController#restricted as HTML
|
95
|
-
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
96
|
-
Completed 200 OK in 1.
|
97
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
95
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
96
|
+
Completed 200 OK in 1.7ms (Views: 0.4ms | ActiveRecord: 0.2ms)
|
97
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-28 12:06:20 +0000
|
98
98
|
Processing by ExampleController#restricted as HTML
|
99
99
|
Authenticating with gds_sso strategy
|
100
|
-
Completed in 0.
|
101
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-
|
102
|
-
Started GET "/auth/gds/callback?code=
|
100
|
+
Completed in 0.4ms
|
101
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-28 12:06:20 +0000
|
102
|
+
Started GET "/auth/gds/callback?code=364da35e04d83831df73e85766803a664cdc8948f25d2f533653c696ac3711c2&state=f293e8c8746094b476c3e355b0480eeb45491560a6a7df35" for 127.0.0.1 at 2014-01-28 12:06:20 +0000
|
103
103
|
Processing by AuthenticationsController#callback as HTML
|
104
|
-
Parameters: {"code"=>"
|
104
|
+
Parameters: {"code"=>"364da35e04d83831df73e85766803a664cdc8948f25d2f533653c696ac3711c2", "state"=>"f293e8c8746094b476c3e355b0480eeb45491560a6a7df35"}
|
105
105
|
Authenticating with gds_sso strategy
|
106
106
|
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
107
107
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
108
|
-
[1m[35m (0.
|
108
|
+
[1m[35m (0.3ms)[0m UPDATE "users" SET "permissions" = '---
|
109
109
|
- signin
|
110
110
|
' WHERE "users"."id" = 11
|
111
|
-
[1m[36m (
|
111
|
+
[1m[36m (6.5ms)[0m [1mcommit transaction[0m
|
112
112
|
[1m[35m (0.1ms)[0m begin transaction
|
113
113
|
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
114
114
|
- signin
|
115
115
|
' WHERE "users"."id" = 11[0m
|
116
|
-
[1m[35m (
|
116
|
+
[1m[35m (5.2ms)[0m commit transaction
|
117
117
|
Redirected to http://www.example-client.com/restricted
|
118
|
-
Completed 302 Found in
|
119
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
118
|
+
Completed 302 Found in 20.0ms (ActiveRecord: 12.6ms)
|
119
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-28 12:06:20 +0000
|
120
120
|
Processing by ExampleController#restricted as HTML
|
121
|
-
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
122
|
-
Completed 200 OK in 1.
|
123
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
121
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
122
|
+
Completed 200 OK in 1.9ms (Views: 0.6ms | ActiveRecord: 0.2ms)
|
123
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-28 12:06:20 +0000
|
124
124
|
Processing by ExampleController#restricted as HTML
|
125
125
|
Authenticating with gds_sso strategy
|
126
|
-
Completed in 0.
|
127
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-
|
128
|
-
Started GET "/auth/gds/callback?code=
|
126
|
+
Completed in 0.3ms
|
127
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-28 12:06:20 +0000
|
128
|
+
Started GET "/auth/gds/callback?code=0440ce3f25261b2f866a1a0efb324ecdd7942d50971652eed62563657403fd32&state=21532586c76da89f1ca7654e8be398d089da392448e3a56b" for 127.0.0.1 at 2014-01-28 12:06:20 +0000
|
129
129
|
Processing by AuthenticationsController#callback as HTML
|
130
|
-
Parameters: {"code"=>"
|
130
|
+
Parameters: {"code"=>"0440ce3f25261b2f866a1a0efb324ecdd7942d50971652eed62563657403fd32", "state"=>"21532586c76da89f1ca7654e8be398d089da392448e3a56b"}
|
131
131
|
Authenticating with gds_sso strategy
|
132
132
|
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
133
|
-
[1m[36m (0.
|
133
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
134
134
|
[1m[35m (0.2ms)[0m UPDATE "users" SET "permissions" = '---
|
135
135
|
- signin
|
136
136
|
' WHERE "users"."id" = 11
|
137
|
-
[1m[36m (
|
137
|
+
[1m[36m (7.2ms)[0m [1mcommit transaction[0m
|
138
138
|
[1m[35m (0.1ms)[0m begin transaction
|
139
139
|
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
140
140
|
- signin
|
141
141
|
' WHERE "users"."id" = 11[0m
|
142
|
-
[1m[35m (
|
142
|
+
[1m[35m (5.0ms)[0m commit transaction
|
143
143
|
Redirected to http://www.example-client.com/restricted
|
144
|
-
Completed 302 Found in
|
145
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
144
|
+
Completed 302 Found in 17.4ms (ActiveRecord: 12.9ms)
|
145
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-28 12:06:20 +0000
|
146
146
|
Processing by ExampleController#restricted as HTML
|
147
|
-
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
148
|
-
Completed 200 OK in 1.
|
149
|
-
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-01-
|
147
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
148
|
+
Completed 200 OK in 1.5ms (Views: 0.3ms | ActiveRecord: 0.2ms)
|
149
|
+
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-01-28 12:06:21 +0000
|
150
150
|
Processing by ExampleController#this_requires_signin_permission as HTML
|
151
151
|
Authenticating with gds_sso strategy
|
152
|
-
Completed in
|
153
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-
|
154
|
-
Started GET "/auth/gds/callback?code=
|
152
|
+
Completed in 1.0ms
|
153
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-28 12:06:21 +0000
|
154
|
+
Started GET "/auth/gds/callback?code=df5983331b8cce345612b04dc646bc0cdf48844522ac9f15c39841f93dca5614&state=03808b1decb62bfea6703186e24b3e83c29813c32335271f" for 127.0.0.1 at 2014-01-28 12:06:21 +0000
|
155
155
|
Processing by AuthenticationsController#callback as HTML
|
156
|
-
Parameters: {"code"=>"
|
156
|
+
Parameters: {"code"=>"df5983331b8cce345612b04dc646bc0cdf48844522ac9f15c39841f93dca5614", "state"=>"03808b1decb62bfea6703186e24b3e83c29813c32335271f"}
|
157
157
|
Authenticating with gds_sso strategy
|
158
158
|
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
159
159
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
160
|
-
[1m[35m (0.
|
160
|
+
[1m[35m (0.1ms)[0m UPDATE "users" SET "permissions" = '---
|
161
161
|
- signin
|
162
162
|
' WHERE "users"."id" = 11
|
163
|
-
[1m[36m (10.
|
163
|
+
[1m[36m (10.3ms)[0m [1mcommit transaction[0m
|
164
164
|
[1m[35m (0.0ms)[0m begin transaction
|
165
|
-
[1m[36m (0.
|
165
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
166
166
|
- signin
|
167
167
|
' WHERE "users"."id" = 11[0m
|
168
|
-
[1m[35m (7.
|
168
|
+
[1m[35m (7.5ms)[0m commit transaction
|
169
169
|
Redirected to http://www.example-client.com/this_requires_signin_permission
|
170
|
-
Completed 302 Found in
|
171
|
-
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-01-
|
170
|
+
Completed 302 Found in 22.4ms (ActiveRecord: 18.3ms)
|
171
|
+
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-01-28 12:06:21 +0000
|
172
172
|
Processing by ExampleController#this_requires_signin_permission as HTML
|
173
|
-
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
174
|
-
Completed 200 OK in 1.
|
175
|
-
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-01-
|
173
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
174
|
+
Completed 200 OK in 1.5ms (Views: 0.4ms | ActiveRecord: 0.2ms)
|
175
|
+
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-01-28 12:06:21 +0000
|
176
176
|
Processing by ExampleController#this_requires_signin_permission as HTML
|
177
177
|
Authenticating with gds_sso strategy
|
178
|
-
Completed in 0.
|
179
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-
|
180
|
-
Started GET "/auth/gds/callback?code=
|
178
|
+
Completed in 0.3ms
|
179
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-28 12:06:21 +0000
|
180
|
+
Started GET "/auth/gds/callback?code=0c03b317301bb64cd2b940ceb43a16cc676afb23d55fb85fb714825f594faaf7&state=ffb1adf63ff365631c1d1a41f1394f7a413c08c3e34ec507" for 127.0.0.1 at 2014-01-28 12:06:21 +0000
|
181
181
|
Processing by AuthenticationsController#callback as HTML
|
182
|
-
Parameters: {"code"=>"
|
182
|
+
Parameters: {"code"=>"0c03b317301bb64cd2b940ceb43a16cc676afb23d55fb85fb714825f594faaf7", "state"=>"ffb1adf63ff365631c1d1a41f1394f7a413c08c3e34ec507"}
|
183
183
|
Authenticating with gds_sso strategy
|
184
184
|
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
185
185
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
186
186
|
[1m[35m (0.2ms)[0m UPDATE "users" SET "permissions" = '---
|
187
187
|
- signin
|
188
188
|
' WHERE "users"."id" = 11
|
189
|
-
[1m[36m (10.
|
189
|
+
[1m[36m (10.3ms)[0m [1mcommit transaction[0m
|
190
190
|
[1m[35m (0.1ms)[0m begin transaction
|
191
|
-
[1m[36m (0.
|
191
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
192
192
|
- signin
|
193
193
|
' WHERE "users"."id" = 11[0m
|
194
|
-
[1m[35m (
|
194
|
+
[1m[35m (7.9ms)[0m commit transaction
|
195
195
|
Redirected to http://www.example-client.com/this_requires_signin_permission
|
196
|
-
Completed 302 Found in
|
197
|
-
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-01-
|
196
|
+
Completed 302 Found in 22.9ms (ActiveRecord: 18.9ms)
|
197
|
+
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-01-28 12:06:21 +0000
|
198
198
|
Processing by ExampleController#this_requires_signin_permission as HTML
|
199
|
-
[1m[36mUser Load (0.
|
200
|
-
Completed 200 OK in 1.4ms (Views: 0.3ms | ActiveRecord: 0.
|
201
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
199
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
200
|
+
Completed 200 OK in 1.4ms (Views: 0.3ms | ActiveRecord: 0.2ms)
|
201
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-28 12:06:21 +0000
|
202
202
|
Processing by ExampleController#restricted as HTML
|
203
203
|
Authenticating with gds_sso strategy
|
204
204
|
Completed in 0.2ms
|
205
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-
|
206
|
-
Started GET "/auth/gds/callback?code=
|
205
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-28 12:06:21 +0000
|
206
|
+
Started GET "/auth/gds/callback?code=a39962c51f86b1f459427f7ae97304d2d468d1cf6e721ca6041089889daa81c2&state=2890c4de4d8d349c25d5ed2ce298366fb75ddd9bd12dfadf" for 127.0.0.1 at 2014-01-28 12:06:22 +0000
|
207
207
|
Processing by AuthenticationsController#callback as HTML
|
208
|
-
Parameters: {"code"=>"
|
208
|
+
Parameters: {"code"=>"a39962c51f86b1f459427f7ae97304d2d468d1cf6e721ca6041089889daa81c2", "state"=>"2890c4de4d8d349c25d5ed2ce298366fb75ddd9bd12dfadf"}
|
209
209
|
Authenticating with gds_sso strategy
|
210
|
-
[1m[35mUser Load (0.
|
210
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
211
211
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
212
|
-
[1m[35m (0.
|
212
|
+
[1m[35m (0.3ms)[0m UPDATE "users" SET "permissions" = '---
|
213
213
|
- signin
|
214
214
|
' WHERE "users"."id" = 11
|
215
215
|
[1m[36m (9.9ms)[0m [1mcommit transaction[0m
|
@@ -217,141 +217,133 @@ Authenticating with gds_sso strategy
|
|
217
217
|
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
218
218
|
- signin
|
219
219
|
' WHERE "users"."id" = 11[0m
|
220
|
-
[1m[35m (
|
220
|
+
[1m[35m (8.7ms)[0m commit transaction
|
221
221
|
Redirected to http://www.example-client.com/restricted
|
222
|
-
Completed 302 Found in
|
223
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
222
|
+
Completed 302 Found in 27.4ms (ActiveRecord: 19.6ms)
|
223
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-28 12:06:22 +0000
|
224
224
|
Processing by ExampleController#restricted as HTML
|
225
|
-
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
226
|
-
Completed 200 OK in
|
227
|
-
[1m[35mUser Load (0.
|
225
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
226
|
+
Completed 200 OK in 2.2ms (Views: 0.7ms | ActiveRecord: 0.2ms)
|
227
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'test@example-client.com' LIMIT 1
|
228
228
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
229
|
-
[1m[35m (0.
|
229
|
+
[1m[35m (0.1ms)[0m UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
|
230
230
|
- signin
|
231
231
|
' WHERE "users"."id" = 11
|
232
|
-
[1m[36m (
|
233
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
234
|
-
Processing by ExampleController#restricted as HTML
|
235
|
-
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
236
|
-
Filter chain halted as :authenticate_user! rendered or redirected
|
237
|
-
Completed 403 Forbidden in 3.5ms (Views: 2.3ms | ActiveRecord: 0.2ms)
|
238
|
-
Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2014-01-24 10:51:12 +0000
|
239
|
-
Processing by AuthenticationsController#sign_out as HTML
|
240
|
-
Redirected to http://localhost:4567/users/sign_out
|
241
|
-
Completed 302 Found in 0.5ms (ActiveRecord: 0.0ms)
|
242
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-24 10:51:13 +0000
|
232
|
+
[1m[36m (8.1ms)[0m [1mcommit transaction[0m
|
233
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-28 12:06:22 +0000
|
243
234
|
Processing by ExampleController#restricted as HTML
|
235
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
|
244
236
|
Authenticating with gds_sso strategy
|
245
|
-
Completed in
|
246
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-
|
247
|
-
Started GET "/auth/gds/callback?code=
|
237
|
+
Completed in 1.3ms
|
238
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-28 12:06:22 +0000
|
239
|
+
Started GET "/auth/gds/callback?code=06ab784306b56de665a546c623f7930128ff9d34e000d72463a6fcf43b9fbfbf&state=c9e9e4067b58804fcb5f51368a49914e3572748b9fea5140" for 127.0.0.1 at 2014-01-28 12:06:22 +0000
|
248
240
|
Processing by AuthenticationsController#callback as HTML
|
249
|
-
Parameters: {"code"=>"
|
241
|
+
Parameters: {"code"=>"06ab784306b56de665a546c623f7930128ff9d34e000d72463a6fcf43b9fbfbf", "state"=>"c9e9e4067b58804fcb5f51368a49914e3572748b9fea5140"}
|
250
242
|
Authenticating with gds_sso strategy
|
251
|
-
[1m[36mUser Load (0.
|
243
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
252
244
|
[1m[35m (0.0ms)[0m begin transaction
|
253
245
|
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
254
246
|
- signin
|
255
247
|
' WHERE "users"."id" = 11[0m
|
256
|
-
[1m[35m (
|
248
|
+
[1m[35m (13.7ms)[0m commit transaction
|
257
249
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
258
250
|
[1m[35m (0.2ms)[0m UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
|
259
251
|
- signin
|
260
252
|
' WHERE "users"."id" = 11
|
261
|
-
[1m[36m (
|
253
|
+
[1m[36m (8.9ms)[0m [1mcommit transaction[0m
|
262
254
|
Redirected to http://www.example-client.com/restricted
|
263
|
-
Completed 302 Found in
|
264
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
255
|
+
Completed 302 Found in 28.0ms (ActiveRecord: 23.4ms)
|
256
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-28 12:06:22 +0000
|
265
257
|
Processing by ExampleController#restricted as HTML
|
266
|
-
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
267
|
-
Completed 200 OK in 1.
|
268
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
258
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
|
259
|
+
Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.2ms)
|
260
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-28 12:06:22 +0000
|
269
261
|
Processing by ExampleController#restricted as HTML
|
270
262
|
Authenticating with gds_sso strategy
|
271
263
|
Completed in 0.2ms
|
272
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-
|
273
|
-
Started GET "/auth/gds/callback?code=
|
264
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-28 12:06:22 +0000
|
265
|
+
Started GET "/auth/gds/callback?code=361e6a6151fc8f9a28864bec1cb88d516d0901ff9dcdf5182d448c5e04c1086b&state=2996cc333d5d82abc129d372c87396a7af45eb8d2e5eebc7" for 127.0.0.1 at 2014-01-28 12:06:22 +0000
|
274
266
|
Processing by AuthenticationsController#callback as HTML
|
275
|
-
Parameters: {"code"=>"
|
267
|
+
Parameters: {"code"=>"361e6a6151fc8f9a28864bec1cb88d516d0901ff9dcdf5182d448c5e04c1086b", "state"=>"2996cc333d5d82abc129d372c87396a7af45eb8d2e5eebc7"}
|
276
268
|
Authenticating with gds_sso strategy
|
277
|
-
[1m[36mUser Load (0.
|
269
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
278
270
|
[1m[35m (0.1ms)[0m begin transaction
|
279
|
-
[1m[36m (0.
|
271
|
+
[1m[36m (0.3ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
280
272
|
- signin
|
281
273
|
' WHERE "users"."id" = 11[0m
|
282
|
-
[1m[35m (
|
274
|
+
[1m[35m (8.5ms)[0m commit transaction
|
283
275
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
284
276
|
[1m[35m (0.2ms)[0m UPDATE "users" SET "permissions" = '---
|
285
277
|
- signin
|
286
278
|
' WHERE "users"."id" = 11
|
287
|
-
[1m[36m (
|
279
|
+
[1m[36m (5.0ms)[0m [1mcommit transaction[0m
|
288
280
|
Redirected to http://www.example-client.com/restricted
|
289
|
-
Completed 302 Found in
|
290
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
281
|
+
Completed 302 Found in 21.8ms (ActiveRecord: 14.4ms)
|
282
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-28 12:06:23 +0000
|
291
283
|
Processing by ExampleController#restricted as HTML
|
292
|
-
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
293
|
-
Completed 200 OK in 1.
|
294
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
284
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
|
285
|
+
Completed 200 OK in 1.8ms (Views: 0.5ms | ActiveRecord: 0.2ms)
|
286
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-29 08:11:23 +0000
|
295
287
|
Processing by ExampleController#restricted as HTML
|
296
288
|
Authenticating with gds_sso strategy
|
297
|
-
Completed in 0.
|
298
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-
|
299
|
-
Started GET "/auth/gds/callback?code=
|
289
|
+
Completed in 0.4ms
|
290
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-29 08:11:23 +0000
|
291
|
+
Started GET "/auth/gds/callback?code=f66465b718481180bd28b0d89baf7b673130d7ec350f5485571dbca9eaf6f089&state=773049e2a1ca6b484a060189b52ddef6ab6f6c95d646b6e4" for 127.0.0.1 at 2014-01-29 08:11:23 +0000
|
300
292
|
Processing by AuthenticationsController#callback as HTML
|
301
|
-
Parameters: {"code"=>"
|
293
|
+
Parameters: {"code"=>"f66465b718481180bd28b0d89baf7b673130d7ec350f5485571dbca9eaf6f089", "state"=>"773049e2a1ca6b484a060189b52ddef6ab6f6c95d646b6e4"}
|
302
294
|
Authenticating with gds_sso strategy
|
303
295
|
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
304
296
|
[1m[35m (0.0ms)[0m begin transaction
|
305
297
|
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
306
298
|
- signin
|
307
299
|
' WHERE "users"."id" = 11[0m
|
308
|
-
[1m[35m (
|
300
|
+
[1m[35m (6.5ms)[0m commit transaction
|
309
301
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
310
302
|
[1m[35m (0.2ms)[0m UPDATE "users" SET "permissions" = '---
|
311
303
|
- signin
|
312
304
|
' WHERE "users"."id" = 11
|
313
|
-
[1m[36m (
|
305
|
+
[1m[36m (6.2ms)[0m [1mcommit transaction[0m
|
314
306
|
Redirected to http://www.example-client.com/restricted
|
315
|
-
Completed 302 Found in
|
316
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
307
|
+
Completed 302 Found in 17.0ms (ActiveRecord: 13.3ms)
|
308
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-29 08:11:23 +0000
|
317
309
|
Processing by ExampleController#restricted as HTML
|
318
|
-
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
319
|
-
Completed 200 OK in 1.
|
320
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
310
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
|
311
|
+
Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
312
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-28 12:06:23 +0000
|
321
313
|
Processing by ExampleController#restricted as HTML
|
322
314
|
Authenticating with gds_sso strategy
|
323
315
|
Completed in 0.2ms
|
324
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-
|
325
|
-
Started GET "/auth/gds/callback?code=
|
316
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-01-28 12:06:23 +0000
|
317
|
+
Started GET "/auth/gds/callback?code=c907539bdb4394222bfcde63eb2bf52d7621c6108a163f59fbe51f61e3f497bd&state=9ede945ae9ae047734797b919de32ae02eab30153963e8ba" for 127.0.0.1 at 2014-01-28 12:06:23 +0000
|
326
318
|
Processing by AuthenticationsController#callback as HTML
|
327
|
-
Parameters: {"code"=>"
|
319
|
+
Parameters: {"code"=>"c907539bdb4394222bfcde63eb2bf52d7621c6108a163f59fbe51f61e3f497bd", "state"=>"9ede945ae9ae047734797b919de32ae02eab30153963e8ba"}
|
328
320
|
Authenticating with gds_sso strategy
|
329
321
|
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
330
322
|
[1m[35m (0.1ms)[0m begin transaction
|
331
|
-
[1m[36m (0.
|
323
|
+
[1m[36m (0.3ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
332
324
|
- signin
|
333
325
|
' WHERE "users"."id" = 11[0m
|
334
|
-
[1m[35m (
|
326
|
+
[1m[35m (6.8ms)[0m commit transaction
|
335
327
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
336
328
|
[1m[35m (0.2ms)[0m UPDATE "users" SET "permissions" = '---
|
337
329
|
- signin
|
338
330
|
' WHERE "users"."id" = 11
|
339
|
-
[1m[36m (
|
331
|
+
[1m[36m (5.9ms)[0m [1mcommit transaction[0m
|
340
332
|
Redirected to http://www.example-client.com/restricted
|
341
|
-
Completed 302 Found in
|
342
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
333
|
+
Completed 302 Found in 21.3ms (ActiveRecord: 13.8ms)
|
334
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-28 12:06:23 +0000
|
343
335
|
Processing by ExampleController#restricted as HTML
|
344
|
-
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
345
|
-
Completed 200 OK in 1.
|
346
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
336
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
|
337
|
+
Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.2ms)
|
338
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-29 08:01:23 +0000
|
347
339
|
Processing by ExampleController#restricted as HTML
|
348
|
-
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
349
|
-
Completed 200 OK in 1.
|
350
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
340
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
341
|
+
Completed 200 OK in 1.2ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
342
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-28 12:06:23 +0000
|
351
343
|
Processing by ExampleController#restricted as JSON
|
352
344
|
Authenticating with gds_bearer_token strategy
|
353
|
-
Completed in
|
354
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-01-
|
345
|
+
Completed in 7.8ms
|
346
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-01-28 12:06:23 +0000
|
355
347
|
Processing by ExampleController#restricted as JSON
|
356
348
|
Authenticating with gds_bearer_token strategy
|
357
349
|
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
@@ -359,25 +351,25 @@ Authenticating with gds_bearer_token strategy
|
|
359
351
|
[1m[35m (0.2ms)[0m UPDATE "users" SET "permissions" = '---
|
360
352
|
- signin
|
361
353
|
' WHERE "users"."id" = 11
|
362
|
-
[1m[36m (
|
363
|
-
[1m[35m (0.
|
364
|
-
[1m[36m (0.
|
354
|
+
[1m[36m (5.3ms)[0m [1mcommit transaction[0m
|
355
|
+
[1m[35m (0.0ms)[0m begin transaction
|
356
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
365
357
|
- signin
|
366
358
|
' WHERE "users"."id" = 11[0m
|
367
|
-
[1m[35m (
|
368
|
-
Completed 200 OK in
|
369
|
-
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-01-
|
359
|
+
[1m[35m (4.8ms)[0m commit transaction
|
360
|
+
Completed 200 OK in 43.0ms (Views: 0.2ms | ActiveRecord: 10.5ms)
|
361
|
+
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-01-28 12:06:23 +0000
|
370
362
|
Processing by ExampleController#this_requires_signin_permission as JSON
|
371
363
|
Authenticating with gds_bearer_token strategy
|
372
|
-
[1m[36mUser Load (0.
|
373
|
-
[1m[35m (0.
|
364
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
365
|
+
[1m[35m (0.1ms)[0m begin transaction
|
374
366
|
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
375
367
|
- signin
|
376
368
|
' WHERE "users"."id" = 11[0m
|
377
|
-
[1m[35m (
|
369
|
+
[1m[35m (6.5ms)[0m commit transaction
|
378
370
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
379
371
|
[1m[35m (0.2ms)[0m UPDATE "users" SET "permissions" = '---
|
380
372
|
- signin
|
381
373
|
' WHERE "users"."id" = 11
|
382
|
-
[1m[36m (
|
383
|
-
Completed 200 OK in 61.5ms (Views: 0.
|
374
|
+
[1m[36m (5.4ms)[0m [1mcommit transaction[0m
|
375
|
+
Completed 200 OK in 61.5ms (Views: 0.4ms | ActiveRecord: 12.7ms)
|
@@ -87,28 +87,24 @@ describe "Integration of client using GDS-SSO with signonotron" do
|
|
87
87
|
page.driver.header 'accept', 'text/html'
|
88
88
|
page.should have_content('restricted kablooie')
|
89
89
|
|
90
|
-
#
|
90
|
+
# logout from signon
|
91
|
+
visit "http://localhost:4567/users/sign_out"
|
92
|
+
|
93
|
+
# Simulate a POST to /auth/gds/api/users/:uid/reauth by signon
|
91
94
|
# This is already tested in api_user_controller_spec.rb
|
92
|
-
user = User.where(:
|
95
|
+
user = User.where(:email => "test@example-client.com").first
|
93
96
|
user.set_remotely_signed_out!
|
94
97
|
|
95
|
-
|
96
|
-
|
97
|
-
# check we can't visit
|
98
|
+
# attempt to visit a restricted page
|
98
99
|
visit "http://#{@client_host}/restricted"
|
99
|
-
page.should have_content('You have been remotely signed out')
|
100
100
|
|
101
|
-
#
|
102
|
-
|
103
|
-
# Workaround Devise treating us like we're not HTML by manually signin in
|
104
|
-
# If we weren't signed out, we wouldn't get the login form, we'd get the dashboard.
|
105
|
-
visit "http://localhost:4567/users/sign_in"
|
101
|
+
# be redirected to signon
|
102
|
+
page.should have_content('GOV.UK Signon')
|
106
103
|
fill_in "Email", :with => "test@example-client.com"
|
107
104
|
fill_in "Passphrase", :with => "q1w2e3r4t5y6u7i8o9p0"
|
108
105
|
click_on "Sign in"
|
109
106
|
|
110
|
-
#
|
111
|
-
visit "http://#{@client_host}/restricted"
|
107
|
+
# then back again to the restricted page
|
112
108
|
page.should have_content('restricted kablooie')
|
113
109
|
end
|
114
110
|
end
|
@@ -31,6 +31,7 @@ namespace :signonotron do
|
|
31
31
|
end
|
32
32
|
env_stuff += " RAILS_ENV=test"
|
33
33
|
|
34
|
+
puts "Running bundler"
|
34
35
|
puts `#{env_stuff} bundle install --path=#{gem_root + 'tmp' + "#{@app_to_launch}_bundle"}`
|
35
36
|
FileUtils.cp gem_root.join('spec', 'fixtures', 'integration', "#{@app_to_launch}_database.yml"), File.join('config', 'database.yml')
|
36
37
|
puts `#{env_stuff} bundle exec rake db:drop db:create db:schema:load`
|
@@ -33,7 +33,7 @@ class SessionSerialisationTest < Test::Unit::TestCase
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def test_deserializing_a_user_and_in_date_timestamp_returns_the_user
|
36
|
-
User.expects(:where).with(:uid => 1234).returns(stub(:first => :a_user))
|
36
|
+
User.expects(:where).with(:uid => 1234, :remotely_signed_out => false).returns(stub(:first => :a_user))
|
37
37
|
|
38
38
|
result = @serializer.deserialize [1234, Time.now.utc - GDS::SSO::Config.auth_valid_for + 3600]
|
39
39
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gds-sso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-01-
|
13
|
+
date: 2014-01-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -332,7 +332,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
332
332
|
version: '0'
|
333
333
|
segments:
|
334
334
|
- 0
|
335
|
-
hash:
|
335
|
+
hash: 1644539480887075613
|
336
336
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
337
337
|
none: false
|
338
338
|
requirements:
|
@@ -341,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
341
341
|
version: '0'
|
342
342
|
segments:
|
343
343
|
- 0
|
344
|
-
hash:
|
344
|
+
hash: 1644539480887075613
|
345
345
|
requirements: []
|
346
346
|
rubyforge_project: gds-sso
|
347
347
|
rubygems_version: 1.8.23
|