gds-sso 9.2.1 → 9.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -3,13 +3,6 @@ Bundler::GemHelper.install_tasks
3
3
 
4
4
  load File.dirname(__FILE__) + "/spec/tasks/signonotron_tasks.rake"
5
5
 
6
- require 'rake/testtask'
7
- Rake::TestTask.new do |t|
8
- t.libs << "test"
9
- t.test_files = FileList['test/**/*_test.rb']
10
- t.verbose = true
11
- end
12
-
13
6
  require 'rspec/core/rake_task'
14
7
  desc "Run all specs"
15
8
  RSpec::Core::RakeTask.new(:spec) do |task|
@@ -28,4 +21,4 @@ task :publish_gem do |t|
28
21
  puts "Published #{gem}" if gem
29
22
  end
30
23
 
31
- task :default => [:test, :"signonotron:start", :spec]
24
+ task :default => [:"signonotron:start", :spec]
data/lib/gds-sso/user.rb CHANGED
@@ -6,7 +6,9 @@ module GDS
6
6
  extend ActiveSupport::Concern
7
7
 
8
8
  included do
9
- attr_accessible :uid, :email, :name, :permissions, :organisation_slug, as: :oauth
9
+ if (Gem::Version.new(Rails.version) < Gem::Version.new("4.0")) && respond_to?(:attr_accessible)
10
+ attr_accessible :uid, :email, :name, :permissions, :organisation_slug, as: :oauth
11
+ end
10
12
  end
11
13
 
12
14
  def has_permission?(permission)
@@ -35,11 +37,21 @@ module GDS
35
37
 
36
38
  module ClassMethods
37
39
  def find_for_gds_oauth(auth_hash)
40
+ user_params = GDS::SSO::User.user_params_from_auth_hash(auth_hash.to_hash)
41
+
38
42
  if user = self.where(:uid => auth_hash["uid"]).first
39
- user.update_attributes(GDS::SSO::User.user_params_from_auth_hash(auth_hash.to_hash), as: :oauth)
43
+ if Gem::Version.new(Rails.version) >= Gem::Version.new("4.0")
44
+ user.update_attributes(user_params)
45
+ else
46
+ user.update_attributes(user_params, as: :oauth)
47
+ end
40
48
  user
41
49
  else # Create a new user.
42
- self.create!(GDS::SSO::User.user_params_from_auth_hash(auth_hash.to_hash), as: :oauth)
50
+ if Gem::Version.new(Rails.version) >= Gem::Version.new("4.0")
51
+ self.create!(user_params)
52
+ else
53
+ self.create!(user_params, as: :oauth)
54
+ end
43
55
  end
44
56
  end
45
57
  end
@@ -1,5 +1,5 @@
1
1
  module GDS
2
2
  module SSO
3
- VERSION = "9.2.1"
3
+ VERSION = "9.2.2"
4
4
  end
5
5
  end
@@ -171,12 +171,13 @@ Warden::Strategies.add(:mock_gds_sso_api_access) do
171
171
  logger.debug("Authenticating with mock_gds_sso_api_access strategy")
172
172
  dummy_api_user = GDS::SSO.test_user || GDS::SSO::Config.user_klass.where(email: "dummyapiuser@domain.com").first
173
173
  if dummy_api_user.nil?
174
- dummy_api_user = GDS::SSO::Config.user_klass.create!(
174
+ dummy_api_user = GDS::SSO::Config.user_klass.new(
175
175
  email: "dummyapiuser@domain.com",
176
176
  uid: "#{rand(10000)}",
177
177
  name: "Dummy API user created by gds-sso",
178
- permissions: ["signin"],
179
178
  as: :oauth)
179
+ dummy_api_user.permissions = ["signin"]
180
+ dummy_api_user.save!
180
181
  end
181
182
  success!(dummy_api_user)
182
183
  end
@@ -37,31 +37,29 @@ describe Api::UserController, type: :controller do
37
37
  :name => "User",
38
38
  :permissions =>["signin"] })
39
39
 
40
- request.env['warden'] = stub("stub warden", :authenticate! => true, authenticated?: true, user: malicious_user)
40
+ request.env['warden'] = double("stub warden", :authenticate! => true, authenticated?: true, user: malicious_user)
41
41
 
42
42
  request.env['RAW_POST_DATA'] = user_update_json
43
43
  put :update, uid: @user_to_update.uid
44
44
 
45
- assert_equal 403, response.status
45
+ expect(response.status).to eq(403)
46
46
  end
47
47
 
48
48
  it "should create/update the user record in the same way as the OAuth callback" do
49
49
  # Test that it authenticates
