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.
@@ -1,5 +1,5 @@
1
1
  module GDS
2
2
  module SSO
3
- VERSION = "9.2.5"
3
+ VERSION = "9.2.6"
4
4
  end
5
5
  end
@@ -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 |tuple|
27
- # This will reject old sessions that don't have an auth_set time
28
- uid, auth_set = tuple
29
- if auth_set and (auth_set + GDS::SSO::Config.auth_valid_for) > Time.now.utc
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','$2a$04$MdMkVFwTq5GLJJkHS8GLIe6dK1.C4ozzba5ZS5Ks2b/NenVsMGGRW','2012-04-19 13:26:54','2012-04-19 13:26:54','2012-04-19 13:26:54','Test User','integration-uid', "normal");
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
  ");
@@ -1,376 +1,376 @@
1
1
  Connecting to database specified by database.yml
2
-  (3.0ms) select sqlite_version(*)
3
-  (163.8ms) 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
-  (27.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
5
-  (11.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
2
+  (1.6ms) select sqlite_version(*)
3
+  (11.3ms) 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
+  (8.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
5
+  (8.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
6
6
   (0.1ms) begin transaction
7
- SQL (46.8ms) 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", "a1s2d34520"]]
8
-  (11.7ms) commit transaction
7
+ SQL (26.9ms) 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
+  (11.3ms) commit transaction
9
9
   (0.1ms) begin transaction
10
- SQL (0.2ms) 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", "a1s2d39675"]]
11
-  (11.1ms) commit transaction
10
+ SQL (0.2ms) 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", "a1s2d32139"]]
11
+  (13.4ms) commit transaction
12
12
  WARNING: Can't mass-assign protected attributes: uid, name, permissions
13
- Processing by Api::UserController#update as HTML
14
- Parameters: {"uid"=>"a1s2d34520"}
15
- Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.3ms)
16
- Completed 403 Forbidden in 54.5ms (Views: 53.7ms | ActiveRecord: 0.0ms)
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
   (0.1ms) begin transaction
18
- SQL (0.2ms) 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", "a1s2d31715"]]
19
-  (10.6ms) commit transaction
20
-  (0.0ms) begin transaction
21
- SQL (0.1ms) 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", "a1s2d33143"]]
22
-  (18.6ms) commit transaction
23
- Processing by Api::UserController#update as HTML
24
- Parameters: {"uid"=>"a1s2d31715"}
25
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d31715' LIMIT 1
26
-  (0.0ms) begin transaction
27
-  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '---
28
- - signin
29
- - new permission
30
- ', "organisation_slug" = 'justice-league' WHERE "users"."id" = 3
31
-  (7.3ms) commit transaction
32
- Completed 200 OK in 15.1ms (ActiveRecord: 7.8ms)
33
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]
18
+ SQL (0.2ms) 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
+  (11.2ms) commit transaction
34
20
   (0.1ms) begin transaction
35
- SQL (0.2ms) 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", "a1s2d31854"]]
36
-  (8.6ms) commit transaction
37
-  (0.1ms) begin transaction
38
- SQL (0.2ms) 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
-  (10.7ms) commit transaction
21
+ SQL (0.1ms) 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", "a1s2d33736"]]
22
+  (11.1ms) commit transaction
40
23
  Processing by Api::UserController#reauth as HTML
41
24
  Parameters: {"uid"=>"nonexistent-user"}
42
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1
43
- Completed 200 OK in 1.4ms (ActiveRecord: 0.2ms)
44
-  (0.0ms) begin transaction
45
- SQL (0.2ms) 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
-  (14.0ms) commit transaction
25
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1
26
+ Completed 200 OK in 26.6ms (ActiveRecord: 0.2ms)
47
27
   (0.1ms) begin transaction
48
- SQL (0.1ms) 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", "a1s2d34570"]]
49
-  (7.8ms) commit transaction
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
+ SQL (0.2ms) 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", "a1s2d3267"]]
29
+  (14.1ms) commit transaction
54
30
   (0.1ms) begin transaction
55
- SQL (0.2ms) 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", "a1s2d34795"]]
56
-  (16.8ms) commit transaction
57
-  (0.1ms) begin transaction
58
- SQL (0.2ms) 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", "a1s2d31240"]]
59
-  (9.4ms) commit transaction
31
+ SQL (0.1ms) 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
+  (9.9ms) commit transaction
60
33
  Processing by Api::UserController#reauth as HTML
61
- Parameters: {"uid"=>"a1s2d34795"}
62
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d34795' LIMIT 1
34
+ Parameters: {"uid"=>"a1s2d3267"}
35
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d3267' LIMIT 1
36
+  (0.0ms) begin transaction
37
+  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
38
+ - signin
39
+ ' WHERE "users"."id" = 5
40
+  (6.8ms) commit transaction
41
+ Completed 200 OK in 10.6ms (ActiveRecord: 7.2ms)
42
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 5]]
43
+  (0.0ms) begin transaction
44
+ SQL (0.2ms) 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
+  (10.3ms) commit transaction
46
+  (0.1ms) begin transaction
47
+ SQL (0.1ms) 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", "a1s2d38526"]]
48
+  (8.7ms) commit transaction
49
+ Processing by Api::UserController#update as HTML
50
+ Parameters: {"uid"=>"a1s2d31538"}
51
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d31538' LIMIT 1
63
52
   (0.0ms) begin transaction
