gds-sso 9.2.2 → 9.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/gds-sso/user.rb CHANGED
@@ -5,8 +5,12 @@ module GDS
5
5
  module User
6
6
  extend ActiveSupport::Concern
7
7
 
8
+ def self.below_rails_4?
9
+ Gem.loaded_specs['rails'] && Gem.loaded_specs['rails'].version < Gem::Version.new("4.0")
10
+ end
11
+
8
12
  included do
9
- if (Gem::Version.new(Rails.version) < Gem::Version.new("4.0")) && respond_to?(:attr_accessible)
13
+ if GDS::SSO::User.below_rails_4? && respond_to?(:attr_accessible)
10
14
  attr_accessible :uid, :email, :name, :permissions, :organisation_slug, as: :oauth
11
15
  end
12
16
  end
@@ -40,17 +44,17 @@ module GDS
40
44
  user_params = GDS::SSO::User.user_params_from_auth_hash(auth_hash.to_hash)
41
45
 
42
46
  if user = self.where(:uid => auth_hash["uid"]).first
43
- if Gem::Version.new(Rails.version) >= Gem::Version.new("4.0")
44
- user.update_attributes(user_params)
45
- else
47
+ if GDS::SSO::User.below_rails_4?
46
48
  user.update_attributes(user_params, as: :oauth)
49
+ else
50
+ user.update_attributes(user_params)
47
51
  end
48
52
  user
49
53
  else # Create a new user.
50
- if Gem::Version.new(Rails.version) >= Gem::Version.new("4.0")
51
- self.create!(user_params)
52
- else
54
+ if GDS::SSO::User.below_rails_4?
53
55
  self.create!(user_params, as: :oauth)
56
+ else
57
+ self.create!(user_params)
54
58
  end
55
59
  end
56
60
  end
@@ -1,5 +1,5 @@
1
1
  module GDS
2
2
  module SSO
3
- VERSION = "9.2.2"
3
+ VERSION = "9.2.3"
4
4
  end
5
5
  end
@@ -1,375 +1,375 @@
1
1
  Connecting to database specified by database.yml
2
2
   (1.8ms) select sqlite_version(*)