50
- request.env['warden'] = mock("mock warden")
51
- request.env['warden'].expects(:authenticate!).at_least_once.returns(true)
52
- request.env['warden'].expects(:authenticated?).at_least_once.returns(true)
53
- request.env['warden'].expects(:user).at_least_once.returns(@signon_sso_push_user)
50
+ request.env['warden'] = double("mock warden")
51
+ expect(request.env['warden']).to receive(:authenticate!).at_least(:once).and_return(true)
52
+ expect(request.env['warden']).to receive(:authenticated?).at_least(:once).and_return(true)
53
+ expect(request.env['warden']).to receive(:user).at_least(:once).and_return(@signon_sso_push_user)
54
54
 
55
55
  request.env['RAW_POST_DATA'] = user_update_json
56
56
  put :update, uid: @user_to_update.uid
57
57
 
58
58
  @user_to_update.reload
59
- assert_equal "Joshua Marshall", @user_to_update.name
60
- assert_equal "user@domain.com", @user_to_update.email
61
- expected_permissions = ["signin", "new permission"]
62
- assert_equal expected_permissions, @user_to_update.permissions
63
- expected_organisation = "justice-league"
64
- assert_equal expected_organisation, @user_to_update.organisation_slug
59
+ expect(@user_to_update.name).to eq("Joshua Marshall")
60
+ expect(@user_to_update.email).to eq("user@domain.com")
61
+ expect(@user_to_update.permissions).to eq(["signin", "new permission"])
62
+ expect(@user_to_update.organisation_slug).to eq("justice-league")
65
63
  end
66
64
  end
67
65
 
@@ -72,35 +70,35 @@ describe Api::UserController, type: :controller do
72
70
  :name => "User",
73
71
  :permissions => ["signin"] })
74
72
 
75
- request.env['warden'] = stub("stub warden", :authenticate! => true, authenticated?: true, user: malicious_user)
73
+ request.env['warden'] = double("stub warden", :authenticate! => true, authenticated?: true, user: malicious_user)
76
74
 
77
75
  post :reauth, uid: @user_to_update.uid
78
76
 
79
- assert_equal 403, response.status
77
+ expect(response.status).to eq(403)
80
78
  end
81
79
 
82
80
  it "should return success if user record doesn't exist" do
83
- request.env['warden'] = mock("mock warden")
84
- request.env['warden'].expects(:authenticate!).at_least_once.returns(true)
85
- request.env['warden'].expects(:authenticated?).at_least_once.returns(true)
86
- request.env['warden'].expects(:user).at_least_once.returns(@signon_sso_push_user)
81
+ request.env['warden'] = double("mock warden")
82
+ expect(request.env['warden']).to receive(:authenticate!).at_least(:once).and_return(true)
83
+ expect(request.env['warden']).to receive(:authenticated?).at_least(:once).and_return(true)
84
+ expect(request.env['warden']).to receive(:user).at_least(:once).and_return(@signon_sso_push_user)
87
85
 
88
86
  post :reauth, uid: "nonexistent-user"
89
87
 
90
- assert_equal 200, response.status
88
+ expect(response.status).to eq(200)
91
89
  end
92
90
 
93
91
  it "should set remotely_signed_out to true on the user" do
94
92
  # Test that it authenticates
95
- request.env['warden'] = mock("mock warden")
96
- request.env['warden'].expects(:authenticate!).at_least_once.returns(true)
97
- request.env['warden'].expects(:authenticated?).at_least_once.returns(true)
98
- request.env['warden'].expects(:user).at_least_once.returns(@signon_sso_push_user)
93
+ request.env['warden'] = double("mock warden")
94
+ expect(request.env['warden']).to receive(:authenticate!).at_least(:once).and_return(true)
95
+ expect(request.env['warden']).to receive(:authenticated?).at_least(:once).and_return(true)
96
+ expect(request.env['warden']).to receive(:user).at_least(:once).and_return(@signon_sso_push_user)
99
97
 
100
98
  post :reauth, uid: @user_to_update.uid
101
99
 
102
100
  @user_to_update.reload
103
- assert_equal true, @user_to_update.remotely_signed_out
101
+ expect(@user_to_update.remotely_signed_out).to be_true
104
102
  end
105
103
  end
106
104
  end
@@ -6,7 +6,8 @@ DELETE FROM `permissions`;
6
6
  DELETE FROM `users`;
7
7
 
8
8
  -- Setup fixture data
9
- INSERT INTO `oauth_applications` VALUES (1,'GDS_SSO integration test','gds-sso-test','secret','http://www.example-client.com/auth/gds/callback','2012-04-19 13:26:54','2012-04-19 13:26:54', 'http://home.com', 'GDS_SSO integration test');
9
+ INSERT INTO `oauth_applications` (id, name, uid, secret, redirect_uri, created_at, updated_at, home_uri, description)
10
+ VALUES (1,'GDS_SSO integration test','gds-sso-test','secret','http://www.example-client.com/auth/gds/callback','2012-04-19 13:26:54','2012-04-19 13:26:54', 'http://home.com', 'GDS_SSO integration test');
10
11
  INSERT INTO `users` (id, email, encrypted_password, created_at, updated_at, confirmed_at, name, uid, role)