64
-  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
53
+  (0.1ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '---
65
54
  - signin
66
- ' WHERE "users"."id" = 9
67
-  (9.4ms) commit transaction
68
- Completed 200 OK in 12.3ms (ActiveRecord: 9.8ms)
69
- User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]]
70
- Started GET "/restricted" for 127.0.0.1 at 2014-03-26 15:49:28 +0000
71
- Processing by ExampleController#restricted as HTML
72
- Authenticating with gds_sso strategy
73
- Completed in 37.2ms
74
- Started GET "/auth/gds" for 127.0.0.1 at 2014-03-26 15:49:28 +0000
75
- Started GET "/auth/gds/callback?code=7ceeca3a4b6c42fe16fcecfc452d3ac26214dfaea976b760b88d5c2046fc35c6&state=bfe446dbd3e6b89689e67f2a7de455ec34c954af5006c353" for 127.0.0.1 at 2014-03-26 15:49:29 +0000
76
- Processing by AuthenticationsController#callback as HTML
77
- Parameters: {"code"=>"7ceeca3a4b6c42fe16fcecfc452d3ac26214dfaea976b760b88d5c2046fc35c6", "state"=>"bfe446dbd3e6b89689e67f2a7de455ec34c954af5006c353"}
78
- Authenticating with gds_sso strategy
55
+ - new permission
56
+ ', "organisation_slug" = 'justice-league' WHERE "users"."id" = 7
57
+  (9.2ms) commit transaction
58
+ Completed 200 OK in 12.5ms (ActiveRecord: 9.5ms)
59
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 7]]
60
+  (0.1ms) begin transaction
61
+ SQL (0.2ms) 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", "a1s2d31443"]]
62
+  (11.6ms) commit transaction
63
+  (0.1ms) begin transaction
64
+ SQL (0.1ms) 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
+  (7.1ms) commit transaction
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
  User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
80
78
  User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'test@example-client.com' LIMIT 1
81
-  (0.1ms) begin transaction
79
+  (0.0ms) begin transaction
82
80
  SQL (0.2ms) 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"]]
83
-  (77.6ms) commit transaction
84
-  (0.1ms) begin transaction
85
-  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
81
+  (15.8ms) commit transaction
82
+  (0.0ms) begin transaction
83
+  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
86
84
  - signin
87
85
  ' WHERE "users"."id" = 11