3
-  (17.2ms) 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
-  (9.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
5
-  (13.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
6
-  (0.1ms) begin transaction
7
- SQL (3.5ms) 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", "a1s2d3660"]]
8
-  (15.4ms) commit transaction
3
+  (16.6ms) 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
+  (9.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
5
+  (11.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
6
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-02-11 16:09:35 +0000
7
+ Processing by ExampleController#this_requires_signin_permission as JSON
8
+ Authenticating with gds_bearer_token strategy
9
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
9
10
   (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", "a1s2d37434"]]
11
-  (13.5ms) commit transaction
12
- WARNING: Can't mass-assign protected attributes: uid, name, permissions
13
- Processing by Api::UserController#update as HTML
14
- Parameters: {"uid"=>"a1s2d3660"}
15
- Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.3ms)
16
- Completed 403 Forbidden in 38.6ms (Views: 37.8ms | ActiveRecord: 0.0ms)
11
+ SQL (27.5ms) 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"]]
12
+  (15.8ms) commit transaction
17
13
   (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", "a1s2d32268"]]
19
-  (5.7ms) 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", "a1s2d39966"]]
22
-  (8.8ms) commit transaction
23
- Processing by Api::UserController#update as HTML
24
- Parameters: {"uid"=>"a1s2d32268"}
25
- User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d32268' LIMIT 1
26
-  (0.1ms) begin transaction
27
-  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '---
14
+  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
28
15
  - signin
29
- - new permission
30
- ', "organisation_slug" = 'justice-league' WHERE "users"."id" = 3
31
-  (8.6ms) commit transaction
32
- Completed 200 OK in 16.9ms (ActiveRecord: 9.1ms)
33
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]
34
-  (0.0ms) 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", "a1s2d36178"]]
36
-  (9.3ms) commit transaction
16
+ ' WHERE "users"."id" = 1
17
+  (16.0ms) commit transaction
18
+ Rendered text template (0.0ms)
19
+ Completed 200 OK in 636.7ms (Views: 35.3ms | ActiveRecord: 60.1ms)
20
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 16:09:36 +0000
21
+ Processing by ExampleController#restricted as JSON
22
+ Authenticating with gds_bearer_token strategy
23
+ Completed in 10.0ms
24
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 16:09:36 +0000
25
+ Processing by ExampleController#restricted as JSON
26
+ Authenticating with gds_bearer_token strategy
27
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
37
28
   (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", "a1s2d3569"]]
39
-  (5.6ms) commit transaction
40
- WARNING: Can't mass-assign protected attributes: uid, name, permissions
41
- Processing by Api::UserController#reauth as HTML
42
- Parameters: {"uid"=>"a1s2d36178"}
43
- Completed 403 Forbidden in 1.7ms (Views: 1.0ms | ActiveRecord: 0.0ms)
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", "a1s2d35273"]]
46
-  (7.2ms) commit transaction
47
-  (0.0ms) 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", "a1s2d34668"]]
49
-  (7.9ms) commit transaction
50
- Processing by Api::UserController#reauth as HTML
51
- Parameters: {"uid"=>"a1s2d35273"}
52
- User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d35273' LIMIT 1
53
-  (0.0ms) begin transaction
54
-  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
29
+  (0.2ms) UPDATE "users" SET "permissions" = '---
55
30
  - signin
56
- ' WHERE "users"."id" = 7
57
-  (5.7ms) commit transaction
58
- Completed 200 OK in 9.0ms (ActiveRecord: 6.2ms)
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", "a1s2d37522"]]
62
-  (7.9ms) 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", "a1s2d3700"]]
65
-  (7.4ms) commit transaction
66
- Processing by Api::UserController#reauth as HTML
67
- Parameters: {"uid"=>"nonexistent-user"}
68
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1
69
- Completed 200 OK in 1.2ms (ActiveRecord: 0.2ms)
70
- Started GET "/" for 127.0.0.1 at 2014-02-11 14:12:32 +0000
71
- Processing by ExampleController#index as HTML
72
- Completed 200 OK in 4.0ms (Views: 3.6ms | ActiveRecord: 0.0ms)
73
- Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:32 +0000
31
+ ' WHERE "users"."id" = 1
32
+  (9.6ms) commit transaction
33
+  (0.0ms) begin transaction
34
+  (0.1ms) UPDATE "users" SET "permissions" = '---
35
+ - signin
36
+ ' WHERE "users"."id" = 1
37
+  (6.7ms) commit transaction
38
+ Completed 200 OK in 55.3ms (Views: 0.5ms | ActiveRecord: 16.9ms)
39
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 16:09:37 +0000
74
40
  Processing by ExampleController#restricted as HTML
75
41
  Authenticating with gds_sso strategy
76
- Completed in 0.6ms
77
- Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 14:12:32 +0000
78
- Started GET "/auth/gds/callback?code=e6fc10270e675cd0e71f7b28931b538da1bdc20d5cde1c828ef7d097fced02aa&state=78623b0d617fc3d2eb1736195791e5435fcb43fbf249bf56" for 127.0.0.1 at 2014-02-11 14:12:33 +0000
42
+ Completed in 0.3ms
43
+ Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 16:09:37 +0000
44
+ Started GET "/auth/gds/callback?code=9feff442bc8339449747a479149ae50fef26d0bd8930faa3e6eb8e271beed70e&state=e572ef7b148b5abf87c3ec19d2204c8a34cea09625646fbd" for 127.0.0.1 at 2014-02-11 16:09:37 +0000
79
45
  Processing by AuthenticationsController#callback as HTML
80
- Parameters: {"code"=>"e6fc10270e675cd0e71f7b28931b538da1bdc20d5cde1c828ef7d097fced02aa", "state"=>"78623b0d617fc3d2eb1736195791e5435fcb43fbf249bf56"}
46
+ Parameters: {"code"=>"9feff442bc8339449747a479149ae50fef26d0bd8930faa3e6eb8e271beed70e", "state"=>"e572ef7b148b5abf87c3ec19d2204c8a34cea09625646fbd"}
81
47
  Authenticating with gds_sso strategy
82
- User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
83
-  (0.1ms) begin transaction
84
- SQL (0.3ms) 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
-  (7.3ms) commit transaction
48
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
86
49
   (0.1ms) begin transaction
87
-  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
50
+  (0.1ms) UPDATE "users" SET "permissions" = '---
51
+ - signin
52
+ ' WHERE "users"."id" = 1
53
+  (10.4ms) commit transaction
54
+  (0.0ms) begin transaction
55
+  (0.1ms) UPDATE "users" SET "permissions" = '---
88
56
  - signin
89
- ' WHERE "users"."id" = 11
90
-  (7.1ms) commit transaction
57
+ ' WHERE "users"."id" = 1
58
+  (8.0ms) commit transaction
91
59
  Redirected to http://www.example-client.com/restricted
92
- Completed 302 Found in 22.6ms (ActiveRecord: 15.4ms)
93
- Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:33 +0000
60
+ Completed 302 Found in 23.6ms (ActiveRecord: 19.0ms)
61
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 16:09:38 +0000
94
62
  Processing by ExampleController#restricted as HTML
95
- User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
96
- Completed 200 OK in 2.3ms (Views: 0.6ms | ActiveRecord: 0.3ms)
97
- Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:33 +0000
63
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
64
+ Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms)
65
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 16:09:38 +0000
98
66
  Processing by ExampleController#restricted as HTML
99
67
  Authenticating with gds_sso strategy
100
- Completed in 0.2ms
101
- Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 14:12:33 +0000
102
- Started GET "/auth/gds/callback?code=99a32bede75e4ad5f4d9d91ba9dbf42603907dea464be720c39ca8f1db0b90cc&state=13e6a62c4a47b4f7ba5472161eaf1e7000c05963f6a1291a" for 127.0.0.1 at 2014-02-11 14:12:34 +0000
68
+ Completed in 0.1ms
69
+ Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 16:09:38 +0000
70
+ Started GET "/auth/gds/callback?code=99d4c3b0203b7793235ba45c61245c05528c23307317089e583185810815203b&state=f917756edf3b78a2270d8a3c763a893084d5e8cc36659d68" for 127.0.0.1 at 2014-02-11 16:09:38 +0000
103
71
  Processing by AuthenticationsController#callback as HTML
104
- Parameters: {"code"=>"99a32bede75e4ad5f4d9d91ba9dbf42603907dea464be720c39ca8f1db0b90cc", "state"=>"13e6a62c4a47b4f7ba5472161eaf1e7000c05963f6a1291a"}
72
+ Parameters: {"code"=>"99d4c3b0203b7793235ba45c61245c05528c23307317089e583185810815203b", "state"=>"f917756edf3b78a2270d8a3c763a893084d5e8cc36659d68"}
105
73
  Authenticating with gds_sso strategy
106
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
107
-  (0.0ms) begin transaction
108
-  (0.2ms) UPDATE "users" SET "permissions" = '---
74
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
75
+  (0.0ms) begin transaction
76
+  (0.1ms) UPDATE "users" SET "permissions" = '---
109
77
  - signin
110
- ' WHERE "users"."id" = 11
111
-  (14.1ms) commit transaction
112
-  (0.1ms) begin transaction
113
-  (0.2ms) UPDATE "users" SET "permissions" = '---
78
+ ' WHERE "users"."id" = 1
79
+  (10.7ms) commit transaction
80
+  (0.1ms) begin transaction
81
+  (0.1ms) UPDATE "users" SET "permissions" = '---
114
82
  - signin
115
- ' WHERE "users"."id" = 11
116
-  (12.5ms) commit transaction
83
+ ' WHERE "users"."id" = 1
84
+  (9.4ms) commit transaction
117
85
  Redirected to http://www.example-client.com/restricted
118
- Completed 302 Found in 31.9ms (ActiveRecord: 27.3ms)
119
- Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:34 +0000
86
+ Completed 302 Found in 24.7ms (ActiveRecord: 20.7ms)
87
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 16:09:38 +0000
88
+ Processing by ExampleController#restricted as HTML
89
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
90
+ Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms)
91
+ Started GET "/" for 127.0.0.1 at 2014-02-11 16:09:38 +0000
92
+ Processing by ExampleController#index as HTML
93
+ Completed 200 OK in 0.8ms (Views: 0.4ms | ActiveRecord: 0.0ms)
94
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 16:09:38 +0000
120
95
  Processing by ExampleController#restricted as HTML
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.3ms (Views: 0.3ms | ActiveRecord: 0.2ms)
123
- Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-02-11 14:12:34 +0000
124
- Processing by ExampleController#this_requires_signin_permission as HTML
125
96
  Authenticating with gds_sso strategy
126
- Completed in 0.6ms
127
- Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 14:12:34 +0000
128
- Started GET "/auth/gds/callback?code=c734589a77321d80b595cd458f2a97984bc60a31423e649f53a8066d6adbaa6f&state=4ed2bc23f0aa2c35292b24cf085d2f8d2bd0633d7ffc9768" for 127.0.0.1 at 2014-02-11 14:12:34 +0000
97
+ Completed in 0.3ms
98
+ Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 16:09:38 +0000
99
+ Started GET "/auth/gds/callback?code=8c875aa43472843d2a509b4a2ab9d76ee9a5c48b643739d5cadc07788123564a&state=13756809d8569bc610932a90076f465bc9dce1f98b5fa32a" for 127.0.0.1 at 2014-02-11 16:09:38 +0000
129
100
  Processing by AuthenticationsController#callback as HTML
130
- Parameters: {"code"=>"c734589a77321d80b595cd458f2a97984bc60a31423e649f53a8066d6adbaa6f", "state"=>"4ed2bc23f0aa2c35292b24cf085d2f8d2bd0633d7ffc9768"}
101
+ Parameters: {"code"=>"8c875aa43472843d2a509b4a2ab9d76ee9a5c48b643739d5cadc07788123564a", "state"=>"13756809d8569bc610932a90076f465bc9dce1f98b5fa32a"}
131
102
  Authenticating with gds_sso strategy
132
- User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
103
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
104
+  (0.1ms) begin transaction
105
+  (0.1ms) UPDATE "users" SET "permissions" = '---
106
+ - signin
107
+ ' WHERE "users"."id" = 1
108
+  (25.0ms) commit transaction
133
109
   (0.1ms) begin transaction
134
110
   (0.2ms) UPDATE "users" SET "permissions" = '---
135
111
  - signin
136
- ' WHERE "users"."id" = 11
137
-  (24.3ms) commit transaction
112
+ ' WHERE "users"."id" = 1
113
+  (11.4ms) commit transaction
114
+ Redirected to http://www.example-client.com/restricted
115
+ Completed 302 Found in 42.0ms (ActiveRecord: 37.0ms)
116
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 16:09:39 +0000
117
+ Processing by ExampleController#restricted as HTML
118
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
119
+ Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.1ms)
120
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-02-11 16:09:39 +0000
121
+ Processing by ExampleController#this_requires_signin_permission as HTML
122
+ Authenticating with gds_sso strategy
123
+ Completed in 0.5ms
124
+ Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 16:09:39 +0000
125
+ Started GET "/auth/gds/callback?code=725eefce866775f0781951ed5ed2a397284098719e55edad778017078eb99ecb&state=59ecf92e3d80fc4e88211dcd1a3b75d7f9dc29b6888ffa9b" for 127.0.0.1 at 2014-02-11 16:09:39 +0000
126
+ Processing by AuthenticationsController#callback as HTML
127
+ Parameters: {"code"=>"725eefce866775f0781951ed5ed2a397284098719e55edad778017078eb99ecb", "state"=>"59ecf92e3d80fc4e88211dcd1a3b75d7f9dc29b6888ffa9b"}
128
+ Authenticating with gds_sso strategy
129
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
138
130
   (0.0ms) begin transaction
139
131
   (0.1ms) UPDATE "users" SET "permissions" = '---
140
132
  - signin
141
- ' WHERE "users"."id" = 11
142
-  (11.0ms) commit transaction
133
+ ' WHERE "users"."id" = 1
134
+  (10.6ms) commit transaction
135
+  (0.0ms) begin transaction
136
+  (0.1ms) UPDATE "users" SET "permissions" = '---
137
+ - signin
138
+ ' WHERE "users"."id" = 1
139
+  (13.1ms) commit transaction
143
140
  Redirected to http://www.example-client.com/this_requires_signin_permission
144
- Completed 302 Found in 41.5ms (ActiveRecord: 36.0ms)
145
- Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-02-11 14:12:34 +0000
141
+ Completed 302 Found in 28.8ms (ActiveRecord: 24.3ms)
142
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-02-11 16:09:39 +0000
146
143
  Processing by ExampleController#this_requires_signin_permission as HTML
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.4ms | ActiveRecord: 0.2ms)
149
- Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-02-11 14:12:34 +0000
144
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
145
+ Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms)
146
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-02-11 16:09:39 +0000
150
147
  Processing by ExampleController#this_requires_signin_permission as HTML
