gds-sso 9.2.5 → 9.2.6
Sign up to get free protection for your applications and to get access to all the features.
data/lib/gds-sso/version.rb
CHANGED
@@ -17,16 +17,23 @@ end
|
|
17
17
|
|
18
18
|
Warden::Manager.serialize_into_session do |user|
|
19
19
|
if user.respond_to?(:uid) and user.uid
|
20
|
-
[user.uid, Time.now.utc]
|
20
|
+
[user.uid, Time.now.utc.iso8601]
|
21
21
|
else
|
22
22
|
nil
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
Warden::Manager.serialize_from_session do |
|
27
|
-
# This will reject old sessions that don't have
|
28
|
-
|
29
|
-
|
26
|
+
Warden::Manager.serialize_from_session do |(uid, auth_timestamp)|
|
27
|
+
# This will reject old sessions that don't have a previous login timestamp
|
28
|
+
if auth_timestamp.is_a?(String)
|
29
|
+
auth_timestamp = begin
|
30
|
+
Time.parse(auth_timestamp)
|
31
|
+
rescue ArgumentError
|
32
|
+
nil
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
if auth_timestamp and (auth_timestamp + GDS::SSO::Config.auth_valid_for) > Time.now.utc
|
30
37
|
GDS::SSO::Config.user_klass.where(:uid => uid, :remotely_signed_out => false).first
|
31
38
|
else
|
32
39
|
nil
|
@@ -8,8 +8,8 @@ DELETE FROM `users`;
|
|
8
8
|
-- Setup fixture data
|
9
9
|
INSERT INTO `oauth_applications` (id, name, uid, secret, redirect_uri, created_at, updated_at, home_uri, description)
|
10
10
|
VALUES (1,'GDS_SSO integration test','gds-sso-test','secret','http://www.example-client.com/auth/gds/callback','2012-04-19 13:26:54','2012-04-19 13:26:54', 'http://home.com', 'GDS_SSO integration test');
|
11
|
-
INSERT INTO `users` (id, email, encrypted_password, created_at, updated_at, confirmed_at, name, uid, role)
|
12
|
-
VALUES (1,'test@example-client.com','
|
11
|
+
INSERT INTO `users` (id, email, encrypted_password, password_salt, created_at, updated_at, confirmed_at, name, uid, role)
|
12
|
+
VALUES (1,'test@example-client.com','bb8e19edbaa1e7721abe0faa5c1663a7685950093b8c7eceb0f2e3889bdea4c5f17ca97820b2c663edf46ea532d1a9baa04b680fc537b4de8a3f376dd28e3ffd','MpLsZ8q1UaAojTa6bTC6','2012-04-19 13:26:54','2012-04-19 13:26:54','2012-04-19 13:26:54','Test User','integration-uid', "normal");
|
13
13
|
INSERT INTO `permissions` (id, user_id, application_id, permissions) VALUES (1,1,1,"---
|
14
14
|
- signin
|
15
15
|
");
|
Binary file
|
data/spec/internal/log/test.log
CHANGED
@@ -1,376 +1,376 @@
|
|
1
1
|
Connecting to database specified by database.yml
|
2
|
-
[1m[36m (
|
3
|
-
[1m[35m (
|
4
|
-
[1m[36m (
|
5
|
-
[1m[35m (
|
2
|
+
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
3
|
+
[1m[35m (11.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.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
5
|
+
[1m[35m (8.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
6
6
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7
|
-
[1m[35mSQL (
|
8
|
-
[1m[36m (11.
|
7
|
+
[1m[35mSQL (26.9ms)[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", "a1s2d31105"]]
|
8
|
+
[1m[36m (11.3ms)[0m [1mcommit transaction[0m
|
9
9
|
[1m[35m (0.1ms)[0m begin transaction
|
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", "
|
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", "a1s2d32139"]]
|
11
|
+
[1m[35m (13.4ms)[0m commit transaction
|
12
12
|
WARNING: Can't mass-assign protected attributes: uid, name, permissions
|
13
|
-
Processing by Api::UserController#
|
14
|
-
Parameters: {"uid"=>"
|
15
|
-
Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.
|
16
|
-
Completed 403 Forbidden in
|
13
|
+
Processing by Api::UserController#reauth as HTML
|
14
|
+
Parameters: {"uid"=>"a1s2d31105"}
|
15
|
+
Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.2ms)
|
16
|
+
Completed 403 Forbidden in 35.5ms (Views: 34.8ms | 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 (
|
20
|
-
[1m[35m (0.0ms)[0m begin transaction
|
21
|
-
[1m[36mSQL (0.1ms)[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", "a1s2d33143"]]
|
22
|
-
[1m[35m (18.6ms)[0m commit transaction
|
23
|
-
Processing by Api::UserController#update as HTML
|
24
|
-
Parameters: {"uid"=>"a1s2d31715"}
|
25
|
-
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d31715' LIMIT 1[0m
|
26
|
-
[1m[35m (0.0ms)[0m begin transaction
|
27
|
-
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '---
|
28
|
-
- signin
|
29
|
-
- new permission
|
30
|
-
', "organisation_slug" = 'justice-league' WHERE "users"."id" = 3[0m
|
31
|
-
[1m[35m (7.3ms)[0m commit transaction
|
32
|
-
Completed 200 OK in 15.1ms (ActiveRecord: 7.8ms)
|
33
|
-
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 3]]
|
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", "a1s2d31032"]]
|
19
|
+
[1m[36m (11.2ms)[0m [1mcommit transaction[0m
|
34
20
|
[1m[35m (0.1ms)[0m begin transaction
|
35
|
-
[1m[36mSQL (0.
|
36
|
-
[1m[35m (
|
37
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
38
|
-
[1m[35mSQL (0.2ms)[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", "a1s2d33744"]]
|
39
|
-
[1m[36m (10.7ms)[0m [1mcommit transaction[0m
|
21
|
+
[1m[36mSQL (0.1ms)[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", "a1s2d33736"]]
|
22
|
+
[1m[35m (11.1ms)[0m commit transaction
|
40
23
|
Processing by Api::UserController#reauth as HTML
|
41
24
|
Parameters: {"uid"=>"nonexistent-user"}
|
42
|
-
[1m[
|
43
|
-
Completed 200 OK in
|
44
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
45
|
-
[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", "a1s2d33613"]]
|
46
|
-
[1m[36m (14.0ms)[0m [1mcommit transaction[0m
|
25
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1[0m
|
26
|
+
Completed 200 OK in 26.6ms (ActiveRecord: 0.2ms)
|
47
27
|
[1m[35m (0.1ms)[0m begin transaction
|
48
|
-
[1m[36mSQL (0.
|
49
|
-
[1m[35m (
|
50
|
-
WARNING: Can't mass-assign protected attributes: uid, name, permissions
|
51
|
-
Processing by Api::UserController#reauth as HTML
|
52
|
-
Parameters: {"uid"=>"a1s2d33613"}
|
53
|
-
Completed 403 Forbidden in 1.5ms (Views: 1.0ms | ActiveRecord: 0.0ms)
|
28
|
+
[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", "a1s2d3267"]]
|
29
|
+
[1m[35m (14.1ms)[0m commit transaction
|
54
30
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
55
|
-
[1m[35mSQL (0.
|
56
|
-
[1m[36m (
|
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", "a1s2d31240"]]
|
59
|
-
[1m[35m (9.4ms)[0m commit transaction
|
31
|
+
[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", "a1s2d34802"]]
|
32
|
+
[1m[36m (9.9ms)[0m [1mcommit transaction[0m
|
60
33
|
Processing by Api::UserController#reauth as HTML
|
61
|
-
Parameters: {"uid"=>"
|
62
|
-
[1m[
|
34
|
+
Parameters: {"uid"=>"a1s2d3267"}
|
35
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d3267' LIMIT 1
|
36
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
37
|
+
[1m[35m (0.1ms)[0m UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
|
38
|
+
- signin
|
39
|
+
' WHERE "users"."id" = 5
|
40
|
+
[1m[36m (6.8ms)[0m [1mcommit transaction[0m
|
41
|
+
Completed 200 OK in 10.6ms (ActiveRecord: 7.2ms)
|
42
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 5]]
|
43
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
44
|
+
[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", "a1s2d31538"]]
|
45
|
+
[1m[36m (10.3ms)[0m [1mcommit transaction[0m
|
46
|
+
[1m[35m (0.1ms)[0m begin transaction
|
47
|
+
[1m[36mSQL (0.1ms)[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", "a1s2d38526"]]
|
48
|
+
[1m[35m (8.7ms)[0m commit transaction
|
49
|
+
Processing by Api::UserController#update as HTML
|
50
|
+
Parameters: {"uid"=>"a1s2d31538"}
|
51
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d31538' LIMIT 1[0m
|
63
52
|
[1m[35m (0.0ms)[0m begin transaction
|
64
|
-
[1m[36m (0.
|
53
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '---
|
65
54
|
- signin
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
55
|
+
- new permission
|
56
|
+
', "organisation_slug" = 'justice-league' WHERE "users"."id" = 7[0m
|
57
|
+
[1m[35m (9.2ms)[0m commit transaction
|
58
|
+
Completed 200 OK in 12.5ms (ActiveRecord: 9.5ms)
|
59
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 7]]
|
60
|
+
[1m[35m (0.1ms)[0m begin transaction
|
61
|
+
[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", "a1s2d31443"]]
|
62
|
+
[1m[35m (11.6ms)[0m commit transaction
|
63
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
64
|
+
[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", "a1s2d34469"]]
|
65
|
+
[1m[36m (7.1ms)[0m [1mcommit transaction[0m
|
66
|
+
WARNING: Can't mass-assign protected attributes: uid, name, permissions
|
67
|
+
Processing by Api::UserController#update as HTML
|
68
|
+
Parameters: {"uid"=>"a1s2d31443"}
|
69
|
+
Completed 403 Forbidden in 1.3ms (Views: 0.8ms | ActiveRecord: 0.0ms)
|
70
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-06 15:54:15 +0000
|
71
|
+
Processing by ExampleController#restricted as JSON
|
72
|
+
Authenticating with gds_bearer_token strategy
|
73
|
+
Completed in 137.2ms
|
74
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-06 15:54:15 +0000
|
75
|
+
Processing by ExampleController#restricted as JSON
|
76
|
+
Authenticating with gds_bearer_token strategy
|
79
77
|
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
80
78
|
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'test@example-client.com' LIMIT 1[0m
|
81
|
-
[1m[35m (0.
|
79
|
+
[1m[35m (0.0ms)[0m begin transaction
|
82
80
|
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "test@example-client.com"], ["name", "Test User"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]
|
83
|
-
[1m[35m (
|
84
|
-
[1m[36m (0.
|
85
|
-
[1m[35m (0.
|
81
|
+
[1m[35m (15.8ms)[0m commit transaction
|
82
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
83
|
+
[1m[35m (0.1ms)[0m UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
|
86
84
|
- signin
|
87
85
|
' WHERE "users"."id" = 11
|
88
|
-
[1m[36m (9.
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
[1m[35mUser Load (0.
|
94
|
-
|
95
|
-
|
96
|
-
|
86
|
+
[1m[36m (9.5ms)[0m [1mcommit transaction[0m
|
87
|
+
Completed 200 OK in 380.2ms (Views: 2.9ms | ActiveRecord: 25.9ms)
|
88
|
+
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-05-06 15:54:15 +0000
|
89
|
+
Processing by ExampleController#this_requires_signin_permission as JSON
|
90
|
+
Authenticating with gds_bearer_token strategy
|
91
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
92
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
93
|
+
[1m[35m (0.1ms)[0m UPDATE "users" SET "permissions" = '---
|
94
|
+
- signin
|
95
|
+
' WHERE "users"."id" = 11
|
96
|
+
[1m[36m (11.9ms)[0m [1mcommit transaction[0m
|
97
|
+
[1m[35m (0.1ms)[0m begin transaction
|
98
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
99
|
+
- signin
|
100
|
+
' WHERE "users"."id" = 11[0m
|
101
|
+
[1m[35m (9.2ms)[0m commit transaction
|
102
|
+
Completed 200 OK in 58.5ms (Views: 0.4ms | ActiveRecord: 21.7ms)
|
103
|
+
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-05-06 15:54:16 +0000
|
104
|
+
Processing by ExampleController#this_requires_signin_permission as HTML
|
97
105
|
Authenticating with gds_sso strategy
|
98
106
|
Completed in 0.3ms
|
99
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-
|
100
|
-
Started GET "/auth/gds/callback?code=
|
107
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-05-06 15:54:16 +0000
|
108
|
+
Started GET "/auth/gds/callback?code=b7a8fe5651e40ea7f0f3a11a9833e6fb0d89e92e2e56ba13b58bb5493536e400&state=408da5383e84b5a141a9ec95269ac77041e7e0087e82e652" for 127.0.0.1 at 2014-05-06 15:54:16 +0000
|
101
109
|
Processing by AuthenticationsController#callback as HTML
|
102
|
-
Parameters: {"code"=>"
|
110
|
+
Parameters: {"code"=>"b7a8fe5651e40ea7f0f3a11a9833e6fb0d89e92e2e56ba13b58bb5493536e400", "state"=>"408da5383e84b5a141a9ec95269ac77041e7e0087e82e652"}
|
103
111
|
Authenticating with gds_sso strategy
|
104
112
|
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
105
|
-
[1m[35m (0.
|
113
|
+
[1m[35m (0.0ms)[0m begin transaction
|
106
114
|
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
107
115
|
- signin
|
108
116
|
' WHERE "users"."id" = 11[0m
|
109
|
-
[1m[35m (
|
110
|
-
[1m[36m (0.
|
111
|
-
[1m[35m (0.
|
117
|
+
[1m[35m (10.0ms)[0m commit transaction
|
118
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
119
|
+
[1m[35m (0.1ms)[0m UPDATE "users" SET "permissions" = '---
|
112
120
|
- signin
|
113
121
|
' WHERE "users"."id" = 11
|
114
|
-
[1m[36m (
|
115
|
-
Redirected to http://www.example-client.com/
|
116
|
-
Completed 302 Found in
|
117
|
-
Started GET "/
|
118
|
-
Processing by ExampleController#
|
119
|
-
[1m[35mUser Load (0.
|
120
|
-
Completed 200 OK in 2.
|
121
|
-
Started GET "/
|
122
|
-
Processing by ExampleController#
|
122
|
+
[1m[36m (6.8ms)[0m [1mcommit transaction[0m
|
123
|
+
Redirected to http://www.example-client.com/this_requires_signin_permission
|
124
|
+
Completed 302 Found in 21.8ms (ActiveRecord: 17.4ms)
|
125
|
+
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-05-06 15:54:16 +0000
|
126
|
+
Processing by ExampleController#this_requires_signin_permission as HTML
|
127
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
|
128
|
+
Completed 200 OK in 2.0ms (Views: 0.3ms | ActiveRecord: 0.1ms)
|
129
|
+
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-05-06 15:54:16 +0000
|
130
|
+
Processing by ExampleController#this_requires_signin_permission as HTML
|
123
131
|
Authenticating with gds_sso strategy
|
124
|
-
Completed in 0.
|
125
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-
|
126
|
-
Started GET "/auth/gds/callback?code=
|
132
|
+
Completed in 0.1ms
|
133
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-05-06 15:54:16 +0000
|
134
|
+
Started GET "/auth/gds/callback?code=2f9f66f75458e23525cf3636eae1d60fde7b97ad5f2b30b82e08ad01cd41ba26&state=3da43637553f8b5c012db5e905ede569da7a8b5bb1b01494" for 127.0.0.1 at 2014-05-06 15:54:17 +0000
|
127
135
|
Processing by AuthenticationsController#callback as HTML
|
128
|
-
Parameters: {"code"=>"
|
136
|
+
Parameters: {"code"=>"2f9f66f75458e23525cf3636eae1d60fde7b97ad5f2b30b82e08ad01cd41ba26", "state"=>"3da43637553f8b5c012db5e905ede569da7a8b5bb1b01494"}
|
129
137
|
Authenticating with gds_sso strategy
|
130
|
-
[1m[36mUser Load (0.
|
138
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
131
139
|
[1m[35m (0.0ms)[0m begin transaction
|
132
|
-
[1m[36m (0.
|
140
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
133
141
|
- signin
|
134
142
|
' WHERE "users"."id" = 11[0m
|
135
|
-
[1m[35m (
|
136
|
-
[1m[36m (0.
|
137
|
-
[1m[35m (0.
|
143
|
+
[1m[35m (20.6ms)[0m commit transaction
|
144
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
145
|
+
[1m[35m (0.1ms)[0m UPDATE "users" SET "permissions" = '---
|
138
146
|
- signin
|
139
147
|
' WHERE "users"."id" = 11
|
140
|
-
[1m[36m (
|
141
|
-
Redirected to http://www.example-client.com/
|
142
|
-
Completed 302 Found in
|
143
|
-
Started GET "/
|
144
|
-
Processing by ExampleController#restricted as HTML
|
145
|
-
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
|
146
|
-
Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.2ms)
|
147
|
-
Started GET "/" for 127.0.0.1 at 2014-03-26 15:49:31 +0000
|
148
|
-
Processing by ExampleController#index as HTML
|
149
|
-
Completed 200 OK in 1.3ms (Views: 0.5ms | ActiveRecord: 0.0ms)
|
150
|
-
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-03-26 15:49:31 +0000
|
148
|
+
[1m[36m (14.8ms)[0m [1mcommit transaction[0m
|
149
|
+
Redirected to http://www.example-client.com/this_requires_signin_permission
|
150
|
+
Completed 302 Found in 39.3ms (ActiveRecord: 35.8ms)
|
151
|
+
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-05-06 15:54:17 +0000
|
151
152
|
Processing by ExampleController#this_requires_signin_permission as HTML
|
153
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
|
154
|
+
Completed 200 OK in 4.5ms (Views: 0.7ms | ActiveRecord: 0.1ms)
|
155
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-06 15:54:17 +0000
|
156
|
+
Processing by ExampleController#restricted as HTML
|
152
157
|
Authenticating with gds_sso strategy
|
153
|
-
Completed in
|
154
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-
|
155
|
-
Started GET "/auth/gds/callback?code=
|
158
|
+
Completed in 0.3ms
|
159
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-05-06 15:54:17 +0000
|
160
|
+
Started GET "/auth/gds/callback?code=584f8b50aa15b27e1d58fc86b01c30140a607c9b44ccdd94e74d1f2653eca90a&state=dbc29cfccbf57751b07bb8261abfbe54e96cca1348d3385c" for 127.0.0.1 at 2014-05-06 15:54:17 +0000
|
156
161
|
Processing by AuthenticationsController#callback as HTML
|
157
|
-
Parameters: {"code"=>"
|
162
|
+
Parameters: {"code"=>"584f8b50aa15b27e1d58fc86b01c30140a607c9b44ccdd94e74d1f2653eca90a", "state"=>"dbc29cfccbf57751b07bb8261abfbe54e96cca1348d3385c"}
|
158
163
|
Authenticating with gds_sso strategy
|
159
|
-
[1m[36mUser Load (0.
|
164
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
160
165
|
[1m[35m (0.1ms)[0m begin transaction
|
161
|
-
[1m[36m (0.
|
166
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
162
167
|
- signin
|
163
168
|
' WHERE "users"."id" = 11[0m
|
164
|
-
[1m[35m (
|
169
|
+
[1m[35m (17.8ms)[0m commit transaction
|
165
170
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
166
171
|
[1m[35m (0.1ms)[0m UPDATE "users" SET "permissions" = '---
|
167
172
|
- signin
|
168
173
|
' WHERE "users"."id" = 11
|
169
|
-
[1m[36m (
|
170
|
-
Redirected to http://www.example-client.com/
|
171
|
-
Completed 302 Found in
|
172
|
-
Started GET "/
|
173
|
-
Processing by ExampleController#
|
174
|
+
[1m[36m (11.0ms)[0m [1mcommit transaction[0m
|
175
|
+
Redirected to http://www.example-client.com/restricted
|
176
|
+
Completed 302 Found in 33.2ms (ActiveRecord: 29.2ms)
|
177
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-06 15:54:17 +0000
|
178
|
+
Processing by ExampleController#restricted as HTML
|
174
179
|
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
|
175
|
-
Completed 200 OK in 1.
|
176
|
-
Started GET "/
|
177
|
-
Processing by ExampleController#
|
180
|
+
Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms)
|
181
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-06 15:54:17 +0000
|
182
|
+
Processing by ExampleController#restricted as HTML
|
178
183
|
Authenticating with gds_sso strategy
|
179
184
|
Completed in 0.2ms
|
180
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-
|
181
|
-
Started GET "/auth/gds/callback?code=
|
185
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-05-06 15:54:17 +0000
|
186
|
+
Started GET "/auth/gds/callback?code=84b329588260d4179f0358fbc48d7792beac80124b14be27bf9db95a42dae017&state=518680c61baa4fe72c53ebe49dff88537ff16c68a93368be" for 127.0.0.1 at 2014-05-06 15:54:17 +0000
|
182
187
|
Processing by AuthenticationsController#callback as HTML
|
183
|
-
Parameters: {"code"=>"
|
188
|
+
Parameters: {"code"=>"84b329588260d4179f0358fbc48d7792beac80124b14be27bf9db95a42dae017", "state"=>"518680c61baa4fe72c53ebe49dff88537ff16c68a93368be"}
|
184
189
|
Authenticating with gds_sso strategy
|
185
190
|
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
186
|
-
[1m[35m (0.
|
187
|
-
[1m[36m (0.
|
191
|
+
[1m[35m (0.0ms)[0m begin transaction
|
192
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
188
193
|
- signin
|
189
194
|
' WHERE "users"."id" = 11[0m
|
190
|
-
[1m[35m (
|
195
|
+
[1m[35m (10.2ms)[0m commit transaction
|
191
196
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
192
197
|
[1m[35m (0.1ms)[0m UPDATE "users" SET "permissions" = '---
|
193
198
|
- signin
|
194
199
|
' WHERE "users"."id" = 11
|
195
|
-
[1m[36m (
|
196
|
-
Redirected to http://www.example-client.com/
|
197
|
-
Completed 302 Found in
|
198
|
-
Started GET "/
|
199
|
-
Processing by ExampleController#
|
200
|
-
[1m[35mUser Load (0.
|
201
|
-
Completed 200 OK in 1.
|
202
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
200
|
+
[1m[36m (7.4ms)[0m [1mcommit transaction[0m
|
201
|
+
Redirected to http://www.example-client.com/restricted
|
202
|
+
Completed 302 Found in 22.3ms (ActiveRecord: 18.1ms)
|
203
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-06 15:54:18 +0000
|
204
|
+
Processing by ExampleController#restricted as HTML
|
205
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
|
206
|
+
Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms)
|
207
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-06 15:54:18 +0000
|
203
208
|
Processing by ExampleController#restricted as HTML
|
204
209
|
Authenticating with gds_sso strategy
|
205
|
-
Completed in 0.
|
206
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-
|
207
|
-
Started GET "/auth/gds/callback?code=
|
210
|
+
Completed in 0.2ms
|
211
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-05-06 15:54:18 +0000
|
212
|
+
Started GET "/auth/gds/callback?code=944cb01ba71cf42e00a77c1bbc9133b760bf28220aadf30184612d50ce84cbaf&state=f4661d0f0e69ee6cf821e758b6b61defada574f54c6412db" for 127.0.0.1 at 2014-05-06 15:54:18 +0000
|
208
213
|
Processing by AuthenticationsController#callback as HTML
|
209
|
-
Parameters: {"code"=>"
|
214
|
+
Parameters: {"code"=>"944cb01ba71cf42e00a77c1bbc9133b760bf28220aadf30184612d50ce84cbaf", "state"=>"f4661d0f0e69ee6cf821e758b6b61defada574f54c6412db"}
|
210
215
|
Authenticating with gds_sso strategy
|
211
|
-
[1m[36mUser Load (0.
|
212
|
-
[1m[35m (0.
|
213
|
-
[1m[36m (0.
|
216
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
217
|
+
[1m[35m (0.0ms)[0m begin transaction
|
218
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
214
219
|
- signin
|
215
220
|
' WHERE "users"."id" = 11[0m
|
216
|
-
[1m[35m (
|
221
|
+
[1m[35m (20.9ms)[0m commit transaction
|
217
222
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
218
|
-
[1m[35m (0.
|
223
|
+
[1m[35m (0.1ms)[0m UPDATE "users" SET "permissions" = '---
|
219
224
|
- signin
|
220
225
|
' WHERE "users"."id" = 11
|
221
|
-
[1m[36m (
|
226
|
+
[1m[36m (8.4ms)[0m [1mcommit transaction[0m
|
222
227
|
Redirected to http://www.example-client.com/restricted
|
223
|
-
Completed 302 Found in
|
224
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
228
|
+
Completed 302 Found in 33.8ms (ActiveRecord: 29.9ms)
|
229
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-06 15:54:18 +0000
|
225
230
|
Processing by ExampleController#restricted as HTML
|
226
231
|
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
|
227
|
-
Completed 200 OK in 1.
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
-
|
232
|
-
' WHERE "users"."id" = 11[0m
|
233
|
-
[1m[35m (10.4ms)[0m commit transaction
|
234
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-03-26 15:49:32 +0000
|
232
|
+
Completed 200 OK in 1.2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
233
|
+
Started GET "/" for 127.0.0.1 at 2014-05-06 15:54:18 +0000
|
234
|
+
Processing by ExampleController#index as HTML
|
235
|
+
Completed 200 OK in 0.7ms (Views: 0.4ms | ActiveRecord: 0.0ms)
|
236
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-06 15:54:18 +0000
|
235
237
|
Processing by ExampleController#restricted as HTML
|
236
|
-
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
237
238
|
Authenticating with gds_sso strategy
|
238
|
-
Completed in
|
239
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-
|
240
|
-
Started GET "/auth/gds/callback?code=
|
239
|
+
Completed in 0.2ms
|
240
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-05-06 15:54:18 +0000
|
241
|
+
Started GET "/auth/gds/callback?code=4e983f1c26ad9c7316f5b2b44b26df80faa05df243ecce739db24f6ec6e0fad8&state=fd6b5ea1fea4fcfc3de0825201272b36fbeef8b61c702c05" for 127.0.0.1 at 2014-05-06 15:54:18 +0000
|
241
242
|
Processing by AuthenticationsController#callback as HTML
|
242
|
-
Parameters: {"code"=>"
|
243
|
+
Parameters: {"code"=>"4e983f1c26ad9c7316f5b2b44b26df80faa05df243ecce739db24f6ec6e0fad8", "state"=>"fd6b5ea1fea4fcfc3de0825201272b36fbeef8b61c702c05"}
|
243
244
|
Authenticating with gds_sso strategy
|
244
|
-
[1m[
|
245
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
246
|
-
[1m[35m (0.2ms)[0m UPDATE "users" SET "permissions" = '---
|
247
|
-
- signin
|
248
|
-
' WHERE "users"."id" = 11
|
249
|
-
[1m[36m (15.6ms)[0m [1mcommit transaction[0m
|
245
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
250
246
|
[1m[35m (0.1ms)[0m begin transaction
|
251
|
-
[1m[36m (0.
|
247
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
252
248
|
- signin
|
253
249
|
' WHERE "users"."id" = 11[0m
|
254
|
-
[1m[35m (
|
250
|
+
[1m[35m (9.7ms)[0m commit transaction
|
251
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
252
|
+
[1m[35m (0.1ms)[0m UPDATE "users" SET "permissions" = '---
|
253
|
+
- signin
|
254
|
+
' WHERE "users"."id" = 11
|
255
|
+
[1m[36m (9.3ms)[0m [1mcommit transaction[0m
|
255
256
|
Redirected to http://www.example-client.com/restricted
|
256
|
-
Completed 302 Found in
|
257
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
257
|
+
Completed 302 Found in 23.8ms (ActiveRecord: 19.5ms)
|
258
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-06 15:54:18 +0000
|
258
259
|
Processing by ExampleController#restricted as HTML
|
259
|
-
[1m[
|
260
|
-
Completed 200 OK in 1.
|
261
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
260
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
|
261
|
+
Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms)
|
262
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-07 11:49:19 +0000
|
263
|
+
Processing by ExampleController#restricted as HTML
|
264
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
265
|
+
Completed 200 OK in 0.9ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
266
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-06 15:54:19 +0000
|
262
267
|
Processing by ExampleController#restricted as HTML
|
263
268
|
Authenticating with gds_sso strategy
|
264
269
|
Completed in 0.3ms
|
265
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-
|
266
|
-
Started GET "/auth/gds/callback?code=
|
270
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-05-06 15:54:19 +0000
|
271
|
+
Started GET "/auth/gds/callback?code=967dc585f16766b4455295d015da62575c2c32934ac5cbd90ed912ffa046c0f4&state=98e481aea30d972a9cd7da88bd6824d7b03a19627a5b68e4" for 127.0.0.1 at 2014-05-06 15:54:19 +0000
|
267
272
|
Processing by AuthenticationsController#callback as HTML
|
268
|
-
Parameters: {"code"=>"
|
273
|
+
Parameters: {"code"=>"967dc585f16766b4455295d015da62575c2c32934ac5cbd90ed912ffa046c0f4", "state"=>"98e481aea30d972a9cd7da88bd6824d7b03a19627a5b68e4"}
|
269
274
|
Authenticating with gds_sso strategy
|
270
275
|
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
271
|
-
[1m[36m (0.
|
272
|
-
[1m[35m (0.
|
276
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
277
|
+
[1m[35m (0.1ms)[0m UPDATE "users" SET "permissions" = '---
|
273
278
|
- signin
|
274
279
|
' WHERE "users"."id" = 11
|
275
|
-
[1m[36m (
|
276
|
-
[1m[35m (0.
|
277
|
-
[1m[36m (0.
|
280
|
+
[1m[36m (12.3ms)[0m [1mcommit transaction[0m
|
281
|
+
[1m[35m (0.0ms)[0m begin transaction
|
282
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
278
283
|
- signin
|
279
284
|
' WHERE "users"."id" = 11[0m
|
280
|
-
[1m[35m (
|
285
|
+
[1m[35m (17.2ms)[0m commit transaction
|
281
286
|
Redirected to http://www.example-client.com/restricted
|
282
|
-
Completed 302 Found in
|
283
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
287
|
+
Completed 302 Found in 34.5ms (ActiveRecord: 30.1ms)
|
288
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-06 15:54:19 +0000
|
284
289
|
Processing by ExampleController#restricted as HTML
|
285
|
-
[1m[36mUser Load (0.
|
286
|
-
Completed 200 OK in 1.
|
287
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
290
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
291
|
+
Completed 200 OK in 1.5ms (Views: 0.4ms | ActiveRecord: 0.2ms)
|
292
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-07 11:59:19 +0000
|
288
293
|
Processing by ExampleController#restricted as HTML
|
289
294
|
Authenticating with gds_sso strategy
|
290
|
-
Completed in 0.
|
291
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-
|
292
|
-
Started GET "/auth/gds/callback?code=
|
295
|
+
Completed in 0.3ms
|
296
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-05-07 11:59:19 +0000
|
297
|
+
Started GET "/auth/gds/callback?code=92e8356c4b88dd847c4439415e1f0428cbec8e741982f69c87e504c01f98d445&state=766810bacdbf4a323274685105bf6796e68f16a622d8be41" for 127.0.0.1 at 2014-05-07 11:59:19 +0000
|
293
298
|
Processing by AuthenticationsController#callback as HTML
|
294
|
-
Parameters: {"code"=>"
|
299
|
+
Parameters: {"code"=>"92e8356c4b88dd847c4439415e1f0428cbec8e741982f69c87e504c01f98d445", "state"=>"766810bacdbf4a323274685105bf6796e68f16a622d8be41"}
|
295
300
|
Authenticating with gds_sso strategy
|
296
301
|
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
297
|
-
[1m[36m (0.
|
298
|
-
[1m[35m (0.
|
302
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
303
|
+
[1m[35m (0.1ms)[0m UPDATE "users" SET "permissions" = '---
|
299
304
|
- signin
|
300
305
|
' WHERE "users"."id" = 11
|
301
|
-
[1m[36m (
|
302
|
-
[1m[35m (0.
|
303
|
-
[1m[36m (0.
|
306
|
+
[1m[36m (11.0ms)[0m [1mcommit transaction[0m
|
307
|
+
[1m[35m (0.0ms)[0m begin transaction
|
308
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
304
309
|
- signin
|
305
310
|
' WHERE "users"."id" = 11[0m
|
306
|
-
[1m[35m (
|
311
|
+
[1m[35m (10.9ms)[0m commit transaction
|
307
312
|
Redirected to http://www.example-client.com/restricted
|
308
|
-
Completed 302 Found in
|
309
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
313
|
+
Completed 302 Found in 26.1ms (ActiveRecord: 22.5ms)
|
314
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-07 11:59:19 +0000
|
310
315
|
Processing by ExampleController#restricted as HTML
|
311
|
-
[1m[36mUser Load (0.
|
312
|
-
Completed 200 OK in 1.
|
313
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
316
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
317
|
+
Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms)
|
318
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-06 15:54:19 +0000
|
314
319
|
Processing by ExampleController#restricted as HTML
|
315
320
|
Authenticating with gds_sso strategy
|
316
|
-
Completed in 0.
|
317
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-
|
318
|
-
Started GET "/auth/gds/callback?code=
|
321
|
+
Completed in 0.3ms
|
322
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-05-06 15:54:19 +0000
|
323
|
+
Started GET "/auth/gds/callback?code=5ecea67f4e940da2c33a0c8a6df846604bc6b448649c2c5154a3208fdb9f8a95&state=5cfcb5f00cfb66545f931a397ffe037e89e8a4e3dd99d830" for 127.0.0.1 at 2014-05-06 15:54:19 +0000
|
319
324
|
Processing by AuthenticationsController#callback as HTML
|
320
|
-
Parameters: {"code"=>"
|
325
|
+
Parameters: {"code"=>"5ecea67f4e940da2c33a0c8a6df846604bc6b448649c2c5154a3208fdb9f8a95", "state"=>"5cfcb5f00cfb66545f931a397ffe037e89e8a4e3dd99d830"}
|
321
326
|
Authenticating with gds_sso strategy
|
322
327
|
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
323
|
-
[1m[36m (0.
|
324
|
-
[1m[35m (0.
|
328
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
329
|
+
[1m[35m (0.1ms)[0m UPDATE "users" SET "permissions" = '---
|
325
330
|
- signin
|
326
331
|
' WHERE "users"."id" = 11
|
327
|
-
[1m[36m (
|
332
|
+
[1m[36m (9.5ms)[0m [1mcommit transaction[0m
|
328
333
|
[1m[35m (0.0ms)[0m begin transaction
|
329
334
|
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
330
335
|
- signin
|
331
336
|
' WHERE "users"."id" = 11[0m
|
332
|
-
[1m[35m (
|
337
|
+
[1m[35m (7.3ms)[0m commit transaction
|
333
338
|
Redirected to http://www.example-client.com/restricted
|
334
|
-
Completed 302 Found in
|
335
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
336
|
-
Processing by ExampleController#restricted as HTML
|
337
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
338
|
-
Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.1ms)
|
339
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-03-27 11:44:34 +0000
|
339
|
+
Completed 302 Found in 21.8ms (ActiveRecord: 17.4ms)
|
340
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-06 15:54:19 +0000
|
340
341
|
Processing by ExampleController#restricted as HTML
|
341
|
-
[1m[
|
342
|
-
Completed 200 OK in 1.
|
343
|
-
|
344
|
-
Processing by ExampleController#restricted as JSON
|
345
|
-
Authenticating with gds_bearer_token strategy
|
346
|
-
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
347
|
-
[1m[35m (0.1ms)[0m begin transaction
|
348
|
-
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
349
|
-
- signin
|
350
|
-
' WHERE "users"."id" = 11[0m
|
351
|
-
[1m[35m (10.0ms)[0m commit transaction
|
342
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
343
|
+
Completed 200 OK in 1.4ms (Views: 0.3ms | ActiveRecord: 0.2ms)
|
344
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'test@example-client.com' LIMIT 1
|
352
345
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
353
|
-
[1m[35m (0.1ms)[0m UPDATE "users" SET "permissions" = '---
|
346
|
+
[1m[35m (0.1ms)[0m UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
|
354
347
|
- signin
|
355
348
|
' WHERE "users"."id" = 11
|
356
|
-
[1m[36m (
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
Authenticating with
|
361
|
-
Completed in
|
362
|
-
Started GET "/
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
[1m[
|
368
|
-
- signin
|
369
|
-
' WHERE "users"."id" = 11
|
370
|
-
[1m[36m (12.2ms)[0m [1mcommit transaction[0m
|
349
|
+
[1m[36m (8.6ms)[0m [1mcommit transaction[0m
|
350
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-06 15:54:20 +0000
|
351
|
+
Processing by ExampleController#restricted as HTML
|
352
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
|
353
|
+
Authenticating with gds_sso strategy
|
354
|
+
Completed in 0.8ms
|
355
|
+
Started GET "/auth/gds" for 127.0.0.1 at 2014-05-06 15:54:20 +0000
|
356
|
+
Started GET "/auth/gds/callback?code=08fad3db2e47e948e6b9413a1030ebbea2f3e9ed88cd13a87bd90e32e5a8e40e&state=91c0097352e7b98c329a72a26b7f289609bd44f7b42a7a15" for 127.0.0.1 at 2014-05-06 15:54:20 +0000
|
357
|
+
Processing by AuthenticationsController#callback as HTML
|
358
|
+
Parameters: {"code"=>"08fad3db2e47e948e6b9413a1030ebbea2f3e9ed88cd13a87bd90e32e5a8e40e", "state"=>"91c0097352e7b98c329a72a26b7f289609bd44f7b42a7a15"}
|
359
|
+
Authenticating with gds_sso strategy
|
360
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
371
361
|
[1m[35m (0.0ms)[0m begin transaction
|
372
362
|
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
373
363
|
- signin
|
374
364
|
' WHERE "users"."id" = 11[0m
|
375
|
-
[1m[35m (
|
376
|
-
|
365
|
+
[1m[35m (8.9ms)[0m commit transaction
|
366
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
367
|
+
[1m[35m (0.1ms)[0m UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
|
368
|
+
- signin
|
369
|
+
' WHERE "users"."id" = 11
|
370
|
+
[1m[36m (12.6ms)[0m [1mcommit transaction[0m
|
371
|
+
Redirected to http://www.example-client.com/restricted
|
372
|
+
Completed 302 Found in 25.9ms (ActiveRecord: 22.0ms)
|
373
|
+
Started GET "/restricted" for 127.0.0.1 at 2014-05-06 15:54:20 +0000
|
374
|
+
Processing by ExampleController#restricted as HTML
|
375
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
|
376
|
+
Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.2ms)
|
@@ -18,12 +18,12 @@ describe Warden::SessionSerializer do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
describe "serializing a user" do
|
21
|
-
|
22
|
-
it "should return the uid and a timestamp" do
|
21
|
+
it "should return the uid and an ISO 8601 string timestamp" do
|
23
22
|
Timecop.freeze
|
24
23
|
result = @serializer.serialize(@user)
|
25
24
|
|
26
|
-
expect(result).to eq([1234, Time.now.utc])
|
25
|
+
expect(result).to eq([1234, Time.now.utc.iso8601])
|
26
|
+
expect(result.last).to be_a(String)
|
27
27
|
end
|
28
28
|
|
29
29
|
it "should return nil if the user has no uid" do
|
@@ -35,7 +35,7 @@ describe Warden::SessionSerializer do
|
|
35
35
|
end
|
36
36
|
|
37
37
|
describe "deserialize a user" do
|
38
|
-
it "should return the user if the timestamp is current" do
|
38
|
+
it "should return the user if the timestamp is current and a Time" do
|
39
39
|
expect(User).to receive(:where).with(:uid => 1234, :remotely_signed_out => false).and_return(double(:first => :a_user))
|
40
40
|
|
41
41
|
result = @serializer.deserialize [1234, Time.now.utc - GDS::SSO::Config.auth_valid_for + 3600]
|
@@ -43,6 +43,14 @@ describe Warden::SessionSerializer do
|
|
43
43
|
expect(result).to equal(:a_user)
|
44
44
|
end
|
45
45
|
|
46
|
+
it "should return the user if the timestamp is current and is an ISO 8601 string" do
|
47
|
+
expect(User).to receive(:where).with(:uid => 1234, :remotely_signed_out => false).and_return(double(:first => :a_user))
|
48
|
+
|
49
|
+
result = @serializer.deserialize [1234, (Time.now.utc - GDS::SSO::Config.auth_valid_for + 3600).iso8601]
|
50
|
+
|
51
|
+
expect(result).to equal(:a_user)
|
52
|
+
end
|
53
|
+
|
46
54
|
it "should return nil if the timestamp is out of date" do
|
47
55
|
expect(User).not_to receive(:where)
|
48
56
|
|
@@ -58,5 +66,13 @@ describe Warden::SessionSerializer do
|
|
58
66
|
|
59
67
|
expect(result).to be_nil
|
60
68
|
end
|
69
|
+
|
70
|
+
it "should return nil for a user with a badly formatted timestamp" do
|
71
|
+
expect(User).not_to receive(:where)
|
72
|
+
|
73
|
+
result = @serializer.deserialize [1234, 'this is not a timestamp']
|
74
|
+
|
75
|
+
expect(result).to be_nil
|
76
|
+
end
|
61
77
|
end
|
62
78
|
end
|
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.2.
|
4
|
+
version: 9.2.6
|
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-
|
13
|
+
date: 2014-05-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -315,7 +315,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
315
315
|
version: '0'
|
316
316
|
segments:
|
317
317
|
- 0
|
318
|
-
hash:
|
318
|
+
hash: 1214135640714652604
|
319
319
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
320
320
|
none: false
|
321
321
|
requirements:
|
@@ -324,7 +324,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
324
324
|
version: '0'
|
325
325
|
segments:
|
326
326
|
- 0
|
327
|
-
hash:
|
327
|
+
hash: 1214135640714652604
|
328
328
|
requirements: []
|
329
329
|
rubyforge_project: gds-sso
|
330
330
|
rubygems_version: 1.8.23
|