88
-  (9.4ms) commit transaction
89
- Redirected to http://www.example-client.com/restricted
90
- Completed 302 Found in 93.3ms (ActiveRecord: 87.7ms)
91
- Started GET "/restricted" for 127.0.0.1 at 2014-03-26 15:49:30 +0000
92
- Processing by ExampleController#restricted as HTML
93
- User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
94
- Completed 200 OK in 4.6ms (Views: 3.6ms | ActiveRecord: 0.1ms)
95
- Started GET "/restricted" for 127.0.0.1 at 2014-03-26 15:49:30 +0000
96
- Processing by ExampleController#restricted as HTML
86
+  (9.5ms) commit transaction
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
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
92
+  (0.0ms) begin transaction
93
+  (0.1ms) UPDATE "users" SET "permissions" = '---
94
+ - signin
95
+ ' WHERE "users"."id" = 11
96
+  (11.9ms) commit transaction
97
+  (0.1ms) begin transaction
98
+  (0.1ms) UPDATE "users" SET "permissions" = '---
99
+ - signin
100
+ ' WHERE "users"."id" = 11
101
+  (9.2ms) 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-03-26 15:49:30 +0000
100
- Started GET "/auth/gds/callback?code=7793ee842db1c2cf2fc69b9e9075f93cfc89ed41df30f69cb1738a0369aee2d8&state=d75ad1182a561641f543b92edde40155a951ddd37fb35d4d" for 127.0.0.1 at 2014-03-26 15:49:30 +0000
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"=>"7793ee842db1c2cf2fc69b9e9075f93cfc89ed41df30f69cb1738a0369aee2d8", "state"=>"d75ad1182a561641f543b92edde40155a951ddd37fb35d4d"}
110
+ Parameters: {"code"=>"b7a8fe5651e40ea7f0f3a11a9833e6fb0d89e92e2e56ba13b58bb5493536e400", "state"=>"408da5383e84b5a141a9ec95269ac77041e7e0087e82e652"}
103
111
  Authenticating with gds_sso strategy
104
112
  User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
105
-  (0.1ms) begin transaction
113
+  (0.0ms) begin transaction
106
114
   (0.1ms) UPDATE "users" SET "permissions" = '---
107
115
  - signin
108
116
  ' WHERE "users"."id" = 11
109
-  (11.7ms) commit transaction
110
-  (0.1ms) begin transaction
111
-  (0.2ms) UPDATE "users" SET "permissions" = '---
117
+  (10.0ms) commit transaction
118
+  (0.0ms) begin transaction
119
+  (0.1ms) UPDATE "users" SET "permissions" = '---
112
120
  - signin
113
121
  ' WHERE "users"."id" = 11
114
-  (20.3ms) commit transaction
115
- Redirected to http://www.example-client.com/restricted
116
- Completed 302 Found in 38.1ms (ActiveRecord: 32.7ms)
117
- Started GET "/restricted" for 127.0.0.1 at 2014-03-26 15:49:30 +0000
118
- Processing by ExampleController#restricted as HTML
119
- User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
120
- Completed 200 OK in 2.4ms (Views: 0.7ms | ActiveRecord: 0.3ms)
121
- Started GET "/restricted" for 127.0.0.1 at 2014-03-26 15:49:30 +0000
122
- Processing by ExampleController#restricted as HTML
122
+  (6.8ms) commit transaction
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
+ User Load (0.1ms) 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.3ms
125
- Started GET "/auth/gds" for 127.0.0.1 at 2014-03-26 15:49:30 +0000
126
- Started GET "/auth/gds/callback?code=bcaa28582753e45e6bd4c95cc289cc3d7b05fd941c2b5e1348297a4e2ba9d2f7&state=0f93f14eafcb7dd180923f498fa4195d543590bdc0b2b88d" for 127.0.0.1 at 2014-03-26 15:49:30 +0000
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"=>"bcaa28582753e45e6bd4c95cc289cc3d7b05fd941c2b5e1348297a4e2ba9d2f7", "state"=>"0f93f14eafcb7dd180923f498fa4195d543590bdc0b2b88d"}
136
+ Parameters: {"code"=>"2f9f66f75458e23525cf3636eae1d60fde7b97ad5f2b30b82e08ad01cd41ba26", "state"=>"3da43637553f8b5c012db5e905ede569da7a8b5bb1b01494"}
129
137
  Authenticating with gds_sso strategy