151
148
  Authenticating with gds_sso strategy
152
- Completed in 0.2ms
153
- Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 14:12:34 +0000
154
- Started GET "/auth/gds/callback?code=d4c19782a4d297262a15c4b248148ce88a5712cc9ebeb139eecf9457fd11eec6&state=4f13783c8f5b8095df92fbcb7f4f4f38e8a3c7f7bc6d0177" for 127.0.0.1 at 2014-02-11 14:12:34 +0000
149
+ Completed in 0.1ms
150
+ Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 16:09:39 +0000
151
+ Started GET "/auth/gds/callback?code=a035fc66195904f4ad6c03beea2aaf4299b6ec7bd4760cb01cd9beb9f2e51c7b&state=95c02c25e5bee4e8c6bbf72fa65fa1e56d9be0e341433328" for 127.0.0.1 at 2014-02-11 16:09:39 +0000
155
152
  Processing by AuthenticationsController#callback as HTML
156
- Parameters: {"code"=>"d4c19782a4d297262a15c4b248148ce88a5712cc9ebeb139eecf9457fd11eec6", "state"=>"4f13783c8f5b8095df92fbcb7f4f4f38e8a3c7f7bc6d0177"}
153
+ Parameters: {"code"=>"a035fc66195904f4ad6c03beea2aaf4299b6ec7bd4760cb01cd9beb9f2e51c7b", "state"=>"95c02c25e5bee4e8c6bbf72fa65fa1e56d9be0e341433328"}
157
154
  Authenticating with gds_sso strategy
