gds-sso 9.1.2 → 9.2.0

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