130
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
138
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
131
139
   (0.0ms) begin transaction
132
-  (0.2ms) UPDATE "users" SET "permissions" = '---
140
+  (0.1ms) UPDATE "users" SET "permissions" = '---
133
141
  - signin
134
142
  ' WHERE "users"."id" = 11
135
-  (12.0ms) commit transaction
136
-  (0.1ms) begin transaction
137
-  (0.3ms) UPDATE "users" SET "permissions" = '---
143
+  (20.6ms) commit transaction
144
+  (0.0ms) begin transaction
145
+  (0.1ms) UPDATE "users" SET "permissions" = '---
138
146
  - signin
139
147
  ' WHERE "users"."id" = 11
140
-  (8.9ms) commit transaction
141
- Redirected to http://www.example-client.com/restricted
142
- Completed 302 Found in 26.7ms (ActiveRecord: 21.5ms)
143
- Started GET "/restricted" for 127.0.0.1 at 2014-03-26 15:49:30 +0000
144
- Processing by ExampleController#restricted as HTML
145
- User Load (0.2ms) 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
+  (14.8ms) commit transaction
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
+ User Load (0.1ms) 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 1.2ms
154
- Started GET "/auth/gds" for 127.0.0.1 at 2014-03-26 15:49:31 +0000
155
- Started GET "/auth/gds/callback?code=1799f136508532555f8d1c56e2a2d45928533008960830eaeb1418f884c4460c&state=7d79d1c1ff1ba9c5f4a4d3216ee88c9624bbc2ed3ee58f99" for 127.0.0.1 at 2014-03-26 15:49:31 +0000
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"=>"1799f136508532555f8d1c56e2a2d45928533008960830eaeb1418f884c4460c", "state"=>"7d79d1c1ff1ba9c5f4a4d3216ee88c9624bbc2ed3ee58f99"}
162
+ Parameters: {"code"=>"584f8b50aa15b27e1d58fc86b01c30140a607c9b44ccdd94e74d1f2653eca90a", "state"=>"dbc29cfccbf57751b07bb8261abfbe54e96cca1348d3385c"}
158
163
  Authenticating with gds_sso strategy
159
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
164
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
160
165
   (0.1ms) begin transaction
161
-  (0.2ms) UPDATE "users" SET "permissions" = '---
166
+  (0.1ms) UPDATE "users" SET "permissions" = '---
162
167
  - signin
163
168
  ' WHERE "users"."id" = 11
164
-  (9.1ms) commit transaction
169
+  (17.8ms) commit transaction
165
170
   (0.0ms) begin transaction
166
171
   (0.1ms) UPDATE "users" SET "permissions" = '---
167
172
  - signin
168
173
  ' WHERE "users"."id" = 11
169
-  (8.5ms) commit transaction
170
- Redirected to http://www.example-client.com/this_requires_signin_permission
171
- Completed 302 Found in 23.1ms (ActiveRecord: 18.2ms)
172
- Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-03-26 15:49:31 +0000
173
- Processing by ExampleController#this_requires_signin_permission as HTML
174
+  (11.0ms) commit transaction
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
  User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