158
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
159
-  (0.0ms) begin transaction
160
-  (0.2ms) UPDATE "users" SET "permissions" = '---
161
- - signin
162
- ' WHERE "users"."id" = 11
163
-  (10.1ms) commit transaction
155
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
164
156
   (0.0ms) begin transaction
165
-  (0.3ms) UPDATE "users" SET "permissions" = '---
157
+  (0.1ms) UPDATE "users" SET "permissions" = '---
158
+ - signin
159
+ ' WHERE "users"."id" = 1
160
+  (9.6ms) commit transaction
161
+  (0.0ms) begin transaction
162
+  (0.1ms) UPDATE "users" SET "permissions" = '---
166
163
  - signin
167
- ' WHERE "users"."id" = 11
168
-  (7.4ms) commit transaction
164
+ ' WHERE "users"."id" = 1
165
+  (14.9ms) commit transaction
169
166
  Redirected to http://www.example-client.com/this_requires_signin_permission
170
- Completed 302 Found in 22.6ms (ActiveRecord: 18.1ms)
171
- Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-02-11 14:12:34 +0000
167
+ Completed 302 Found in 28.9ms (ActiveRecord: 25.0ms)
168
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-02-11 16:09:39 +0000
172
169
  Processing by ExampleController#this_requires_signin_permission as HTML
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.6ms (Views: 0.3ms | ActiveRecord: 0.2ms)
175
- Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:34 +0000
170
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
171
+ Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms)
172
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 16:09:39 +0000
176
173
  Processing by ExampleController#restricted as HTML
177
174
  Authenticating with gds_sso strategy
178
- Completed in 0.4ms
179
- Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 14:12:34 +0000
180
- Started GET "/auth/gds/callback?code=8af724f9c09ee4e089368f8cddc85616c0447adee552b3002faaddb54166c157&state=787ba78ded34fb3ad2a92f986844823633e1319d70e7fad5" for 127.0.0.1 at 2014-02-11 14:12:35 +0000
175
+ Completed in 0.3ms
176
+ Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 16:09:39 +0000
177
+ Started GET "/auth/gds/callback?code=001916d13c09db21d52d91dc091304beaba9b6b03c713c52f9c2e8f0c60741a5&state=f856042ec4acb4564e6412022ec9f3afb36cf97e50583e80" for 127.0.0.1 at 2014-02-11 16:09:40 +0000
181
178
  Processing by AuthenticationsController#callback as HTML