11
12
  VALUES (1,'test@example-client.com','$2a$04$MdMkVFwTq5GLJJkHS8GLIe6dK1.C4ozzba5ZS5Ks2b/NenVsMGGRW','2012-04-19 13:26:54','2012-04-19 13:26:54','2012-04-19 13:26:54','Test User','integration-uid', "normal");
12
13
  INSERT INTO `permissions` (id, user_id, application_id, permissions) VALUES (1,1,1,"---
@@ -1,375 +1,375 @@
1
1
  Connecting to database specified by database.yml
2
-  (1.9ms) select sqlite_version(*)
3
-  (17.1ms) 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
-  (12.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
5
-  (15.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
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
6
   (0.1ms) begin transaction
7
- SQL (3.8ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34286"]]
8
-  (13.0ms) commit 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
9
9
   (0.1ms) begin transaction
10
- SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34481"]]
11
-  (12.2ms) 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", "a1s2d37434"]]
11
+  (13.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"=>"a1s2d34286"}
15
- Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (3.0ms)
16
- Completed 403 Forbidden in 40.6ms (Views: 39.8ms | ActiveRecord: 0.0ms)
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)
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", "a1s2d34054"]]
19
-  (15.4ms) commit transaction
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", "a1s2d39648"]]
22
-  (14.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", "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
23
  Processing by Api::UserController#update as HTML
24
- Parameters: {"uid"=>"a1s2d34054"}
25
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d34054' LIMIT 1
24
+ Parameters: {"uid"=>"a1s2d32268"}
25
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d32268' LIMIT 1
26
26
   (0.1ms) begin transaction
27
27
   (0.2ms) 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
-  (10.6ms) commit transaction
32
- Completed 200 OK in 18.3ms (ActiveRecord: 11.1ms)
31
+  (8.6ms) commit transaction
32
+ Completed 200 OK in 16.9ms (ActiveRecord: 9.1ms)
33
33
  User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]
34
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", "a1s2d31062"]]
36
-  (10.2ms) 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", "a1s2d36178"]]
36
+  (9.3ms) 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", "a1s2d3460"]]
39
-  (9.8ms) commit 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
40
  WARNING: Can't mass-assign protected attributes: uid, name, permissions
41
41
  Processing by Api::UserController#reauth as HTML
42
- Parameters: {"uid"=>"a1s2d31062"}
43
- Completed 403 Forbidden in 1.7ms (Views: 1.1ms | ActiveRecord: 0.0ms)
42
+ Parameters: {"uid"=>"a1s2d36178"}
43
+ Completed 403 Forbidden in 1.7ms (Views: 1.0ms | 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", "a1s2d39234"]]
46
-  (9.8ms) commit transaction
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", "a1s2d31308"]]
49
-  (10.0ms) commit 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
50
  Processing by Api::UserController#reauth as HTML
51
- Parameters: {"uid"=>"nonexistent-user"}
52
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1
53
- Completed 200 OK in 1.1ms (ActiveRecord: 0.2ms)
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" = '---
55
+ - 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]]
54
60
   (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", "a1s2d39743"]]
56
-  (9.9ms) commit transaction
57
-  (0.0ms) begin transaction
58
- 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", "a1s2d3249"]]
59
-  (10.2ms) commit 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
60
66
  Processing by Api::UserController#reauth as HTML
61
- Parameters: {"uid"=>"a1s2d39743"}
62
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d39743' LIMIT 1
63
-  (0.0ms) begin transaction
64
-  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
65
- - signin
66
- ' WHERE "users"."id" = 9
67
-  (10.2ms) commit transaction
68
- Completed 200 OK in 13.0ms (ActiveRecord: 10.6ms)
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-30 11:26:06 +0000
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
71
  Processing by ExampleController#index as HTML
72
- Completed 200 OK in 3.5ms (Views: 3.1ms | ActiveRecord: 0.0ms)
73
- Started GET "/restricted" for 127.0.0.1 at 2014-01-30 11:26:06 +0000
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
74
74
  Processing by ExampleController#restricted as HTML
75
75
  Authenticating with gds_sso strategy
76
- Completed in 41.5ms
77
- Started GET "/auth/gds" for 127.0.0.1 at 2014-01-30 11:26:06 +0000
78
- Started GET "/auth/gds/callback?code=bbd6f4334c2e431e50558d804c177d5ab1fd34ee7f4c79567ec75fe58c7e2325&state=ac961d72be22d46e54df46b5fc0bc6088757e50db5f0cb94" for 127.0.0.1 at 2014-01-30 11:26:07 +0000
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
79
79
  Processing by AuthenticationsController#callback as HTML
80
- Parameters: {"code"=>"bbd6f4334c2e431e50558d804c177d5ab1fd34ee7f4c79567ec75fe58c7e2325", "state"=>"ac961d72be22d46e54df46b5fc0bc6088757e50db5f0cb94"}
80
+ Parameters: {"code"=>"e6fc10270e675cd0e71f7b28931b538da1bdc20d5cde1c828ef7d097fced02aa", "state"=>"78623b0d617fc3d2eb1736195791e5435fcb43fbf249bf56"}
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
- 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
-  (10.1ms) commit transaction
86
-  (0.0ms) 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
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
-  (8.2ms) commit transaction
90
+  (7.1ms) commit transaction
91
91
  Redirected to http://www.example-client.com/restricted
92
- Completed 302 Found in 24.8ms (ActiveRecord: 18.8ms)
93
- Started GET "/restricted" for 127.0.0.1 at 2014-01-30 11:26:07 +0000
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
94
94
  Processing by ExampleController#restricted as HTML
95
- User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
96
- Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms)
97
- Started GET "/restricted" for 127.0.0.1 at 2014-01-30 11:26:07 +0000
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
98
98
  Processing by ExampleController#restricted as HTML
99
99
  Authenticating with gds_sso strategy
100
100
  Completed in 0.2ms
101
- Started GET "/auth/gds" for 127.0.0.1 at 2014-01-30 11:26:07 +0000
102
- Started GET "/auth/gds/callback?code=4e9ef98e9bc9eca3c940483b933e6b039bf5fa44e65c348fef6800867172c0f8&state=bf519f59b9ea347c0af6862627c940625a4af53f4e0408f1" for 127.0.0.1 at 2014-01-30 11:26:08 +0000
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
103
103
  Processing by AuthenticationsController#callback as HTML
104
- Parameters: {"code"=>"4e9ef98e9bc9eca3c940483b933e6b039bf5fa44e65c348fef6800867172c0f8", "state"=>"bf519f59b9ea347c0af6862627c940625a4af53f4e0408f1"}
104
+ Parameters: {"code"=>"99a32bede75e4ad5f4d9d91ba9dbf42603907dea464be720c39ca8f1db0b90cc", "state"=>"13e6a62c4a47b4f7ba5472161eaf1e7000c05963f6a1291a"}
105
105
  Authenticating with gds_sso strategy
106
- User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
107
-  (0.1ms) begin transaction
108
-  (0.1ms) UPDATE "users" SET "permissions" = '---
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" = '---
109
109
  - signin
110
110
  ' WHERE "users"."id" = 11
111
-  (18.6ms) commit transaction
112
-  (0.0ms) begin transaction
113
-  (0.1ms) UPDATE "users" SET "permissions" = '---
111
+  (14.1ms) commit transaction
112
+  (0.1ms) begin transaction
113
+  (0.2ms) UPDATE "users" SET "permissions" = '---
114
114
  - signin
115
115
  ' WHERE "users"."id" = 11
116
-  (13.9ms) commit transaction
116
+  (12.5ms) commit transaction
117
117
  Redirected to http://www.example-client.com/restricted
118
- Completed 302 Found in 40.7ms (ActiveRecord: 33.3ms)
119
- Started GET "/restricted" for 127.0.0.1 at 2014-01-30 11:26:08 +0000
120
- Processing by ExampleController#restricted as HTML
121
- User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
122
- Completed 200 OK in 2.6ms (Views: 0.8ms | ActiveRecord: 0.3ms)
123
- Started GET "/restricted" for 127.0.0.1 at 2014-01-30 11:26:08 +0000
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
124
120
  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
125
  Authenticating with gds_sso strategy
126
- Completed in 0.3ms
127
- Started GET "/auth/gds" for 127.0.0.1 at 2014-01-30 11:26:08 +0000
128
- Started GET "/auth/gds/callback?code=2955a427052acac9fb020d74f6dcce52c21c7837c1fff15841ca4bff16810df3&state=f54772c3aadc24cc438268104fbf1d63fee88c2b29337fef" for 127.0.0.1 at 2014-01-30 11:26:08 +0000
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
129
129
  Processing by AuthenticationsController#callback as HTML
130
- Parameters: {"code"=>"2955a427052acac9fb020d74f6dcce52c21c7837c1fff15841ca4bff16810df3", "state"=>"f54772c3aadc24cc438268104fbf1d63fee88c2b29337fef"}
130
+ Parameters: {"code"=>"c734589a77321d80b595cd458f2a97984bc60a31423e649f53a8066d6adbaa6f", "state"=>"4ed2bc23f0aa2c35292b24cf085d2f8d2bd0633d7ffc9768"}
131
131
  Authenticating with gds_sso strategy
132
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
132
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
133
133
   (0.1ms) begin transaction
134
134
   (0.2ms) UPDATE "users" SET "permissions" = '---
135
135
  - signin
136
136
  ' WHERE "users"."id" = 11
137
-  (12.3ms) commit transaction
138
-  (0.1ms) begin transaction
139
-  (0.2ms) UPDATE "users" SET "permissions" = '---
137
+  (24.3ms) commit transaction
138
+  (0.0ms) begin transaction
139
+  (0.1ms) UPDATE "users" SET "permissions" = '---
140
140
  - signin
141
141
  ' WHERE "users"."id" = 11
142
-  (12.0ms) commit transaction
143
- Redirected to http://www.example-client.com/restricted
144
- Completed 302 Found in 30.7ms (ActiveRecord: 25.0ms)
145
- Started GET "/restricted" for 127.0.0.1 at 2014-01-30 11:26:08 +0000
146
- Processing by ExampleController#restricted as HTML
147
- User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
148
- Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms)
149
- Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-01-30 11:26:08 +0000
142
+  (11.0ms) commit transaction
143
+ 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
146
+ 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
150
150
  Processing by ExampleController#this_requires_signin_permission as HTML
151
151
  Authenticating with gds_sso strategy
152
- Completed in 0.6ms
153
- Started GET "/auth/gds" for 127.0.0.1 at 2014-01-30 11:26:08 +0000
154
- Started GET "/auth/gds/callback?code=4b843d5cb3e88fa160c5fe50a3988e7eaaa7d989dcaf29a3b7fb90e8b47bfe39&state=e04d474f8e77975f6560f50641a87648994e340c93e285fb" for 127.0.0.1 at 2014-01-30 11:26:09 +0000
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
155
155
  Processing by AuthenticationsController#callback as HTML
156
- Parameters: {"code"=>"4b843d5cb3e88fa160c5fe50a3988e7eaaa7d989dcaf29a3b7fb90e8b47bfe39", "state"=>"e04d474f8e77975f6560f50641a87648994e340c93e285fb"}
156
+ Parameters: {"code"=>"d4c19782a4d297262a15c4b248148ce88a5712cc9ebeb139eecf9457fd11eec6", "state"=>"4f13783c8f5b8095df92fbcb7f4f4f38e8a3c7f7bc6d0177"}
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
-  (0.1ms) begin transaction
159
+  (0.0ms) begin transaction
160
160
   (0.2ms) UPDATE "users" SET "permissions" = '---
161
161
  - signin
162
162
  ' WHERE "users"."id" = 11
163
-  (9.3ms) commit transaction
164
-  (0.1ms) begin transaction
165
-  (0.2ms) UPDATE "users" SET "permissions" = '---
163
+  (10.1ms) commit transaction
164
+  (0.0ms) begin transaction
165
+  (0.3ms) UPDATE "users" SET "permissions" = '---
166
166
  - signin
167
167
  ' WHERE "users"."id" = 11
168
-  (7.6ms) commit transaction
168
+  (7.4ms) commit transaction
169
169
  Redirected to http://www.example-client.com/this_requires_signin_permission
170
- Completed 302 Found in 22.7ms (ActiveRecord: 17.6ms)
171
- Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-01-30 11:26:09 +0000
172
- Processing by ExampleController#this_requires_signin_permission as HTML
173
- User Load (0.1ms) 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.1ms)
175
- Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-01-30 11:26:09 +0000
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
176
172
  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
176
+ Processing by ExampleController#restricted 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-30 11:26:09 +0000
180
- Started GET "/auth/gds/callback?code=134885ee836204ff43d31ccc582b44083b4f4f1690fa9ad2d3b9e80441ab890e&state=a62b5d8ff1085b8ab7f457b63757682bd1945487f66771ff" for 127.0.0.1 at 2014-01-30 11:26:09 +0000
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
181
181
  Processing by AuthenticationsController#callback as HTML
182
- Parameters: {"code"=>"134885ee836204ff43d31ccc582b44083b4f4f1690fa9ad2d3b9e80441ab890e", "state"=>"a62b5d8ff1085b8ab7f457b63757682bd1945487f66771ff"}
182
+ Parameters: {"code"=>"8af724f9c09ee4e089368f8cddc85616c0447adee552b3002faaddb54166c157", "state"=>"787ba78ded34fb3ad2a92f986844823633e1319d70e7fad5"}
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
-  (0.0ms) begin transaction
185
+  (0.1ms) begin transaction
186
186
   (0.2ms) UPDATE "users" SET "permissions" = '---
187
187
  - signin
188
188
  ' WHERE "users"."id" = 11
189
-  (13.6ms) commit transaction
189
+  (33.2ms) commit transaction
190
190
   (0.1ms) begin transaction
191
191
   (0.2ms) UPDATE "users" SET "permissions" = '---
192
192
  - signin
193
193
  ' WHERE "users"."id" = 11
194
-  (8.2ms) commit transaction
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-30 11:26:09 +0000
198
- Processing by ExampleController#this_requires_signin_permission as HTML
194
+  (10.3ms) commit transaction
195
+ 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
198
+ Processing by ExampleController#restricted as HTML
199
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-30 11:26:09 +0000
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
202
202
  Processing by ExampleController#restricted as HTML
203
203
  Authenticating with gds_sso strategy
204
- Completed in 0.2ms
205
- Started GET "/auth/gds" for 127.0.0.1 at 2014-01-30 11:26:09 +0000
206
- Started GET "/auth/gds/callback?code=d14d2130eac245b11610d2d7c51bd796c9fbae7597f4fe5647ce47f6194c9b12&state=0ce283073ff60edb6c2b7f306b8acc6ab9c507abaa1028a3" for 127.0.0.1 at 2014-01-30 11:26:09 +0000
204
+ 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
207
207
  Processing by AuthenticationsController#callback as HTML
208
- Parameters: {"code"=>"d14d2130eac245b11610d2d7c51bd796c9fbae7597f4fe5647ce47f6194c9b12", "state"=>"0ce283073ff60edb6c2b7f306b8acc6ab9c507abaa1028a3"}
208
+ Parameters: {"code"=>"53319f3b8cac2a91c4627efec0f88a262661a3c2826fa1a035e4e2b212a14a71", "state"=>"1d152479a45612e77cb0e0bbf53731283148c72571fa2a19"}
209
209
  Authenticating with gds_sso strategy
210
210
  User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
211
211
   (0.1ms) begin transaction
212
-  (0.1ms) UPDATE "users" SET "permissions" = '---
212
+  (0.2ms) UPDATE "users" SET "permissions" = '---
213
213
  - signin
214
214
  ' WHERE "users"."id" = 11
215
-  (8.7ms) commit transaction
216
-  (0.0ms) begin transaction
215
+  (10.8ms) commit transaction
216
+  (0.1ms) begin transaction
217
217
   (0.1ms) UPDATE "users" SET "permissions" = '---
218
218
  - signin
219
219
  ' WHERE "users"."id" = 11
220
-  (6.5ms) commit transaction
220
+  (8.6ms) commit transaction
221
221
  Redirected to http://www.example-client.com/restricted
222
- Completed 302 Found in 20.5ms (ActiveRecord: 15.7ms)
223
- Started GET "/restricted" for 127.0.0.1 at 2014-01-30 11:26:09 +0000
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
224
224
  Processing by ExampleController#restricted as HTML
225
- User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
226
- Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.1ms)
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 1.9ms (Views: 0.6ms | ActiveRecord: 0.2ms)
227
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
-  (8.0ms) commit transaction
233
- Started GET "/restricted" for 127.0.0.1 at 2014-01-30 11:26:10 +0000
232
+  (8.2ms) commit transaction
233
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:35 +0000
234
234
  Processing by ExampleController#restricted as HTML