175
- Completed 200 OK in 1.5ms (Views: 0.4ms | ActiveRecord: 0.1ms)
176
- Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-03-26 15:49:31 +0000
177
- Processing by ExampleController#this_requires_signin_permission as HTML
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-03-26 15:49:31 +0000
181
- Started GET "/auth/gds/callback?code=9439ea15b64638a170b933f3e25dfe10d79e234095c595217815719ddec7fb2b&state=c203315adddea73db9bb5697759c76f388494be845969b92" for 127.0.0.1 at 2014-03-26 15:49:31 +0000
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"=>"9439ea15b64638a170b933f3e25dfe10d79e234095c595217815719ddec7fb2b", "state"=>"c203315adddea73db9bb5697759c76f388494be845969b92"}
188
+ Parameters: {"code"=>"84b329588260d4179f0358fbc48d7792beac80124b14be27bf9db95a42dae017", "state"=>"518680c61baa4fe72c53ebe49dff88537ff16c68a93368be"}
184
189
  Authenticating with gds_sso strategy
185
190
  User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
186
-  (0.1ms) begin transaction
187
-  (0.3ms) UPDATE "users" SET "permissions" = '---
191
+  (0.0ms) begin transaction
192
+  (0.1ms) UPDATE "users" SET "permissions" = '---
188
193
  - signin
189
194
  ' WHERE "users"."id" = 11
190
-  (11.2ms) commit transaction
195
+  (10.2ms) commit transaction
191
196
   (0.0ms) begin transaction
192
197
   (0.1ms) UPDATE "users" SET "permissions" = '---
193
198
  - signin
194
199
  ' WHERE "users"."id" = 11
195
-  (19.7ms) commit transaction
196
- Redirected to http://www.example-client.com/this_requires_signin_permission
197
- Completed 302 Found in 61.6ms (ActiveRecord: 31.6ms)
198
- Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-03-26 15:49:31 +0000
199
- Processing by ExampleController#this_requires_signin_permission as HTML
200
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
201
- Completed 200 OK in 1.7ms (Views: 0.3ms | ActiveRecord: 0.2ms)
202
- Started GET "/restricted" for 127.0.0.1 at 2014-03-26 15:49:32 +0000
200
+  (7.4ms) commit transaction
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
+ User Load (0.1ms) 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.4ms
206
- Started GET "/auth/gds" for 127.0.0.1 at 2014-03-26 15:49:32 +0000
207
- Started GET "/auth/gds/callback?code=7f74a4ba35e169225049e1ac23160e3e01cd44abda76dba3b4df6aab94e8807a&state=c71813eb78652f4862363c8aecd4313403c9d62daefe2c64" for 127.0.0.1 at 2014-03-26 15:49:32 +0000
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"=>"7f74a4ba35e169225049e1ac23160e3e01cd44abda76dba3b4df6aab94e8807a", "state"=>"c71813eb78652f4862363c8aecd4313403c9d62daefe2c64"}
214
+ Parameters: {"code"=>"944cb01ba71cf42e00a77c1bbc9133b760bf28220aadf30184612d50ce84cbaf", "state"=>"f4661d0f0e69ee6cf821e758b6b61defada574f54c6412db"}
210
215
  Authenticating with gds_sso strategy
211
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
212
-  (0.1ms) begin transaction
213
-  (0.2ms) UPDATE "users" SET "permissions" = '---
216
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
217
+  (0.0ms) begin transaction
218
+  (0.1ms) UPDATE "users" SET "permissions" = '---
214
219
  - signin
215
220
  ' WHERE "users"."id" = 11
216
-  (11.8ms) commit transaction
221
+  (20.9ms) commit transaction
217
222
   (0.1ms) begin transaction
218
-  (0.3ms) UPDATE "users" SET "permissions" = '---
223
+  (0.1ms) UPDATE "users" SET "permissions" = '---
219
224
  - signin
220
225
  ' WHERE "users"."id" = 11
221
-  (10.5ms) commit transaction
226
+  (8.4ms) commit transaction
222
227
  Redirected to http://www.example-client.com/restricted
223
- Completed 302 Found in 29.4ms (ActiveRecord: 23.1ms)
224
- Started GET "/restricted" for 127.0.0.1 at 2014-03-26 15:49:32 +0000
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
  User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