182
- Parameters: {"code"=>"8af724f9c09ee4e089368f8cddc85616c0447adee552b3002faaddb54166c157", "state"=>"787ba78ded34fb3ad2a92f986844823633e1319d70e7fad5"}
179
+ Parameters: {"code"=>"001916d13c09db21d52d91dc091304beaba9b6b03c713c52f9c2e8f0c60741a5", "state"=>"f856042ec4acb4564e6412022ec9f3afb36cf97e50583e80"}
183
180
  Authenticating with gds_sso strategy
184
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
185
-  (0.1ms) begin transaction
186
-  (0.2ms) UPDATE "users" SET "permissions" = '---
187
- - signin
188
- ' WHERE "users"."id" = 11
189
-  (33.2ms) commit transaction
190
-  (0.1ms) begin transaction
181
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
182
+  (0.0ms) begin transaction
191
183
   (0.2ms) UPDATE "users" SET "permissions" = '---
192
184
  - signin
193
- ' WHERE "users"."id" = 11
194
-  (10.3ms) commit transaction
185
+ ' WHERE "users"."id" = 1
186
+  (13.0ms) commit transaction
187
+  (0.0ms) begin transaction
188
+  (0.1ms) UPDATE "users" SET "permissions" = '---
189
+ - signin
190
+ ' WHERE "users"."id" = 1
191
+  (10.2ms) commit transaction
195
192
  Redirected to http://www.example-client.com/restricted
196
- Completed 302 Found in 49.7ms (ActiveRecord: 44.3ms)
197
- Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:35 +0000
193
+ Completed 302 Found in 28.5ms (ActiveRecord: 23.7ms)
194
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 16:09:40 +0000
198
195
  Processing by ExampleController#restricted as HTML
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.4ms | ActiveRecord: 0.2ms)
201
- Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:35 +0000
196
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
197
+ Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.2ms)
198
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-12 12:04:40 +0000
199
+ Processing by ExampleController#restricted as HTML
200
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
201
+ Completed 200 OK in 0.9ms (Views: 0.2ms | ActiveRecord: 0.1ms)
202
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 16:09:40 +0000
202
203
  Processing by ExampleController#restricted as HTML
203
204
  Authenticating with gds_sso strategy
204
205
  Completed in 0.3ms
205
- Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 14:12:35 +0000
206
- Started GET "/auth/gds/callback?code=53319f3b8cac2a91c4627efec0f88a262661a3c2826fa1a035e4e2b212a14a71&state=1d152479a45612e77cb0e0bbf53731283148c72571fa2a19" for 127.0.0.1 at 2014-02-11 14:12:35 +0000
206
+ Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 16:09:40 +0000
207
+ Started GET "/auth/gds/callback?code=8998e825443ae71de2031c0eb03e78ce19abda59c706030fd7fc9f046b0e2bba&state=f0c25a873be39731f2e96cdc4a1b74b89118f92d5c5608f8" for 127.0.0.1 at 2014-02-11 16:09:40 +0000
207
208
  Processing by AuthenticationsController#callback as HTML
208
- Parameters: {"code"=>"53319f3b8cac2a91c4627efec0f88a262661a3c2826fa1a035e4e2b212a14a71", "state"=>"1d152479a45612e77cb0e0bbf53731283148c72571fa2a19"}
209
+ Parameters: {"code"=>"8998e825443ae71de2031c0eb03e78ce19abda59c706030fd7fc9f046b0e2bba", "state"=>"f0c25a873be39731f2e96cdc4a1b74b89118f92d5c5608f8"}
209
210
  Authenticating with gds_sso strategy
210
211
  User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
211
212
   (0.1ms) begin transaction
212
213
   (0.2ms) UPDATE "users" SET "permissions" = '---
213
214
  - signin
214
- ' WHERE "users"."id" = 11
215
-  (10.8ms) commit transaction
216
-  (0.1ms) begin transaction
215
+ ' WHERE "users"."id" = 1
216
+  (13.7ms) commit transaction
217
+  (0.0ms) begin transaction
217
218
   (0.1ms) UPDATE "users" SET "permissions" = '---
218
219
  - signin
219
- ' WHERE "users"."id" = 11
220
-  (8.6ms) commit transaction
220
+ ' WHERE "users"."id" = 1
221
+  (11.3ms) commit transaction
221
222
  Redirected to http://www.example-client.com/restricted
222
- Completed 302 Found in 25.2ms (ActiveRecord: 20.0ms)
223
- Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:35 +0000
223
+ Completed 302 Found in 30.4ms (ActiveRecord: 25.6ms)
224
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 16:09:40 +0000
224
225
  Processing by ExampleController#restricted as HTML
225
226
  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 1.9ms (Views: 0.6ms | ActiveRecord: 0.2ms)
227
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'test@example-client.com' LIMIT 1
228
-  (0.0ms) begin transaction
229
-  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
230
- - signin
231
- ' WHERE "users"."id" = 11
232
-  (8.2ms) commit transaction
233
- Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:35 +0000
227
+ Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.2ms)
228
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-12 12:14:40 +0000
234
229
  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
