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 +1 -8
- data/lib/gds-sso/user.rb +15 -3
- data/lib/gds-sso/version.rb +1 -1
- data/lib/gds-sso/warden_config.rb +3 -2
- data/spec/controller/api_user_controller_spec.rb +22 -24
- data/spec/fixtures/integration/signonotron2.sql +2 -1
- data/spec/internal/db/combustion_test.sqlite +0 -0
- data/spec/internal/log/test.log +206 -206
- data/spec/requests/end_to_end_spec.rb +21 -19
- data/spec/spec_helper.rb +9 -1
- data/spec/support/timecop.rb +7 -0
- data/spec/unit/api_access_spec.rb +27 -0
- data/spec/unit/session_serialisation_spec.rb +62 -0
- data/{test/user_test.rb → spec/unit/user_spec.rb} +5 -5
- metadata +14 -32
- data/spec/requests/authentication_soot2.rb +0 -116
- data/test/api_access_test.rb +0 -27
- data/test/session_serialisation_test.rb +0 -58
- data/test/test_helper.rb +0 -8
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 => [:
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
data/lib/gds-sso/version.rb
CHANGED
@@ -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.
|
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'] =
|
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
|
-
|
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'] =
|
51
|
-
request.env['warden'].
|
52
|
-
request.env['warden'].
|
53
|
-
request.env['warden'].
|
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
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
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'] =
|
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
|
-
|
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'] =
|
84
|
-
request.env['warden'].
|
85
|
-
request.env['warden'].
|
86
|
-
request.env['warden'].
|
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
|
-
|
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'] =
|
96
|
-
request.env['warden'].
|
97
|
-
request.env['warden'].
|
98
|
-
request.env['warden'].
|
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
|
-
|
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`
|
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,"---
|
Binary file
|
data/spec/internal/log/test.log
CHANGED
@@ -1,375 +1,375 @@
|
|
1
1
|
Connecting to database specified by database.yml
|
2
|
-
[1m[36m (1.
|
3
|
-
[1m[35m (17.
|
4
|
-
[1m[36m (
|
5
|
-
[1m[35m (
|
2
|
+
[1m[36m (1.8ms)[0m [1mselect sqlite_version(*)[0m
|
3
|
+
[1m[35m (17.2ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "uid" varchar(255) NOT NULL, "email" varchar(255) NOT NULL, "remotely_signed_out" boolean, "permissions" text, "organisation_slug" varchar(255))
|
4
|
+
[1m[36m (9.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
5
|
+
[1m[35m (13.4ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
6
6
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7
|
-
[1m[35mSQL (3.
|
8
|
-
[1m[36m (
|
7
|
+
[1m[35mSQL (3.5ms)[0m INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3660"]]
|
8
|
+
[1m[36m (15.4ms)[0m [1mcommit transaction[0m
|
9
9
|
[1m[35m (0.1ms)[0m begin transaction
|
10
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "
|
11
|
-
[1m[35m (
|
10
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37434"]]
|
11
|
+
[1m[35m (13.5ms)[0m 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"=>"
|
15
|
-
Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (
|
16
|
-
Completed 403 Forbidden in
|
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
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18
|
-
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "
|
19
|
-
[1m[36m (
|
20
|
-
[1m[35m (0.
|
21
|
-
[1m[36mSQL (0.
|
22
|
-
[1m[35m (
|
18
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32268"]]
|
19
|
+
[1m[36m (5.7ms)[0m [1mcommit transaction[0m
|
20
|
+
[1m[35m (0.0ms)[0m begin transaction
|
21
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39966"]]
|
22
|
+
[1m[35m (8.8ms)[0m commit transaction
|
23
23
|
Processing by Api::UserController#update as HTML
|
24
|
-
Parameters: {"uid"=>"
|
25
|
-
[1m[36mUser Load (0.
|
24
|
+
Parameters: {"uid"=>"a1s2d32268"}
|
25
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d32268' LIMIT 1[0m
|
26
26
|
[1m[35m (0.1ms)[0m begin transaction
|
27
27
|
[1m[36m (0.2ms)[0m [1mUPDATE "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[0m
|
31
|
-
[1m[35m (
|
32
|
-
Completed 200 OK in
|
31
|
+
[1m[35m (8.6ms)[0m commit transaction
|
32
|
+
Completed 200 OK in 16.9ms (ActiveRecord: 9.1ms)
|
33
33
|
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 3]]
|
34
34
|
[1m[35m (0.0ms)[0m begin transaction
|
35
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "
|
36
|
-
[1m[35m (
|
35
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d36178"]]
|
36
|
+
[1m[35m (9.3ms)[0m commit transaction
|
37
37
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
38
|
-
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "
|
39
|
-
[1m[36m (
|
38
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3569"]]
|
39
|
+
[1m[36m (5.6ms)[0m [1mcommit transaction[0m
|
40
40
|
WARNING: Can't mass-assign protected attributes: uid, name, permissions
|
41
41
|
Processing by Api::UserController#reauth as HTML
|
42
|
-
Parameters: {"uid"=>"
|
43
|
-
Completed 403 Forbidden in 1.7ms (Views: 1.
|
42
|
+
Parameters: {"uid"=>"a1s2d36178"}
|
43
|
+
Completed 403 Forbidden in 1.7ms (Views: 1.0ms | ActiveRecord: 0.0ms)
|
44
44
|
[1m[35m (0.1ms)[0m begin transaction
|
45
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "
|
46
|
-
[1m[35m (
|
47
|
-
[1m[36m (0.
|
48
|
-
[1m[35mSQL (0.
|
49
|
-
[1m[36m (
|
45
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35273"]]
|
46
|
+
[1m[35m (7.2ms)[0m commit transaction
|
47
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
48
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34668"]]
|
49
|
+
[1m[36m (7.9ms)[0m [1mcommit transaction[0m
|
50
50
|
Processing by Api::UserController#reauth as HTML
|
51
|
-
Parameters: {"uid"=>"
|
52
|
-
[1m[35mUser Load (0.
|
53
|
-
|
51
|
+
Parameters: {"uid"=>"a1s2d35273"}
|
52
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d35273' LIMIT 1
|
53
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
54
|
+
[1m[35m (0.2ms)[0m UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
|
55
|
+
- signin
|
56
|
+
' WHERE "users"."id" = 7
|
57
|
+
[1m[36m (5.7ms)[0m [1mcommit transaction[0m
|
58
|
+
Completed 200 OK in 9.0ms (ActiveRecord: 6.2ms)
|
59
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 7]]
|
54
60
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
55
|
-
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "
|
56
|
-
[1m[36m (
|
57
|
-
[1m[35m (0.
|
58
|
-
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "
|
59
|
-
[1m[35m (
|
61
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37522"]]
|
62
|
+
[1m[36m (7.9ms)[0m [1mcommit transaction[0m
|
63
|
+
[1m[35m (0.1ms)[0m begin transaction
|
64
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?)[0m [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3700"]]
|
65
|
+
[1m[35m (7.4ms)[0m commit transaction
|
60
66
|
Processing by Api::UserController#reauth as HTML
|
61
|
-
Parameters: {"uid"=>"
|
62
|
-
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = '
|
63
|
-
|
64
|
-
|
65
|
-
- signin
|
66
|
-
' WHERE "users"."id" = 9[0m
|
67
|
-
[1m[35m (10.2ms)[0m commit transaction
|
68
|
-
Completed 200 OK in 13.0ms (ActiveRecord: 10.6ms)
|
69
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 9]]
|
70
|
-
Started GET "/" for 127.0.0.1 at 2014-01-30 11:26:06 +0000
|
67
|
+
Parameters: {"uid"=>"nonexistent-user"}
|
68
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1[0m
|
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
|
73
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
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
|
77
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-
|
78
|
-
Started GET "/auth/gds/callback?code=
|
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"=>"
|
80
|
+
Parameters: {"code"=>"e6fc10270e675cd0e71f7b28931b538da1bdc20d5cde1c828ef7d097fced02aa", "state"=>"78623b0d617fc3d2eb1736195791e5435fcb43fbf249bf56"}
|
81
81
|
Authenticating with gds_sso strategy
|
82
|
-
[1m[35mUser Load (0.
|
82
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
83
83
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
84
|
-
[1m[35mSQL (0.
|
85
|
-
[1m[36m (
|
86
|
-
[1m[35m (0.
|
84
|
+
[1m[35mSQL (0.3ms)[0m 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
|
+
[1m[36m (7.3ms)[0m [1mcommit transaction[0m
|
86
|
+
[1m[35m (0.1ms)[0m begin transaction
|
87
87
|
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
|
88
88
|
- signin
|
89
89
|
' WHERE "users"."id" = 11[0m
|
90
|
-
[1m[35m (
|
90
|
+
[1m[35m (7.1ms)[0m commit transaction
|
91
91
|
Redirected to http://www.example-client.com/restricted
|
92
|
-
Completed 302 Found in
|
93
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
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
|
-
[1m[36mUser Load (0.
|
96
|
-
Completed 200 OK in
|
97
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
95
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
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-
|
102
|
-
Started GET "/auth/gds/callback?code=
|
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"=>"
|
104
|
+
Parameters: {"code"=>"99a32bede75e4ad5f4d9d91ba9dbf42603907dea464be720c39ca8f1db0b90cc", "state"=>"13e6a62c4a47b4f7ba5472161eaf1e7000c05963f6a1291a"}
|
105
105
|
Authenticating with gds_sso strategy
|
106
|
-
[1m[35mUser Load (0.
|
107
|
-
[1m[36m (0.
|
108
|
-
[1m[35m (0.
|
106
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
107
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
108
|
+
[1m[35m (0.2ms)[0m UPDATE "users" SET "permissions" = '---
|
109
109
|
- signin
|
110
110
|
' WHERE "users"."id" = 11
|
111
|
-
[1m[36m (
|
112
|
-
[1m[35m (0.
|
113
|
-
[1m[36m (0.
|
111
|
+
[1m[36m (14.1ms)[0m [1mcommit transaction[0m
|
112
|
+
[1m[35m (0.1ms)[0m begin transaction
|
113
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
114
114
|
- signin
|
115
115
|
' WHERE "users"."id" = 11[0m
|
116
|
-
[1m[35m (
|
116
|
+
[1m[35m (12.5ms)[0m commit transaction
|
117
117
|
Redirected to http://www.example-client.com/restricted
|
118
|
-
Completed 302 Found in
|
119
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
120
|
-
Processing by ExampleController#restricted as HTML
|
121
|
-
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
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
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
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.
|
127
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-
|
128
|
-
Started GET "/auth/gds/callback?code=
|
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"=>"
|
130
|
+
Parameters: {"code"=>"c734589a77321d80b595cd458f2a97984bc60a31423e649f53a8066d6adbaa6f", "state"=>"4ed2bc23f0aa2c35292b24cf085d2f8d2bd0633d7ffc9768"}
|
131
131
|
Authenticating with gds_sso strategy
|
132
|
-
[1m[35mUser Load (0.
|
132
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
133
133
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
134
134
|
[1m[35m (0.2ms)[0m UPDATE "users" SET "permissions" = '---
|
135
135
|
- signin
|
136
136
|
' WHERE "users"."id" = 11
|
137
|
-
[1m[36m (
|
138
|
-
[1m[35m (0.
|
139
|
-
[1m[36m (0.
|
137
|
+
[1m[36m (24.3ms)[0m [1mcommit transaction[0m
|
138
|
+
[1m[35m (0.0ms)[0m begin transaction
|
139
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
140
140
|
- signin
|
141
141
|
' WHERE "users"."id" = 11[0m
|
142
|
-
[1m[35m (
|
143
|
-
Redirected to http://www.example-client.com/
|
144
|
-
Completed 302 Found in
|
145
|
-
Started GET "/
|
146
|
-
Processing by ExampleController#
|
147
|
-
[1m[36mUser Load (0.
|
148
|
-
Completed 200 OK in 1.
|
149
|
-
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-
|
142
|
+
[1m[35m (11.0ms)[0m 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
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
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.
|
153
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-
|
154
|
-
Started GET "/auth/gds/callback?code=
|
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"=>"
|
156
|
+
Parameters: {"code"=>"d4c19782a4d297262a15c4b248148ce88a5712cc9ebeb139eecf9457fd11eec6", "state"=>"4f13783c8f5b8095df92fbcb7f4f4f38e8a3c7f7bc6d0177"}
|
157
157
|
Authenticating with gds_sso strategy
|
158
158
|
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
159
|
-
[1m[36m (0.
|
159
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
160
160
|
[1m[35m (0.2ms)[0m UPDATE "users" SET "permissions" = '---
|
161
161
|
- signin
|
162
162
|
' WHERE "users"."id" = 11
|
163
|
-
[1m[36m (
|
164
|
-
[1m[35m (0.
|
165
|
-
[1m[36m (0.
|
163
|
+
[1m[36m (10.1ms)[0m [1mcommit transaction[0m
|
164
|
+
[1m[35m (0.0ms)[0m begin transaction
|
165
|
+
[1m[36m (0.3ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
166
166
|
- signin
|
167
167
|
' WHERE "users"."id" = 11[0m
|
168
|
-
[1m[35m (7.
|
168
|
+
[1m[35m (7.4ms)[0m commit transaction
|
169
169
|
Redirected to http://www.example-client.com/this_requires_signin_permission
|
170
|
-
Completed 302 Found in 22.
|
171
|
-
Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2014-
|
172
|
-
Processing by ExampleController#this_requires_signin_permission as HTML
|
173
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
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
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
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.
|
179
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-
|
180
|
-
Started GET "/auth/gds/callback?code=
|
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"=>"
|
182
|
+
Parameters: {"code"=>"8af724f9c09ee4e089368f8cddc85616c0447adee552b3002faaddb54166c157", "state"=>"787ba78ded34fb3ad2a92f986844823633e1319d70e7fad5"}
|
183
183
|
Authenticating with gds_sso strategy
|
184
184
|
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
185
|
-
[1m[36m (0.
|
185
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
186
186
|
[1m[35m (0.2ms)[0m UPDATE "users" SET "permissions" = '---
|
187
187
|
- signin
|
188
188
|
' WHERE "users"."id" = 11
|
189
|
-
[1m[36m (
|
189
|
+
[1m[36m (33.2ms)[0m [1mcommit transaction[0m
|
190
190
|
[1m[35m (0.1ms)[0m begin transaction
|
191
191
|
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
192
192
|
- signin
|
193
193
|
' WHERE "users"."id" = 11[0m
|
194
|
-
[1m[35m (
|
195
|
-
Redirected to http://www.example-client.com/
|
196
|
-
Completed 302 Found in
|
197
|
-
Started GET "/
|
198
|
-
Processing by ExampleController#
|
194
|
+
[1m[35m (10.3ms)[0m 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
|
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
200
|
-
Completed 200 OK in 1.4ms (Views: 0.
|
201
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
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.
|
205
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-
|
206
|
-
Started GET "/auth/gds/callback?code=
|
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"=>"
|
208
|
+
Parameters: {"code"=>"53319f3b8cac2a91c4627efec0f88a262661a3c2826fa1a035e4e2b212a14a71", "state"=>"1d152479a45612e77cb0e0bbf53731283148c72571fa2a19"}
|
209
209
|
Authenticating with gds_sso strategy
|
210
210
|
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
211
211
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
212
|
-
[1m[35m (0.
|
212
|
+
[1m[35m (0.2ms)[0m UPDATE "users" SET "permissions" = '---
|
213
213
|
- signin
|
214
214
|
' WHERE "users"."id" = 11
|
215
|
-
[1m[36m (
|
216
|
-
[1m[35m (0.
|
215
|
+
[1m[36m (10.8ms)[0m [1mcommit transaction[0m
|
216
|
+
[1m[35m (0.1ms)[0m begin transaction
|
217
217
|
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
218
218
|
- signin
|
219
219
|
' WHERE "users"."id" = 11[0m
|
220
|
-
[1m[35m (
|
220
|
+
[1m[35m (8.6ms)[0m commit transaction
|
221
221
|
Redirected to http://www.example-client.com/restricted
|
222
|
-
Completed 302 Found in
|
223
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
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
|
-
[1m[36mUser Load (0.
|
226
|
-
Completed 200 OK in 1.
|
225
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
226
|
+
Completed 200 OK in 1.9ms (Views: 0.6ms | ActiveRecord: 0.2ms)
|
227
227
|
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'test@example-client.com' LIMIT 1
|
228
228
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
229
|
-
[1m[35m (0.
|
229
|
+
[1m[35m (0.1ms)[0m UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
|
230
230
|
- signin
|
231
231
|
' WHERE "users"."id" = 11
|
232
|
-
[1m[36m (8.
|
233
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
232
|
+
[1m[36m (8.2ms)[0m [1mcommit transaction[0m
|
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
|
-
[1m[35mUser Load (0.
|
235
|
+
[1m[35mUser Load (0.2ms)[0m 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.
|
238
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-
|
239
|
-
Started GET "/auth/gds/callback?code=
|
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"=>"
|
241
|
+
Parameters: {"code"=>"e6c8fb7975becaaf4bee4ddb6c343a4b0638c257cb75d855c4f5dee6a40e6dec", "state"=>"4001702096ace0ac8c73d1fd70effb07e8a58c27cbcba283"}
|
242
242
|
Authenticating with gds_sso strategy
|
243
|
-
[1m[36mUser Load (0.
|
244
|
-
[1m[35m (0.
|
245
|
-
[1m[36m (0.
|
243
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
244
|
+
[1m[35m (0.0ms)[0m begin transaction
|
245
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
246
246
|
- signin
|
247
247
|
' WHERE "users"."id" = 11[0m
|
248
|
-
[1m[35m (
|
249
|
-
[1m[36m (0.
|
248
|
+
[1m[35m (10.2ms)[0m commit transaction
|
249
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
250
250
|
[1m[35m (0.1ms)[0m UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
|
251
251
|
- signin
|
252
252
|
' WHERE "users"."id" = 11
|
253
|
-
[1m[36m (7.
|
253
|
+
[1m[36m (7.0ms)[0m [1mcommit transaction[0m
|
254
254
|
Redirected to http://www.example-client.com/restricted
|
255
|
-
Completed 302 Found in
|
256
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
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
|
[1m[35mUser Load (0.1ms)[0m 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-
|
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.
|
264
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-
|
265
|
-
Started GET "/auth/gds/callback?code=
|
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"=>"
|
267
|
+
Parameters: {"code"=>"70f64f5b290b2dda1cff56465904b804edea5d86dc786eb9b05841e357ff8872", "state"=>"1c23b33a5d02264e30b539351ee6e2ebba854c71bd91c566"}
|
268
268
|
Authenticating with gds_sso strategy
|
269
269
|
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
270
270
|
[1m[35m (0.1ms)[0m begin transaction
|
271
|
-
[1m[36m (0.
|
271
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
272
272
|
- signin
|
273
273
|
' WHERE "users"."id" = 11[0m
|
274
|
-
[1m[35m (
|
275
|
-
[1m[36m (0.
|
274
|
+
[1m[35m (11.9ms)[0m commit transaction
|
275
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
276
276
|
[1m[35m (0.1ms)[0m UPDATE "users" SET "permissions" = '---
|
277
277
|
- signin
|
278
278
|
' WHERE "users"."id" = 11
|
279
|
-
[1m[36m (
|
279
|
+
[1m[36m (13.0ms)[0m [1mcommit transaction[0m
|
280
280
|
Redirected to http://www.example-client.com/restricted
|
281
|
-
Completed 302 Found in
|
282
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
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
|
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1
|
285
|
-
Completed 200 OK in 1.
|
286
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
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-
|
291
|
-
Started GET "/auth/gds/callback?code=
|
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"=>"
|
293
|
+
Parameters: {"code"=>"c0ad710d6760f6b0b0e6a557ca4bf2a123ef9d86e975c9258ef2e053b4bbbb97", "state"=>"4783df9c49c0b93843c2cd1c772d849e4db46b1b9cae6707"}
|
294
294
|
Authenticating with gds_sso strategy
|
295
295
|
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
296
|
-
[1m[35m (0.
|
296
|
+
[1m[35m (0.1ms)[0m begin transaction
|
297
297
|
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
298
298
|
- signin
|
299
299
|
' WHERE "users"."id" = 11[0m
|
300
|
-
[1m[35m (
|
301
|
-
[1m[36m (0.
|
300
|
+
[1m[35m (12.1ms)[0m commit transaction
|
301
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
302
302
|
[1m[35m (0.1ms)[0m UPDATE "users" SET "permissions" = '---
|
303
303
|
- signin
|
304
304
|
' WHERE "users"."id" = 11
|
305
|
-
[1m[36m (
|
305
|
+
[1m[36m (10.5ms)[0m [1mcommit transaction[0m
|
306
306
|
Redirected to http://www.example-client.com/restricted
|
307
|
-
Completed 302 Found in
|
308
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
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
|
-
[1m[35mUser Load (0.
|
311
|
-
Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.
|
312
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
310
|
+
[1m[35mUser Load (0.2ms)[0m 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.
|
316
|
-
Started GET "/auth/gds" for 127.0.0.1 at 2014-
|
317
|
-
Started GET "/auth/gds/callback?code=
|
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"=>"
|
319
|
+
Parameters: {"code"=>"f70c7f75ee370e3dac1d42a255060ae102928781d2b8ed2788b807f83579952b", "state"=>"6a8d93fb1c82907068719bac9afd5150913bf6dc6f406e94"}
|
320
320
|
Authenticating with gds_sso strategy
|
321
321
|
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
322
322
|
[1m[35m (0.1ms)[0m begin transaction
|
323
323
|
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
324
324
|
- signin
|
325
325
|
' WHERE "users"."id" = 11[0m
|
326
|
-
[1m[35m (
|
326
|
+
[1m[35m (11.2ms)[0m commit transaction
|
327
327
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
328
328
|
[1m[35m (0.1ms)[0m UPDATE "users" SET "permissions" = '---
|
329
329
|
- signin
|
330
330
|
' WHERE "users"."id" = 11
|
331
|
-
[1m[36m (8.
|
331
|
+
[1m[36m (8.0ms)[0m [1mcommit transaction[0m
|
332
332
|
Redirected to http://www.example-client.com/restricted
|
333
|
-
Completed 302 Found in 24.
|
334
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
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
|
-
[1m[35mUser Load (0.
|
337
|
-
Completed 200 OK in 1.
|
338
|
-
Started GET "/restricted" for 127.0.0.1 at 2014-
|
336
|
+
[1m[35mUser Load (0.1ms)[0m 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
|
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' AND "users"."remotely_signed_out" = 'f' LIMIT 1[0m
|
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-
|
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
|
346
|
-
Started GET "/
|
347
|
-
Processing by ExampleController#
|
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
|
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
|
350
|
-
[1m[36m (0.
|
350
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
351
351
|
[1m[35m (0.1ms)[0m UPDATE "users" SET "permissions" = '---
|
352
352
|
- signin
|
353
353
|
' WHERE "users"."id" = 11
|
354
|
-
[1m[36m (10.
|
355
|
-
[1m[35m (0.
|
356
|
-
[1m[36m (0.
|
354
|
+
[1m[36m (10.1ms)[0m [1mcommit transaction[0m
|
355
|
+
[1m[35m (0.0ms)[0m begin transaction
|
356
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
357
357
|
- signin
|
358
358
|
' WHERE "users"."id" = 11[0m
|
359
|
-
[1m[35m (
|
360
|
-
Completed 200 OK in
|
361
|
-
Started GET "/
|
362
|
-
Processing by ExampleController#
|
359
|
+
[1m[35m (10.6ms)[0m 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
|
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1[0m
|
365
|
-
[1m[35m (0.
|
365
|
+
[1m[35m (0.1ms)[0m begin transaction
|
366
366
|
[1m[36m (0.2ms)[0m [1mUPDATE "users" SET "permissions" = '---
|
367
367
|
- signin
|
368
368
|
' WHERE "users"."id" = 11[0m
|
369
|
-
[1m[35m (
|
370
|
-
[1m[36m (0.
|
369
|
+
[1m[35m (16.1ms)[0m commit transaction
|
370
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
371
371
|
[1m[35m (0.1ms)[0m UPDATE "users" SET "permissions" = '---
|
372
372
|
- signin
|
373
373
|
' WHERE "users"."id" = 11
|
374
|
-
[1m[36m (10.
|
375
|
-
Completed 200 OK in
|
374
|
+
[1m[36m (10.4ms)[0m [1mcommit transaction[0m
|
375
|
+
Completed 200 OK in 82.9ms (Views: 0.5ms | ActiveRecord: 27.1ms)
|