227
- Completed 200 OK in 1.4ms (Views: 0.5ms | ActiveRecord: 0.1ms)
228
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'test@example-client.com' LIMIT 1
229
-  (0.0ms) begin transaction
230
-  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
231
- - signin
232
- ' WHERE "users"."id" = 11
233
-  (10.4ms) 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
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
237
238
  Authenticating with gds_sso strategy
238
- Completed in 1.0ms
239
- Started GET "/auth/gds" for 127.0.0.1 at 2014-03-26 15:49:32 +0000
240
- Started GET "/auth/gds/callback?code=702c7a7b23556649ee690d0726c3e51c25e64f60d2656882fda21e2062c10259&state=a12432a6476203c4893388cd75de1f738cffccaf0a2d4e35" for 127.0.0.1 at 2014-03-26 15:49:32 +0000
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"=>"702c7a7b23556649ee690d0726c3e51c25e64f60d2656882fda21e2062c10259", "state"=>"a12432a6476203c4893388cd75de1f738cffccaf0a2d4e35"}
243
+ Parameters: {"code"=>"4e983f1c26ad9c7316f5b2b44b26df80faa05df243ecce739db24f6ec6e0fad8", "state"=>"fd6b5ea1fea4fcfc3de0825201272b36fbeef8b61c702c05"}
243
244
  Authenticating with gds_sso strategy
244
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
245
-  (0.0ms) begin transaction
246
-  (0.2ms) UPDATE "users" SET "permissions" = '---
247
- - signin
248
- ' WHERE "users"."id" = 11
249
-  (15.6ms) commit transaction
245
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
250
246
   (0.1ms) begin transaction
251
-  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
247
+  (0.1ms) UPDATE "users" SET "permissions" = '---
252
248
  - signin
253
249
  ' WHERE "users"."id" = 11
254
-  (22.1ms) commit transaction
250
+  (9.7ms) commit transaction
251
+  (0.0ms) begin transaction
252
+  (0.1ms) UPDATE "users" SET "permissions" = '---
253
+ - signin
254
+ ' WHERE "users"."id" = 11
255
+  (9.3ms) commit transaction
255
256
  Redirected to http://www.example-client.com/restricted
256
- Completed 302 Found in 43.1ms (ActiveRecord: 38.4ms)
257
- Started GET "/restricted" for 127.0.0.1 at 2014-03-26 15:49:32 +0000
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
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
260
- Completed 200 OK in 1.3ms (Views: 0.3ms | ActiveRecord: 0.2ms)
261
- Started GET "/restricted" for 127.0.0.1 at 2014-03-26 15:49:33 +0000
260
+ User Load (0.1ms) 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
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
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-03-26 15:49:33 +0000
266
- Started GET "/auth/gds/callback?code=7a28d23e2fe130e5255c098f6745d465bda47922781e012f2d4a9d894fdb01cd&state=30e43fb7014a3493898340c8c37f99fafed8ffe248690fa2" for 127.0.0.1 at 2014-03-26 15:49:33 +0000
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"=>"7a28d23e2fe130e5255c098f6745d465bda47922781e012f2d4a9d894fdb01cd", "state"=>"30e43fb7014a3493898340c8c37f99fafed8ffe248690fa2"}
273
+ Parameters: {"code"=>"967dc585f16766b4455295d015da62575c2c32934ac5cbd90ed912ffa046c0f4", "state"=>"98e481aea30d972a9cd7da88bd6824d7b03a19627a5b68e4"}
269
274
  Authenticating with gds_sso strategy
270
275
  User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
271
-  (0.1ms) begin transaction
272
-  (0.2ms) UPDATE "users" SET "permissions" = '---
276
+  (0.0ms) begin transaction
277
+  (0.1ms) UPDATE "users" SET "permissions" = '---
273
278
  - signin
274
279
  ' WHERE "users"."id" = 11