236
230
  Authenticating with gds_sso strategy
237
- Completed in 0.8ms
238
- Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 14:12:35 +0000
239
- Started GET "/auth/gds/callback?code=e6c8fb7975becaaf4bee4ddb6c343a4b0638c257cb75d855c4f5dee6a40e6dec&state=4001702096ace0ac8c73d1fd70effb07e8a58c27cbcba283" for 127.0.0.1 at 2014-02-11 14:12:36 +0000
231
+ Completed in 0.2ms
232
+ Started GET "/auth/gds" for 127.0.0.1 at 2014-02-12 12:14:40 +0000
233
+ Started GET "/auth/gds/callback?code=4c08332b1e307bf282ec9e75a1d9133a547002b29c73419c696026ab58e92f9d&state=30b541b0b7920cdc7e3c6950abf534c0b1271a94e323e40b" for 127.0.0.1 at 2014-02-12 12:14:40 +0000
240
234
  Processing by AuthenticationsController#callback as HTML
241
- Parameters: {"code"=>"e6c8fb7975becaaf4bee4ddb6c343a4b0638c257cb75d855c4f5dee6a40e6dec", "state"=>"4001702096ace0ac8c73d1fd70effb07e8a58c27cbcba283"}
235
+ Parameters: {"code"=>"4c08332b1e307bf282ec9e75a1d9133a547002b29c73419c696026ab58e92f9d", "state"=>"30b541b0b7920cdc7e3c6950abf534c0b1271a94e323e40b"}
242
236
  Authenticating with gds_sso strategy
243
- User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
237
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
238
+  (0.0ms) begin transaction
239
+  (0.2ms) UPDATE "users" SET "permissions" = '---
240
+ - signin
241
+ ' WHERE "users"."id" = 1
242
+  (13.3ms) commit transaction
244
243
   (0.0ms) begin transaction
245
244
   (0.1ms) UPDATE "users" SET "permissions" = '---
246
245
  - signin
247
- ' WHERE "users"."id" = 11
248
-  (10.2ms) commit transaction
249
-  (0.0ms) begin transaction
250
-  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
251
- - signin
252
- ' WHERE "users"."id" = 11
253
-  (7.0ms) commit transaction
246
+ ' WHERE "users"."id" = 1
247
+  (10.4ms) commit transaction
254
248
  Redirected to http://www.example-client.com/restricted
255
- Completed 302 Found in 21.6ms (ActiveRecord: 17.7ms)
256
- Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:36 +0000
249
+ Completed 302 Found in 28.1ms (ActiveRecord: 24.3ms)
250
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-12 12:14:40 +0000
257
251
  Processing by ExampleController#restricted as HTML
258
- User Load (0.1ms) 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.1ms)
260
- Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:36 +0000
252
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
253
+ Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
254
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 16:09:41 +0000
261
255
  Processing by ExampleController#restricted as HTML
262
256
  Authenticating with gds_sso strategy
263
257
  Completed in 0.3ms
264
- Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 14:12:36 +0000
265
- Started GET "/auth/gds/callback?code=70f64f5b290b2dda1cff56465904b804edea5d86dc786eb9b05841e357ff8872&state=1c23b33a5d02264e30b539351ee6e2ebba854c71bd91c566" for 127.0.0.1 at 2014-02-11 14:12:36 +0000
258
+ Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 16:09:41 +0000
259
+ Started GET "/auth/gds/callback?code=709f04e0ec90bab9958bd22031a13e0b9c2ee3d8a2989ccee470614455aa5376&state=cd3f29e4483af0e7ef52b7292e3ef238a55aee5068dbd13d" for 127.0.0.1 at 2014-02-11 16:09:41 +0000
266
260
  Processing by AuthenticationsController#callback as HTML
267
- Parameters: {"code"=>"70f64f5b290b2dda1cff56465904b804edea5d86dc786eb9b05841e357ff8872", "state"=>"1c23b33a5d02264e30b539351ee6e2ebba854c71bd91c566"}
261
+ Parameters: {"code"=>"709f04e0ec90bab9958bd22031a13e0b9c2ee3d8a2989ccee470614455aa5376", "state"=>"cd3f29e4483af0e7ef52b7292e3ef238a55aee5068dbd13d"}
268
262
  Authenticating with gds_sso strategy
269
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
263
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
264
+  (0.1ms) begin transaction
265
+  (0.2ms) UPDATE "users" SET "permissions" = '---
266
+ - signin
267
+ ' WHERE "users"."id" = 1
268
+  (23.5ms) commit transaction
270
269
   (0.1ms) begin transaction
271
270
   (0.2ms) UPDATE "users" SET "permissions" = '---
272
271
  - signin
273
- ' WHERE "users"."id" = 11
274
-  (11.9ms) commit transaction
275
-  (0.0ms) begin transaction
276
-  (0.1ms) UPDATE "users" SET "permissions" = '---
277
- - signin
278
- ' WHERE "users"."id" = 11
279
-  (13.0ms) commit transaction
272
+ ' WHERE "users"."id" = 1
273
+  (16.5ms) commit transaction
280
274
  Redirected to http://www.example-client.com/restricted