235
- User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
235
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
236
236
  Authenticating with gds_sso strategy
237
- Completed in 0.7ms
238
- Started GET "/auth/gds" for 127.0.0.1 at 2014-01-30 11:26:10 +0000
239
- Started GET "/auth/gds/callback?code=ab02d8007ca7b28a90d145185f0238f776e0b1a3459f156a6669a643708bbc27&state=0f587d064bf9e71ea3d6bb3249a272d4049ef72440671dba" for 127.0.0.1 at 2014-01-30 11:26:10 +0000
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
240
240
  Processing by AuthenticationsController#callback as HTML
241
- Parameters: {"code"=>"ab02d8007ca7b28a90d145185f0238f776e0b1a3459f156a6669a643708bbc27", "state"=>"0f587d064bf9e71ea3d6bb3249a272d4049ef72440671dba"}
241
+ Parameters: {"code"=>"e6c8fb7975becaaf4bee4ddb6c343a4b0638c257cb75d855c4f5dee6a40e6dec", "state"=>"4001702096ace0ac8c73d1fd70effb07e8a58c27cbcba283"}
242
242
  Authenticating with gds_sso strategy
243
- User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
244
-  (0.1ms) begin transaction
245
-  (0.2ms) UPDATE "users" SET "permissions" = '---
243
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
244
+  (0.0ms) begin transaction
245
+  (0.1ms) UPDATE "users" SET "permissions" = '---
246
246
  - signin