275
-  (14.5ms) commit transaction
276
-  (0.1ms) begin transaction
277
-  (0.2ms) UPDATE "users" SET "permissions" = '---
280
+  (12.3ms) commit transaction
281
+  (0.0ms) begin transaction
282
+  (0.1ms) UPDATE "users" SET "permissions" = '---
278
283
  - signin
279
284
  ' WHERE "users"."id" = 11
280
-  (11.5ms) commit transaction
285
+  (17.2ms) commit transaction
281
286
  Redirected to http://www.example-client.com/restricted
282
- Completed 302 Found in 33.1ms (ActiveRecord: 26.7ms)
283
- Started GET "/restricted" for 127.0.0.1 at 2014-03-26 15:49:33 +0000
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
- User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
286
- Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.1ms)
287
- Started GET "/restricted" for 127.0.0.1 at 2014-03-27 11:54:33 +0000
290
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
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.2ms
291
- Started GET "/auth/gds" for 127.0.0.1 at 2014-03-27 11:54:33 +0000
292
- Started GET "/auth/gds/callback?code=649273a9b40bf516a1e3aac804dd70e27351c1e425e9d1662e8dd782a80caf26&state=153f4b58a081c01d21717381f839c22ca59a67a4a16e0da6" for 127.0.0.1 at 2014-03-27 11:54:33 +0000
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"=>"649273a9b40bf516a1e3aac804dd70e27351c1e425e9d1662e8dd782a80caf26", "state"=>"153f4b58a081c01d21717381f839c22ca59a67a4a16e0da6"}
299
+ Parameters: {"code"=>"92e8356c4b88dd847c4439415e1f0428cbec8e741982f69c87e504c01f98d445", "state"=>"766810bacdbf4a323274685105bf6796e68f16a622d8be41"}
295
300
  Authenticating with gds_sso strategy
296
301
  User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
297
-  (0.1ms) begin transaction
298
-  (0.2ms) UPDATE "users" SET "permissions" = '---
302
+  (0.0ms) begin transaction
303
+  (0.1ms) UPDATE "users" SET "permissions" = '---
299
304
  - signin
300
305
  ' WHERE "users"."id" = 11
301
-  (10.5ms) commit transaction
302
-  (0.1ms) begin transaction
303
-  (0.2ms) UPDATE "users" SET "permissions" = '---
306
+  (11.0ms) commit transaction
307
+  (0.0ms) begin transaction
308
+  (0.1ms) UPDATE "users" SET "permissions" = '---
304
309
  - signin
305
310
  ' WHERE "users"."id" = 11
306
-  (9.3ms) commit transaction
311
+  (10.9ms) commit transaction
307
312
  Redirected to http://www.example-client.com/restricted
308
- Completed 302 Found in 25.2ms (ActiveRecord: 20.5ms)
309
- Started GET "/restricted" for 127.0.0.1 at 2014-03-27 11:54:33 +0000
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
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
312
- Completed 200 OK in 1.6ms (Views: 0.4ms | ActiveRecord: 0.2ms)
313
- Started GET "/restricted" for 127.0.0.1 at 2014-03-26 15:49:33 +0000
316
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
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.4ms
317
- Started GET "/auth/gds" for 127.0.0.1 at 2014-03-26 15:49:33 +0000
318
- Started GET "/auth/gds/callback?code=abfdfe30f0b14ee000d529da3dff3a54f6642f676e2676302a9c23287c93839e&state=15c0e0ca8f17e6b83aa5cbbf66063a31dd84e7ca5ba5c72a" for 127.0.0.1 at 2014-03-26 15:49:34 +0000
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"=>"abfdfe30f0b14ee000d529da3dff3a54f6642f676e2676302a9c23287c93839e", "state"=>"15c0e0ca8f17e6b83aa5cbbf66063a31dd84e7ca5ba5c72a"}
325
+ Parameters: {"code"=>"5ecea67f4e940da2c33a0c8a6df846604bc6b448649c2c5154a3208fdb9f8a95", "state"=>"5cfcb5f00cfb66545f931a397ffe037e89e8a4e3dd99d830"}
321
326
  Authenticating with gds_sso strategy