281
- Completed 302 Found in 30.3ms (ActiveRecord: 25.5ms)
282
- Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:36 +0000
275
+ Completed 302 Found in 46.0ms (ActiveRecord: 40.6ms)
276
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 16:09:41 +0000
283
277
  Processing by ExampleController#restricted as HTML
284
- User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
285
- Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.1ms)
286
- Started GET "/restricted" for 127.0.0.1 at 2014-02-12 10:17:36 +0000
287
- Processing by ExampleController#restricted as HTML
288
- Authenticating with gds_sso strategy
289
- Completed in 0.2ms
290
- Started GET "/auth/gds" for 127.0.0.1 at 2014-02-12 10:17:36 +0000
291
- Started GET "/auth/gds/callback?code=c0ad710d6760f6b0b0e6a557ca4bf2a123ef9d86e975c9258ef2e053b4bbbb97&state=4783df9c49c0b93843c2cd1c772d849e4db46b1b9cae6707" for 127.0.0.1 at 2014-02-12 10:17:36 +0000
292
- Processing by AuthenticationsController#callback as HTML
293
- Parameters: {"code"=>"c0ad710d6760f6b0b0e6a557ca4bf2a123ef9d86e975c9258ef2e053b4bbbb97", "state"=>"4783df9c49c0b93843c2cd1c772d849e4db46b1b9cae6707"}
294
- Authenticating with gds_sso strategy
295
- User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
296
-  (0.1ms) begin transaction
297
-  (0.2ms) UPDATE "users" SET "permissions" = '---
298
- - signin
299
- ' WHERE "users"."id" = 11
300
-  (12.1ms) commit transaction
301
-  (0.1ms) begin transaction
302
-  (0.1ms) UPDATE "users" SET "permissions" = '---
278
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
279
+ Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.2ms)
280
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'test@example-client.com' LIMIT 1
281
+  (0.0ms) begin transaction
282
+  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
303
283
  - signin
304
- ' WHERE "users"."id" = 11
305
-  (10.5ms) commit transaction
306
- Redirected to http://www.example-client.com/restricted
307
- Completed 302 Found in 26.9ms (ActiveRecord: 23.2ms)
308
- Started GET "/restricted" for 127.0.0.1 at 2014-02-12 10:17:36 +0000
284
+ ' WHERE "users"."id" = 1
285
+  (10.1ms) commit transaction
286
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 16:09:41 +0000
309
287
  Processing by ExampleController#restricted as HTML
310
288
  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-02-11 14:12:37 +0000
313
- Processing by ExampleController#restricted as HTML
314
289
  Authenticating with gds_sso strategy
315
- Completed in 0.3ms
316
- Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 14:12:37 +0000
317
- Started GET "/auth/gds/callback?code=f70c7f75ee370e3dac1d42a255060ae102928781d2b8ed2788b807f83579952b&state=6a8d93fb1c82907068719bac9afd5150913bf6dc6f406e94" for 127.0.0.1 at 2014-02-11 14:12:37 +0000
290
+ Completed in 1.0ms
291
+ Started GET "/auth/gds" for 127.0.0.1 at 2014-02-11 16:09:41 +0000
292
+ Started GET "/auth/gds/callback?code=af1396d0df84f86c9b3a28c1f64e551149c0f62c98203edc5bb2fbed6c929941&state=38955c90d62164e087362f8c7ba0abc2fae2e7c375950ee5" for 127.0.0.1 at 2014-02-11 16:09:41 +0000
318
293
  Processing by AuthenticationsController#callback as HTML
319
- Parameters: {"code"=>"f70c7f75ee370e3dac1d42a255060ae102928781d2b8ed2788b807f83579952b", "state"=>"6a8d93fb1c82907068719bac9afd5150913bf6dc6f406e94"}
294
+ Parameters: {"code"=>"af1396d0df84f86c9b3a28c1f64e551149c0f62c98203edc5bb2fbed6c929941", "state"=>"38955c90d62164e087362f8c7ba0abc2fae2e7c375950ee5"}
320
295
  Authenticating with gds_sso strategy
321
296
  User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
322
-  (0.1ms) begin transaction
323
-  (0.2ms) UPDATE "users" SET "permissions" = '---
297
+  (0.0ms) begin transaction
298
+  (0.1ms) UPDATE "users" SET "permissions" = '---
324
299
  - signin
325
- ' WHERE "users"."id" = 11
326
-  (11.2ms) commit transaction
300
+ ' WHERE "users"."id" = 1
301
+  (15.0ms) commit transaction
327
302
   (0.0ms) begin transaction
328
-  (0.1ms) UPDATE "users" SET "permissions" = '---
303
+  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
329
304
  - signin
330
- ' WHERE "users"."id" = 11
305
+ ' WHERE "users"."id" = 1
331
306
   (8.0ms) commit transaction
332
307
  Redirected to http://www.example-client.com/restricted
333
- Completed 302 Found in 24.4ms (ActiveRecord: 19.8ms)
334
- Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:37 +0000
335
- Processing by ExampleController#restricted as HTML
336
- User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
337
- Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms)
338
- Started GET "/restricted" for 127.0.0.1 at 2014-02-12 10:07:37 +0000
308
+ Completed 302 Found in 27.6ms (ActiveRecord: 23.5ms)
309
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 16:09:42 +0000
339
310
  Processing by ExampleController#restricted as HTML