247
247
  ' WHERE "users"."id" = 11
248
-  (18.4ms) commit transaction
249
-  (0.1ms) begin transaction
248
+  (10.2ms) commit transaction
249
+  (0.0ms) begin transaction
250
250
   (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
251
251
  - signin
252
252
  ' WHERE "users"."id" = 11
253
-  (7.2ms) commit transaction
253
+  (7.0ms) commit transaction
254
254
  Redirected to http://www.example-client.com/restricted
255
- Completed 302 Found in 30.2ms (ActiveRecord: 26.1ms)
256
- Started GET "/restricted" for 127.0.0.1 at 2014-01-30 11:26:10 +0000
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
257
257
  Processing by ExampleController#restricted as HTML
258
258
  User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
259
259
  Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms)
260
- Started GET "/restricted" for 127.0.0.1 at 2014-01-30 11:26:10 +0000
260
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:36 +0000
261
261
  Processing by ExampleController#restricted as HTML
262
262
  Authenticating with gds_sso strategy
263
- Completed in 0.2ms
264
- Started GET "/auth/gds" for 127.0.0.1 at 2014-01-30 11:26:10 +0000
265
- Started GET "/auth/gds/callback?code=1925d41b24df1eb865d5bd41bd3649acb2a0598b18e07c730d02cfe4e3847a84&state=38715f2b26587f3ff0631a8abf6937a262a7af0e8e750bb1" for 127.0.0.1 at 2014-01-30 11:26:10 +0000
263
+ 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
266
266
  Processing by AuthenticationsController#callback as HTML