322
327
  User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
323
-  (0.1ms) begin transaction
324
-  (0.2ms) UPDATE "users" SET "permissions" = '---
328
+  (0.0ms) begin transaction
329
+  (0.1ms) UPDATE "users" SET "permissions" = '---
325
330
  - signin
326
331
  ' WHERE "users"."id" = 11
327
-  (11.5ms) commit transaction
332
+  (9.5ms) commit transaction
328
333
   (0.0ms) begin transaction
329
334
   (0.1ms) UPDATE "users" SET "permissions" = '---
330
335
  - signin
331
336
  ' WHERE "users"."id" = 11
332
-  (10.4ms) commit transaction
337
+  (7.3ms) commit transaction
333
338
  Redirected to http://www.example-client.com/restricted
334
- Completed 302 Found in 27.5ms (ActiveRecord: 22.5ms)
335
- Started GET "/restricted" for 127.0.0.1 at 2014-03-26 15:49:34 +0000
336
- Processing by ExampleController#restricted as HTML
337
- User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
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
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
342
- Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.2ms)
343
- Started GET "/restricted" for 127.0.0.1 at 2014-03-26 15:49:34 +0000
344
- Processing by ExampleController#restricted as JSON
345
- Authenticating with gds_bearer_token strategy
346
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
347
-  (0.1ms) begin transaction
348
-  (0.2ms) UPDATE "users" SET "permissions" = '---
349
- - signin
350
- ' WHERE "users"."id" = 11
351
-  (10.0ms) commit transaction
342
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
343
+ Completed 200 OK in 1.4ms (Views: 0.3ms | ActiveRecord: 0.2ms)
344
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'test@example-client.com' LIMIT 1
352
345
   (0.0ms) begin transaction
353
-  (0.1ms) UPDATE "users" SET "permissions" = '---
346
+  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
354
347
  - signin
355
348
  ' WHERE "users"."id" = 11
356
-  (6.1ms) commit transaction
357
- Completed 200 OK in 64.0ms (Views: 0.5ms | ActiveRecord: 16.6ms)
358
- Started GET "/restricted" for 127.0.0.1 at 2014-03-26 15:49:34 +0000
359
- Processing by ExampleController#restricted as JSON
360
- Authenticating with gds_bearer_token strategy
361
- Completed in 8.0ms
362
- Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-03-26 15:49:34 +0000
363
- Processing by ExampleController#this_requires_signin_permission as JSON
364
- Authenticating with gds_bearer_token strategy
365
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
366
-  (0.1ms) begin transaction
367
-  (0.2ms) UPDATE "users" SET "permissions" = '---
368
- - signin
369
- ' WHERE "users"."id" = 11
370
-  (12.2ms) commit transaction
349
+  (8.6ms) commit transaction
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
+ User Load (0.1ms) 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
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
371
361
   (0.0ms) begin transaction
372
362
   (0.1ms) UPDATE "users" SET "permissions" = '---
373
363
  - signin
374
364
  ' WHERE "users"."id" = 11
375
-  (7.3ms) commit transaction
376
- Completed 200 OK in 65.2ms (Views: 0.5ms | ActiveRecord: 20.1ms)
365
+  (8.9ms) commit transaction
366
+  (0.0ms) begin transaction
367
+  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
368
+ - signin
369
+ ' WHERE "users"."id" = 11
370
+  (12.6ms) commit transaction
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
+ User Load (0.2ms) 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.5
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-03-26 00:00:00.000000000 Z
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: 1016089070449543199
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: 1016089070449543199
327
+ hash: 1214135640714652604
328
328
  requirements: []
329
329
  rubyforge_project: gds-sso
330
330
  rubygems_version: 1.8.23