340
- User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
341
- Completed 200 OK in 0.9ms (Views: 0.2ms | ActiveRecord: 0.1ms)
342
- Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:37 +0000
343
- Processing by ExampleController#restricted as JSON
344
- Authenticating with gds_bearer_token strategy
345
- Completed in 8.3ms
346
- Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-02-11 14:12:37 +0000
347
- Processing by ExampleController#this_requires_signin_permission as JSON
348
- Authenticating with gds_bearer_token strategy
349
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
350
-  (0.1ms) begin transaction
351
-  (0.1ms) UPDATE "users" SET "permissions" = '---
352
- - signin
353
- ' WHERE "users"."id" = 11
354
-  (10.1ms) commit transaction
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.3ms | ActiveRecord: 0.2ms)
313
+  (0.0ms) begin transaction
314
+ 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", "a1s2d39752"]]
315
+  (9.4ms) commit transaction
355
316
   (0.0ms) begin transaction
356
-  (0.1ms) UPDATE "users" SET "permissions" = '---
317
+ 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", "a1s2d36789"]]
318
+  (11.1ms) commit transaction
319
+ Processing by Api::UserController#reauth as HTML
320
+ Parameters: {"uid"=>"a1s2d39752"}
321
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d39752' LIMIT 1
322
+  (0.0ms) begin transaction
323
+  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
357
324
  - signin
358
- ' WHERE "users"."id" = 11
359
-  (10.6ms) commit transaction
360
- Completed 200 OK in 61.2ms (Views: 0.5ms | ActiveRecord: 21.3ms)
361
- Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:37 +0000
362
- Processing by ExampleController#restricted as JSON
363
- Authenticating with gds_bearer_token strategy
364
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
325
+ ' WHERE "users"."id" = 2
326
+  (10.4ms) commit transaction
327
+ Completed 200 OK in 13.7ms (ActiveRecord: 10.7ms)
328
+ User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 2]]
329
+  (0.0ms) begin transaction
330
+ 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", "a1s2d3627"]]
331
+  (11.1ms) commit transaction
332
+  (0.1ms) begin transaction
333
+ 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", "a1s2d33536"]]
334
+  (11.8ms) commit transaction
335
+ WARNING: Can't mass-assign protected attributes: uid, name, permissions
336
+ Processing by Api::UserController#reauth as HTML
337
+ Parameters: {"uid"=>"a1s2d3627"}
338
+ Completed 403 Forbidden in 3.4ms (Views: 2.8ms | ActiveRecord: 0.0ms)
365
339
   (0.1ms) begin transaction
366
-  (0.2ms) UPDATE "users" SET "permissions" = '---
367
- - signin
368
- ' WHERE "users"."id" = 11
369
-  (16.1ms) commit transaction
340
+ 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", "a1s2d39112"]]
341
+  (12.0ms) commit transaction
370
342
   (0.1ms) begin transaction
371
-  (0.1ms) UPDATE "users" SET "permissions" = '---
343
+ 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", "a1s2d33830"]]
344
+  (11.3ms) commit transaction
345
+ Processing by Api::UserController#reauth as HTML
346
+ Parameters: {"uid"=>"nonexistent-user"}
347
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1
348
+ Completed 200 OK in 1.2ms (ActiveRecord: 0.2ms)
349
+  (0.1ms) begin transaction
350
+ 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", "a1s2d32093"]]
351
+  (12.4ms) commit transaction
352
+  (0.1ms) begin transaction
353
+ 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", "a1s2d38920"]]
354
+  (14.5ms) commit transaction
355
+ Processing by Api::UserController#update as HTML
356
+ Parameters: {"uid"=>"a1s2d32093"}
357
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d32093' LIMIT 1
358
+  (0.0ms) begin transaction
359
+  (0.1ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '---
372
360
  - signin
373
- ' WHERE "users"."id" = 11
374
-  (10.4ms) commit transaction
375
- Completed 200 OK in 82.9ms (Views: 0.5ms | ActiveRecord: 27.1ms)
361
+ - new permission
362
+ ', "organisation_slug" = 'justice-league' WHERE "users"."id" = 8
363
+  (12.5ms) commit transaction
364
+ Completed 200 OK in 16.0ms (ActiveRecord: 12.9ms)
365
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 8]]
366
+  (0.1ms) begin transaction
367
+ 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", "a1s2d34687"]]
368
+  (13.1ms) commit transaction
369
+  (0.0ms) begin transaction
370
+ 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", "a1s2d37787"]]
371
+  (16.6ms) commit transaction
372
+ WARNING: Can't mass-assign protected attributes: uid, name, permissions
373
+ Processing by Api::UserController#update as HTML
374
+ Parameters: {"uid"=>"a1s2d34687"}
375
+ Completed 403 Forbidden in 1.6ms (Views: 1.0ms | ActiveRecord: 0.0ms)
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.2
4
+ version: 9.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -315,7 +315,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
315
315
  version: '0'
316
316
  segments:
317
317
  - 0
318
- hash: 426318311748726962
318
+ hash: -3127725874143566220
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: 426318311748726962
327
+ hash: -3127725874143566220
328
328
  requirements: []
329
329
  rubyforge_project: gds-sso
330
330
  rubygems_version: 1.8.23