267
- Parameters: {"code"=>"1925d41b24df1eb865d5bd41bd3649acb2a0598b18e07c730d02cfe4e3847a84", "state"=>"38715f2b26587f3ff0631a8abf6937a262a7af0e8e750bb1"}
267
+ Parameters: {"code"=>"70f64f5b290b2dda1cff56465904b804edea5d86dc786eb9b05841e357ff8872", "state"=>"1c23b33a5d02264e30b539351ee6e2ebba854c71bd91c566"}
268
268
  Authenticating with gds_sso strategy
269
269
  User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
270
270
   (0.1ms) begin transaction
271
-  (0.1ms) UPDATE "users" SET "permissions" = '---
271
+  (0.2ms) UPDATE "users" SET "permissions" = '---
272
272
  - signin
273
273
  ' WHERE "users"."id" = 11
274
-  (7.9ms) commit transaction
275
-  (0.1ms) begin transaction
274
+  (11.9ms) commit transaction
275
+  (0.0ms) begin transaction
276
276
   (0.1ms) UPDATE "users" SET "permissions" = '---
277
277
  - signin
278
278
  ' WHERE "users"."id" = 11
279
-  (6.2ms) commit transaction
279
+  (13.0ms) commit transaction
280
280
  Redirected to http://www.example-client.com/restricted
281
- Completed 302 Found in 19.2ms (ActiveRecord: 14.7ms)
282
- Started GET "/restricted" for 127.0.0.1 at 2014-01-30 11:26:10 +0000
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
283
283
  Processing by ExampleController#restricted as HTML
284
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.2ms (Views: 0.4ms | ActiveRecord: 0.1ms)
286
- Started GET "/restricted" for 127.0.0.1 at 2014-01-31 07:31:10 +0000
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
287
  Processing by ExampleController#restricted as HTML
288
288
  Authenticating with gds_sso strategy
289
289
  Completed in 0.2ms
290
- Started GET "/auth/gds" for 127.0.0.1 at 2014-01-31 07:31:10 +0000
291
- Started GET "/auth/gds/callback?code=83f960a4a005ab15c432803710b3601129f3a965a2dddd5f891b8b6c6e7d1fbc&state=1a74af1fd08d87d48b925359c27c60eaa0190c55010fbe3d" for 127.0.0.1 at 2014-01-31 07:31:10 +0000
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
292
  Processing by AuthenticationsController#callback as HTML
293
- Parameters: {"code"=>"83f960a4a005ab15c432803710b3601129f3a965a2dddd5f891b8b6c6e7d1fbc", "state"=>"1a74af1fd08d87d48b925359c27c60eaa0190c55010fbe3d"}
293
+ Parameters: {"code"=>"c0ad710d6760f6b0b0e6a557ca4bf2a123ef9d86e975c9258ef2e053b4bbbb97", "state"=>"4783df9c49c0b93843c2cd1c772d849e4db46b1b9cae6707"}
294
294
  Authenticating with gds_sso strategy
295
295
  User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
296
-  (0.0ms) begin transaction
296
+  (0.1ms) begin transaction
297
297
   (0.2ms) UPDATE "users" SET "permissions" = '---
298
298
  - signin
299
299
  ' WHERE "users"."id" = 11
300
-  (10.1ms) commit transaction
301
-  (0.0ms) begin transaction
300
+  (12.1ms) commit transaction
301
+  (0.1ms) begin transaction
302
302
   (0.1ms) UPDATE "users" SET "permissions" = '---
303
303
  - signin
304
304
  ' WHERE "users"."id" = 11
305
-  (8.7ms) commit transaction
305
+  (10.5ms) commit transaction
306
306
  Redirected to http://www.example-client.com/restricted
307
- Completed 302 Found in 22.8ms (ActiveRecord: 19.3ms)
308
- Started GET "/restricted" for 127.0.0.1 at 2014-01-31 07:31:10 +0000
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
309
309
  Processing by ExampleController#restricted as HTML
310
- User Load (0.1ms) 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.1ms)
312
- Started GET "/restricted" for 127.0.0.1 at 2014-01-30 11:26:10 +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-02-11 14:12:37 +0000
313
313
  Processing by ExampleController#restricted as HTML
314
314
  Authenticating with gds_sso strategy
315
- Completed in 0.2ms
316
- Started GET "/auth/gds" for 127.0.0.1 at 2014-01-30 11:26:10 +0000
317
- Started GET "/auth/gds/callback?code=a189c109c0650bf0f0ef6ffe19f9dc6115efe9c34cf2393c9af2a4d9b3dec0ab&state=e4bf81abac5c130c5138a67bfb5dde669d703052f34e43ed" for 127.0.0.1 at 2014-01-30 11:26:11 +0000
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
318
318
  Processing by AuthenticationsController#callback as HTML
319
- Parameters: {"code"=>"a189c109c0650bf0f0ef6ffe19f9dc6115efe9c34cf2393c9af2a4d9b3dec0ab", "state"=>"e4bf81abac5c130c5138a67bfb5dde669d703052f34e43ed"}
319
+ Parameters: {"code"=>"f70c7f75ee370e3dac1d42a255060ae102928781d2b8ed2788b807f83579952b", "state"=>"6a8d93fb1c82907068719bac9afd5150913bf6dc6f406e94"}
320
320
  Authenticating with gds_sso strategy
321
321
  User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
322
322
   (0.1ms) begin transaction
323
323
   (0.2ms) UPDATE "users" SET "permissions" = '---
324
324
  - signin
325
325
  ' WHERE "users"."id" = 11
326
-  (10.5ms) commit transaction
326
+  (11.2ms) commit transaction
327
327
   (0.0ms) begin transaction
328
328
   (0.1ms) UPDATE "users" SET "permissions" = '---
329
329
  - signin
330
330
  ' WHERE "users"."id" = 11
331
-  (8.5ms) commit transaction
331
+  (8.0ms) commit transaction
332
332
  Redirected to http://www.example-client.com/restricted
333
- Completed 302 Found in 24.5ms (ActiveRecord: 19.6ms)
334
- Started GET "/restricted" for 127.0.0.1 at 2014-01-30 11:26:11 +0000
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
335
  Processing by ExampleController#restricted as HTML
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-31 07:21:11 +0000
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
339
339
  Processing by ExampleController#restricted as HTML
340
340
  User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
341
341
  Completed 200 OK in 0.9ms (Views: 0.2ms | ActiveRecord: 0.1ms)
342
- Started GET "/restricted" for 127.0.0.1 at 2014-01-30 11:26:11 +0000
342
+ Started GET "/restricted" for 127.0.0.1 at 2014-02-11 14:12:37 +0000
343
343
  Processing by ExampleController#restricted as JSON
344
344
  Authenticating with gds_bearer_token strategy
345
- Completed in 7.8ms
346
- Started GET "/restricted" for 127.0.0.1 at 2014-01-30 11:26:11 +0000
347
- Processing by ExampleController#restricted as JSON
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
348
  Authenticating with gds_bearer_token strategy
349
349
  User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
350
-  (0.0ms) begin transaction
350
+  (0.1ms) begin transaction
351
351
   (0.1ms) UPDATE "users" SET "permissions" = '---
352
352
  - signin
353
353
  ' WHERE "users"."id" = 11
354
-  (10.9ms) commit transaction
355
-  (0.1ms) begin transaction
356
-  (0.2ms) UPDATE "users" SET "permissions" = '---
354
+  (10.1ms) commit transaction
355
+  (0.0ms) begin transaction
356
+  (0.1ms) UPDATE "users" SET "permissions" = '---
357
357
  - signin
358
358
  ' WHERE "users"."id" = 11
359
-  (9.8ms) commit transaction
360
- Completed 200 OK in 59.7ms (Views: 0.3ms | ActiveRecord: 21.3ms)
361
- Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-01-30 11:26:11 +0000
362
- Processing by ExampleController#this_requires_signin_permission as JSON
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
363
  Authenticating with gds_bearer_token strategy
364
364
  User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
365
-  (0.0ms) begin transaction
365
+  (0.1ms) begin transaction
366
366
   (0.2ms) UPDATE "users" SET "permissions" = '---
367
367
  - signin
368
368
  ' WHERE "users"."id" = 11
369
-  (10.1ms) commit transaction
370
-  (0.0ms) begin transaction
369
+  (16.1ms) commit transaction
370
+  (0.1ms) begin transaction
371
371
   (0.1ms) UPDATE "users" SET "permissions" = '---
372
372
  - signin
373
373
  ' WHERE "users"."id" = 11
374
-  (10.0ms) commit transaction
375
- Completed 200 OK in 61.3ms (Views: 0.2ms | ActiveRecord: 20.7ms)
374
+  (10.4ms) commit transaction
375
+ Completed 200 OK in 82.9ms (Views: 0.5ms | ActiveRecord: 27.1ms)