gds-sso 3.1.1 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -30,10 +30,6 @@ Create a `config/initializers/gds-sso.rb` that looks like:
30
30
 
31
31
  # optional config for location of signonotron2
32
32
  config.oauth_root_url = "http://localhost:3001"
33
-
34
- # optional config for API Access (requests which accept application/json)
35
- config.basic_auth_user = 'api'
36
- config.basic_auth_password = 'secret'
37
33
  end
38
34
 
39
35
  The user model must include the GDS::SSO::User module.
@@ -42,11 +38,16 @@ It should have the following fields:
42
38
  string "name"
43
39
  string "email"
44
40
  string "uid"
45
- text "permissions"
41
+ array "permissions"
46
42
  boolean "remotely_signed_out", :default => false
47
43
 
48
44
  You also need to include `GDS::SSO::ControllerMethods` in your ApplicationController
49
45
 
46
+ For ActiveRecord, you probably want to declare permissions as "serialized" like this:
47
+
48
+ serialize :permissions, Array
49
+
50
+
50
51
  ## Use in development mode
51
52
 
52
53
  In development, you generally want to be able to run an application without needing to run your own SSO server to be running as well. GDS-SSO facilitates this by using a 'mock' mode in development. Mock mode loads an arbitrary user from the local application's user tables:
data/lib/gds-sso.rb CHANGED
@@ -38,7 +38,7 @@ module GDS
38
38
  end
39
39
 
40
40
  def self.default_strategies
41
- use_mock_strategies? ? [:mock_gds_sso, :mock_gds_sso_api_access] : [:gds_sso, :gds_bearer_token, :gds_sso_api_access]
41
+ use_mock_strategies? ? [:mock_gds_sso, :mock_gds_sso_api_access] : [:gds_sso, :gds_bearer_token]
42
42
  end
43
43
 
44
44
  config.app_middleware.use Warden::Manager do |config|
@@ -15,13 +15,6 @@ module GDS
15
15
  mattr_accessor :oauth_root_url
16
16
  @@oauth_root_url = "http://localhost:3001"
17
17
 
18
- # Basic Auth Credentials (for api access when request accept
19
- # header is application/json)
20
- mattr_accessor :basic_auth_user
21
- mattr_accessor :basic_auth_password
22
- mattr_accessor :basic_auth_realm
23
- @@basic_auth_realm = "API Access"
24
-
25
18
  mattr_accessor :auth_valid_for
26
19
  @@auth_valid_for = 20 * 3600
27
20
 
@@ -9,7 +9,6 @@ module GDS
9
9
  include ActionController::RackDelegation
10
10
  include ActionController::UrlFor
11
11
  include ActionController::Redirecting
12
- include ActionController::HttpAuthentication::Basic::ControllerMethods
13
12
  include Rails.application.routes.url_helpers
14
13
 
15
14
  def self.call(env)
data/lib/gds-sso/user.rb CHANGED
@@ -2,30 +2,6 @@ require 'active_support/concern'
2
2
 
3
3
  module GDS
4
4
  module SSO
5
- class ApiUser
6
- def uid
7
- 0
8
- end
9
-
10
- def name
11
- 'API User'
12
- end
13
-
14
- def has_permission?(permission)
15
- true
16
- end
17
-
18
- def clear_remotely_signed_out!
19
- end
20
-
21
- def set_remotely_signed_out!
22
- end
23
-
24
- def remotely_signed_out?
25
- false
26
- end
27
- end
28
-
29
5
  module User
30
6
  def included(base)
31
7
  attr_accessible :uid, :email, :name, :permissions, as: :oauth
@@ -1,5 +1,5 @@
1
1
  module GDS
2
2
  module SSO
3
- VERSION = "3.1.1"
3
+ VERSION = "4.0.0"
4
4
  end
5
5
  end
@@ -127,51 +127,7 @@ Warden::Strategies.add(:gds_bearer_token) do
127
127
  {
128
128
  'Content-Type' => 'text/plain',
129
129
  'Content-Length' => '0',
130
- 'WWW-Authenticate' => %(Bearer realm="#{GDS::SSO::Config.basic_auth_realm}", error="invalid_token")
131
- },
132
- []
133
- ]
134
- end
135
- end
136
-
137
- Warden::Strategies.add(:gds_sso_api_access) do
138
- def api_user
139
- @api_user ||= GDS::SSO::ApiUser.new
140
- end
141
-
142
- def valid?
143
- ::GDS::SSO::ApiAccess.api_call?(env)
144
- end
145
-
146
- def authenticate!
147
- logger.debug("Authenticating with gds_sso_api_access strategy")
148
-
149
- auth = Rack::Auth::Basic::Request.new(env)
150
-
151
- return custom!(unauthorized) unless auth.provided?
152
- return fail!(:bad_request) unless auth.basic?
153
-
154
- if valid_api_user?(*auth.credentials)
155
- success!(api_user)
156
- else
157
- custom!(unauthorized)
158
- end
159
- end
160
-
161
- def valid_api_user?(username, password)
162
- username.to_s.strip != '' &&
163
- password.to_s.strip != '' &&
164
- username == ::GDS::SSO::Config.basic_auth_user &&
165
- password == ::GDS::SSO::Config.basic_auth_password
166
- end
167
-
168
- def unauthorized
169
- [
170
- 401,
171
- {
172
- 'Content-Type' => 'text/plain',
173
- 'Content-Length' => '0',
174
- 'WWW-Authenticate' => %(Basic realm="#{GDS::SSO::Config.basic_auth_realm}")
130
+ 'WWW-Authenticate' => %(Bearer error="invalid_token")
175
131
  },
176
132
  []
177
133
  ]
@@ -212,6 +168,14 @@ Warden::Strategies.add(:mock_gds_sso_api_access) do
212
168
 
213
169
  def authenticate!
214
170
  logger.debug("Authenticating with mock_gds_sso_api_access strategy")
215
- success!(GDS::SSO::ApiUser.new)
171
+ dummy_api_user = GDS::SSO::Config.user_klass.find_by_email("dummyapiuser@domain.com")
172
+ if dummy_api_user.nil?
173
+ dummy_api_user = GDS::SSO::Config.user_klass.create!(
174
+ uid: "#{rand(10000)}",
175
+ name: "Dummy API user created by gds-sso",
176
+ permissions: ["signin"],
177
+ as: :oauth)
178
+ end
179
+ success!(dummy_api_user)
216
180
  end
217
181
  end
@@ -20,6 +20,13 @@ describe Api::UserController, type: :controller do
20
20
  :name => "Moshua Jarshall",
21
21
  :permissions => ["signin"] },
22
22
  as: :oauth)
23
+
24
+ @signon_sso_push_user = User.create!({
25
+ :uid => "a1s2d3#{rand(10000)}",
26
+ :email => "ssopushuser@legit.com",
27
+ :name => "SSO Push user",
28
+ :permissions => ["signin", "user_update_permission"] },
29
+ as: :oauth)
23
30
  end
24
31
 
25
32
  describe "PUT update" do
@@ -42,7 +49,7 @@ describe Api::UserController, type: :controller do
42
49
  request.env['warden'] = mock("mock warden")
43
50
  request.env['warden'].expects(:authenticate!).at_least_once.returns(true)
44
51
  request.env['warden'].expects(:authenticated?).at_least_once.returns(true)
45
- request.env['warden'].expects(:user).at_least_once.returns(GDS::SSO::ApiUser.new)
52
+ request.env['warden'].expects(:user).at_least_once.returns(@signon_sso_push_user)
46
53
 
47
54
  request.env['RAW_POST_DATA'] = user_update_json
48
55
  put :update, uid: @user_to_update.uid
@@ -73,7 +80,7 @@ describe Api::UserController, type: :controller do
73
80
  request.env['warden'] = mock("mock warden")
74
81
  request.env['warden'].expects(:authenticate!).at_least_once.returns(true)
75
82
  request.env['warden'].expects(:authenticated?).at_least_once.returns(true)
76
- request.env['warden'].expects(:user).at_least_once.returns(GDS::SSO::ApiUser.new)
83
+ request.env['warden'].expects(:user).at_least_once.returns(@signon_sso_push_user)
77
84
 
78
85
  post :reauth, uid: "nonexistent-user"
79
86
 
@@ -85,7 +92,7 @@ describe Api::UserController, type: :controller do
85
92
  request.env['warden'] = mock("mock warden")
86
93
  request.env['warden'].expects(:authenticate!).at_least_once.returns(true)
87
94
  request.env['warden'].expects(:authenticated?).at_least_once.returns(true)
88
- request.env['warden'].expects(:user).at_least_once.returns(GDS::SSO::ApiUser.new)
95
+ request.env['warden'].expects(:user).at_least_once.returns(@signon_sso_push_user)
89
96
 
90
97
  post :reauth, uid: @user_to_update.uid
91
98
 
@@ -3,6 +3,4 @@ GDS::SSO.config do |config|
3
3
  config.oauth_id = 'gds-sso-test'
4
4
  config.oauth_secret = 'secret'
5
5
  config.oauth_root_url = "http://localhost:4567"
6
- config.basic_auth_user = 'test_api_user'
7
- config.basic_auth_password = 'api_user_password'
8
6
  end
@@ -3842,3 +3842,1146 @@ Authenticating with gds_bearer_token strategy
3842
3842
  ' WHERE "users"."id" = 6
3843
3843
   (2.7ms) commit transaction
3844
3844
  Completed 200 OK in 76.1ms (Views: 0.3ms | ActiveRecord: 7.6ms)
3845
+ Connecting to database specified by database.yml
3846
+  (0.9ms) select sqlite_version(*)
3847
+  (6.4ms) DROP TABLE "users"
3848
+  (2.4ms) 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) 
3849
+  (0.1ms) begin transaction
3850
+ SQL (2.4ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38120"]]
3851
+  (3.3ms) commit transaction
3852
+ WARNING: Can't mass-assign protected attributes: uid, name, permissions
3853
+ Processing by Api::UserController#update as HTML
3854
+ Parameters: {"uid"=>"a1s2d38120"}
3855
+ Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.9ms)
3856
+ Completed 403 Forbidden in 7.7ms (Views: 6.9ms | ActiveRecord: 0.0ms)
3857
+  (0.1ms) begin transaction
3858
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37442"]]
3859
+  (3.7ms) commit transaction
3860
+ Processing by Api::UserController#update as HTML
3861
+ Parameters: {"uid"=>"a1s2d37442"}
3862
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d37442' LIMIT 1
3863
+  (0.1ms) begin transaction
3864
+  (0.3ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '---
3865
+ - signin
3866
+ - new permission
3867
+ ' WHERE "users"."id" = 2
3868
+  (3.6ms) commit transaction
3869
+ Completed 200 OK in 41.5ms (ActiveRecord: 4.2ms)
3870
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 2]]
3871
+  (0.1ms) begin transaction
3872
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35316"]]
3873
+  (3.7ms) commit transaction
3874
+ WARNING: Can't mass-assign protected attributes: uid, name, permissions
3875
+ Processing by Api::UserController#reauth as HTML
3876
+ Parameters: {"uid"=>"a1s2d35316"}
3877
+ Completed 403 Forbidden in 1.9ms (Views: 1.1ms | ActiveRecord: 0.0ms)
3878
+  (0.1ms) begin transaction
3879
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32129"]]
3880
+  (3.6ms) commit transaction
3881
+ Processing by Api::UserController#reauth as HTML
3882
+ Parameters: {"uid"=>"nonexistent-user"}
3883
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1
3884
+ Completed 200 OK in 1.1ms (ActiveRecord: 0.2ms)
3885
+  (0.1ms) begin transaction
3886
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32312"]]
3887
+  (3.4ms) commit transaction
3888
+ Processing by Api::UserController#reauth as HTML
3889
+ Parameters: {"uid"=>"a1s2d32312"}
3890
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d32312' LIMIT 1
3891
+  (0.0ms) begin transaction
3892
+  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
3893
+ - signin
3894
+ ' WHERE "users"."id" = 5
3895
+  (3.1ms) commit transaction
3896
+ Completed 200 OK in 7.7ms (ActiveRecord: 3.5ms)
3897
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 5]]
3898
+ Started GET "/" for 127.0.0.1 at 2013-10-30 14:58:39 +0000
3899
+ Processing by ExampleController#index as HTML
3900
+ Completed 200 OK in 2.4ms (Views: 1.9ms | ActiveRecord: 0.0ms)
3901
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:39 +0000
3902
+ Processing by ExampleController#restricted as HTML
3903
+ Authenticating with gds_sso strategy
3904
+ Completed in 3.1ms
3905
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:39 +0000
3906
+ Started GET "/auth/gds/callback?code=21546b2d9ad4eac9af531e441d189e32374b72b07fa4595ccdc90e26f06bf5bc&state=4e2c3a74c3e20574e39358e44bb801e5fa2d82b0812546c6" for 127.0.0.1 at 2013-10-30 14:58:40 +0000
3907
+ Processing by AuthenticationsController#callback as HTML
3908
+ Parameters: {"code"=>"21546b2d9ad4eac9af531e441d189e32374b72b07fa4595ccdc90e26f06bf5bc", "state"=>"4e2c3a74c3e20574e39358e44bb801e5fa2d82b0812546c6"}
3909
+ Authenticating with gds_sso strategy
3910
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
3911
+  (0.1ms) begin transaction
3912
+ SQL (0.3ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]
3913
+  (4.9ms) commit transaction
3914
+  (0.0ms) begin transaction
3915
+  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
3916
+ - signin
3917
+ ' WHERE "users"."id" = 6
3918
+  (3.1ms) commit transaction
3919
+ Redirected to http://www.example-client.com/restricted
3920
+ Completed 302 Found in 16.5ms (ActiveRecord: 8.8ms)
3921
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:41 +0000
3922
+ Processing by ExampleController#restricted as HTML
3923
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
3924
+ Completed 200 OK in 1.4ms (Views: 0.5ms | ActiveRecord: 0.1ms)
3925
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:41 +0000
3926
+ Processing by ExampleController#restricted as HTML
3927
+ Authenticating with gds_sso strategy
3928
+ Completed in 0.3ms
3929
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:41 +0000
3930
+ Started GET "/auth/gds/callback?code=b502c94aa9f9e6a5c22c8232bbdb33e45ffa417003478602d9431a701021e7f5&state=d4d6b16cf6ec8214fa1472c1e08f51e085490bcd4d767886" for 127.0.0.1 at 2013-10-30 14:58:41 +0000
3931
+ Processing by AuthenticationsController#callback as HTML
3932
+ Parameters: {"code"=>"b502c94aa9f9e6a5c22c8232bbdb33e45ffa417003478602d9431a701021e7f5", "state"=>"d4d6b16cf6ec8214fa1472c1e08f51e085490bcd4d767886"}
3933
+ Authenticating with gds_sso strategy
3934
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
3935
+  (0.1ms) begin transaction
3936
+  (0.2ms) UPDATE "users" SET "permissions" = '---
3937
+ - signin
3938
+ ' WHERE "users"."id" = 6
3939
+  (3.4ms) commit transaction
3940
+  (0.0ms) begin transaction
3941
+  (0.2ms) UPDATE "users" SET "permissions" = '---
3942
+ - signin
3943
+ ' WHERE "users"."id" = 6
3944
+  (2.6ms) commit transaction
3945
+ Redirected to http://www.example-client.com/restricted
3946
+ Completed 302 Found in 15.9ms (ActiveRecord: 6.6ms)
3947
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:41 +0000
3948
+ Processing by ExampleController#restricted as HTML
3949
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
3950
+ Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms)
3951
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:41 +0000
3952
+ Processing by ExampleController#restricted as HTML
3953
+ Authenticating with gds_sso strategy
3954
+ Completed in 0.2ms
3955
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:41 +0000
3956
+ Started GET "/auth/gds/callback?code=cb181f89b3f5f0a5cf01ed58b0fa6d9a19d6103681566112ff2e9b5c291fb435&state=463eea390a459f0b3bc6c396f3440194a74f09fe360d7942" for 127.0.0.1 at 2013-10-30 14:58:41 +0000
3957
+ Processing by AuthenticationsController#callback as HTML
3958
+ Parameters: {"code"=>"cb181f89b3f5f0a5cf01ed58b0fa6d9a19d6103681566112ff2e9b5c291fb435", "state"=>"463eea390a459f0b3bc6c396f3440194a74f09fe360d7942"}
3959
+ Authenticating with gds_sso strategy
3960
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
3961
+  (0.1ms) begin transaction
3962
+  (0.2ms) UPDATE "users" SET "permissions" = '---
3963
+ - signin
3964
+ ' WHERE "users"."id" = 6
3965
+  (4.6ms) commit transaction
3966
+  (0.0ms) begin transaction
3967
+  (0.1ms) UPDATE "users" SET "permissions" = '---
3968
+ - signin
3969
+ ' WHERE "users"."id" = 6
3970
+  (3.9ms) commit transaction
3971
+ Redirected to http://www.example-client.com/restricted
3972
+ Completed 302 Found in 17.0ms (ActiveRecord: 9.0ms)
3973
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:41 +0000
3974
+ Processing by ExampleController#restricted as HTML
3975
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
3976
+ Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms)
3977
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 14:58:41 +0000
3978
+ Processing by ExampleController#this_requires_signin_permission as HTML
3979
+ Authenticating with gds_sso strategy
3980
+ Completed in 0.9ms
3981
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:41 +0000
3982
+ Started GET "/auth/gds/callback?code=0abbf3732068ec26d861f589015b48d9a47a052307122a8333cae758fcf50df8&state=5a63670716405b23224915160b440ace463901bfae234e3b" for 127.0.0.1 at 2013-10-30 14:58:42 +0000
3983
+ Processing by AuthenticationsController#callback as HTML
3984
+ Parameters: {"code"=>"0abbf3732068ec26d861f589015b48d9a47a052307122a8333cae758fcf50df8", "state"=>"5a63670716405b23224915160b440ace463901bfae234e3b"}
3985
+ Authenticating with gds_sso strategy
3986
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
3987
+  (0.1ms) begin transaction
3988
+  (0.2ms) UPDATE "users" SET "permissions" = '---
3989
+ - signin
3990
+ ' WHERE "users"."id" = 6
3991
+  (4.4ms) commit transaction
3992
+  (0.0ms) begin transaction
3993
+  (0.1ms) UPDATE "users" SET "permissions" = '---
3994
+ - signin
3995
+ ' WHERE "users"."id" = 6
3996
+  (11.7ms) commit transaction
3997
+ Redirected to http://www.example-client.com/this_requires_signin_permission
3998
+ Completed 302 Found in 26.0ms (ActiveRecord: 16.8ms)
3999
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 14:58:42 +0000
4000
+ Processing by ExampleController#this_requires_signin_permission as HTML
4001
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4002
+ Completed 200 OK in 3.3ms (Views: 0.5ms | ActiveRecord: 0.1ms)
4003
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 14:58:42 +0000
4004
+ Processing by ExampleController#this_requires_signin_permission as HTML
4005
+ Authenticating with gds_sso strategy
4006
+ Completed in 0.2ms
4007
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:42 +0000
4008
+ Started GET "/auth/gds/callback?code=4393d4eb5d4056deb04e22601d9d750f197ff2f67dadafd2e1e28a6cf811ff85&state=b8cab794093fd92b46e8d39c63dffffdc523af2f770860a2" for 127.0.0.1 at 2013-10-30 14:58:42 +0000
4009
+ Processing by AuthenticationsController#callback as HTML
4010
+ Parameters: {"code"=>"4393d4eb5d4056deb04e22601d9d750f197ff2f67dadafd2e1e28a6cf811ff85", "state"=>"b8cab794093fd92b46e8d39c63dffffdc523af2f770860a2"}
4011
+ Authenticating with gds_sso strategy
4012
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4013
+  (0.1ms) begin transaction
4014
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4015
+ - signin
4016
+ ' WHERE "users"."id" = 6
4017
+  (5.6ms) commit transaction
4018
+  (0.0ms) begin transaction
4019
+  (0.1ms) UPDATE "users" SET "permissions" = '---
4020
+ - signin
4021
+ ' WHERE "users"."id" = 6
4022
+  (4.3ms) commit transaction
4023
+ Redirected to http://www.example-client.com/this_requires_signin_permission
4024
+ Completed 302 Found in 18.7ms (ActiveRecord: 10.4ms)
4025
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 14:58:42 +0000
4026
+ Processing by ExampleController#this_requires_signin_permission as HTML
4027
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4028
+ Completed 200 OK in 3.1ms (Views: 0.3ms | ActiveRecord: 0.1ms)
4029
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:42 +0000
4030
+ Processing by ExampleController#restricted as HTML
4031
+ Authenticating with gds_sso strategy
4032
+ Completed in 0.3ms
4033
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:42 +0000
4034
+ Started GET "/auth/gds/callback?code=e7dd5b6ce99dde23d4e201fe072581c16f6ec38f18dca14912e2f99d21723ef8&state=d1fb30062bf4605aa9e69cf627352c1b5bcac088374a98b2" for 127.0.0.1 at 2013-10-30 14:58:42 +0000
4035
+ Processing by AuthenticationsController#callback as HTML
4036
+ Parameters: {"code"=>"e7dd5b6ce99dde23d4e201fe072581c16f6ec38f18dca14912e2f99d21723ef8", "state"=>"d1fb30062bf4605aa9e69cf627352c1b5bcac088374a98b2"}
4037
+ Authenticating with gds_sso strategy
4038
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4039
+  (0.1ms) begin transaction
4040
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4041
+ - signin
4042
+ ' WHERE "users"."id" = 6
4043
+  (7.1ms) commit transaction
4044
+  (0.0ms) begin transaction
4045
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4046
+ - signin
4047
+ ' WHERE "users"."id" = 6
4048
+  (4.8ms) commit transaction
4049
+ Redirected to http://www.example-client.com/restricted
4050
+ Completed 302 Found in 23.0ms (ActiveRecord: 12.7ms)
4051
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:42 +0000
4052
+ Processing by ExampleController#restricted as HTML
4053
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4054
+ Completed 200 OK in 2.4ms (Views: 0.5ms | ActiveRecord: 0.2ms)
4055
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4056
+  (0.1ms) begin transaction
4057
+  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
4058
+ - signin
4059
+ ' WHERE "users"."id" = 6
4060
+  (8.9ms) commit transaction
4061
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:42 +0000
4062
+ Processing by ExampleController#restricted as HTML
4063
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4064
+ Filter chain halted as :authenticate_user! rendered or redirected
4065
+ Completed 403 Forbidden in 5.8ms (Views: 3.9ms | ActiveRecord: 0.2ms)
4066
+ Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-10-30 14:58:42 +0000
4067
+ Processing by AuthenticationsController#sign_out as HTML
4068
+ Redirected to http://localhost:4567/users/sign_out
4069
+ Completed 302 Found in 0.5ms (ActiveRecord: 0.0ms)
4070
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:43 +0000
4071
+ Processing by ExampleController#restricted as HTML
4072
+ Authenticating with gds_sso strategy
4073
+ Completed in 0.3ms
4074
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:43 +0000
4075
+ Started GET "/auth/gds/callback?code=87bc7d06f9e52b5040f78d5ff86fbb263582b33244bed765d729002aac8001d7&state=1fbfeba924b1b068322d0fbef2b4da4d53fb74a256364324" for 127.0.0.1 at 2013-10-30 14:58:43 +0000
4076
+ Processing by AuthenticationsController#callback as HTML
4077
+ Parameters: {"code"=>"87bc7d06f9e52b5040f78d5ff86fbb263582b33244bed765d729002aac8001d7", "state"=>"1fbfeba924b1b068322d0fbef2b4da4d53fb74a256364324"}
4078
+ Authenticating with gds_sso strategy
4079
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4080
+  (0.1ms) begin transaction
4081
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4082
+ - signin
4083
+ ' WHERE "users"."id" = 6
4084
+  (7.2ms) commit transaction
4085
+  (0.0ms) begin transaction
4086
+  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
4087
+ - signin
4088
+ ' WHERE "users"."id" = 6
4089
+  (4.1ms) commit transaction
4090
+ Redirected to http://www.example-client.com/restricted
4091
+ Completed 302 Found in 20.1ms (ActiveRecord: 11.9ms)
4092
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:43 +0000
4093
+ Processing by ExampleController#restricted as HTML
4094
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4095
+ Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms)
4096
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:43 +0000
4097
+ Processing by ExampleController#restricted as HTML
4098
+ Authenticating with gds_sso strategy
4099
+ Completed in 0.3ms
4100
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:43 +0000
4101
+ Started GET "/auth/gds/callback?code=e1bd6f888ef37e5f44cc5a61ce36d141c51fc0208846c2718ae49def19e5f1f5&state=b4bf18736e24adef0702b62688f117ab0368826e88a41dda" for 127.0.0.1 at 2013-10-30 14:58:43 +0000
4102
+ Processing by AuthenticationsController#callback as HTML
4103
+ Parameters: {"code"=>"e1bd6f888ef37e5f44cc5a61ce36d141c51fc0208846c2718ae49def19e5f1f5", "state"=>"b4bf18736e24adef0702b62688f117ab0368826e88a41dda"}
4104
+ Authenticating with gds_sso strategy
4105
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4106
+  (0.1ms) begin transaction
4107
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4108
+ - signin
4109
+ ' WHERE "users"."id" = 6
4110
+  (12.0ms) commit transaction
4111
+  (0.1ms) begin transaction
4112
+  (0.3ms) UPDATE "users" SET "permissions" = '---
4113
+ - signin
4114
+ ' WHERE "users"."id" = 6
4115
+  (3.5ms) commit transaction
4116
+ Redirected to http://www.example-client.com/restricted
4117
+ Completed 302 Found in 30.4ms (ActiveRecord: 16.4ms)
4118
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:43 +0000
4119
+ Processing by ExampleController#restricted as HTML
4120
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4121
+ Completed 200 OK in 2.6ms (Views: 0.7ms | ActiveRecord: 0.3ms)
4122
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:03:43 +0000
4123
+ Processing by ExampleController#restricted as HTML
4124
+ Authenticating with gds_sso strategy
4125
+ Completed in 0.5ms
4126
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:03:43 +0000
4127
+ Started GET "/auth/gds/callback?code=973f0fa8a743e55c374e166c86c0da2753453e40b0994b02e576e9799d65c6cf&state=ce5a5d8001cced1f32f81a71982b7ae354697d1e80e108a3" for 127.0.0.1 at 2013-10-31 11:03:43 +0000
4128
+ Processing by AuthenticationsController#callback as HTML
4129
+ Parameters: {"code"=>"973f0fa8a743e55c374e166c86c0da2753453e40b0994b02e576e9799d65c6cf", "state"=>"ce5a5d8001cced1f32f81a71982b7ae354697d1e80e108a3"}
4130
+ Authenticating with gds_sso strategy
4131
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4132
+  (0.1ms) begin transaction
4133
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4134
+ - signin
4135
+ ' WHERE "users"."id" = 6
4136
+  (4.9ms) commit transaction
4137
+  (0.1ms) begin transaction
4138
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4139
+ - signin
4140
+ ' WHERE "users"."id" = 6
4141
+  (3.6ms) commit transaction
4142
+ Redirected to http://www.example-client.com/restricted
4143
+ Completed 302 Found in 17.0ms (ActiveRecord: 9.2ms)
4144
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:03:43 +0000
4145
+ Processing by ExampleController#restricted as HTML
4146
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4147
+ Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
4148
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:43 +0000
4149
+ Processing by ExampleController#restricted as HTML
4150
+ Authenticating with gds_sso strategy
4151
+ Completed in 0.3ms
4152
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:43 +0000
4153
+ Started GET "/auth/gds/callback?code=e05906c7d82b5d9daf4a495c55296ad7159eb4ff81223f9082414307ba86758d&state=52504b0b1d107ce958c4f76ca1ee4643be771726c2544e3e" for 127.0.0.1 at 2013-10-30 14:58:44 +0000
4154
+ Processing by AuthenticationsController#callback as HTML
4155
+ Parameters: {"code"=>"e05906c7d82b5d9daf4a495c55296ad7159eb4ff81223f9082414307ba86758d", "state"=>"52504b0b1d107ce958c4f76ca1ee4643be771726c2544e3e"}
4156
+ Authenticating with gds_sso strategy
4157
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4158
+  (0.1ms) begin transaction
4159
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4160
+ - signin
4161
+ ' WHERE "users"."id" = 6
4162
+  (6.9ms) commit transaction
4163
+  (0.0ms) begin transaction
4164
+  (0.1ms) UPDATE "users" SET "permissions" = '---
4165
+ - signin
4166
+ ' WHERE "users"."id" = 6
4167
+  (3.8ms) commit transaction
4168
+ Redirected to http://www.example-client.com/restricted
4169
+ Completed 302 Found in 20.8ms (ActiveRecord: 11.4ms)
4170
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:44 +0000
4171
+ Processing by ExampleController#restricted as HTML
4172
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4173
+ Completed 200 OK in 1.3ms (Views: 0.5ms | ActiveRecord: 0.1ms)
4174
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 10:53:44 +0000
4175
+ Processing by ExampleController#restricted as HTML
4176
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4177
+ Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms)
4178
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:44 +0000
4179
+ Processing by ExampleController#restricted as JSON
4180
+ Authenticating with gds_sso_api_access strategy
4181
+ Completed in 2.3ms
4182
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:44 +0000
4183
+ Processing by ExampleController#restricted as JSON
4184
+ Authenticating with gds_sso_api_access strategy
4185
+ Completed 200 OK in 1.3ms (Views: 0.5ms | ActiveRecord: 0.0ms)
4186
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 14:58:44 +0000
4187
+ Processing by ExampleController#this_requires_signin_permission as JSON
4188
+ Authenticating with gds_sso_api_access strategy
4189
+ Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
4190
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:44 +0000
4191
+ Processing by ExampleController#restricted as JSON
4192
+ Authenticating with gds_bearer_token strategy
4193
+ Completed in 8.2ms
4194
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:44 +0000
4195
+ Processing by ExampleController#restricted as JSON
4196
+ Authenticating with gds_bearer_token strategy
4197
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4198
+  (0.1ms) begin transaction
4199
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4200
+ - signin
4201
+ ' WHERE "users"."id" = 6
4202
+  (5.1ms) commit transaction
4203
+  (0.0ms) begin transaction
4204
+  (0.1ms) UPDATE "users" SET "permissions" = '---
4205
+ - signin
4206
+ ' WHERE "users"."id" = 6
4207
+  (3.4ms) commit transaction
4208
+ Completed 200 OK in 41.7ms (Views: 0.3ms | ActiveRecord: 9.2ms)
4209
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 14:58:44 +0000
4210
+ Processing by ExampleController#this_requires_signin_permission as JSON
4211
+ Authenticating with gds_bearer_token strategy
4212
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4213
+  (0.1ms) begin transaction
4214
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4215
+ - signin
4216
+ ' WHERE "users"."id" = 6
4217
+  (4.4ms) commit transaction
4218
+  (0.0ms) begin transaction
4219
+  (0.1ms) UPDATE "users" SET "permissions" = '---
4220
+ - signin
4221
+ ' WHERE "users"."id" = 6
4222
+  (2.8ms) commit transaction
4223
+ Completed 200 OK in 40.3ms (Views: 0.3ms | ActiveRecord: 7.8ms)
4224
+ Connecting to database specified by database.yml
4225
+  (0.9ms) select sqlite_version(*)
4226
+  (9.6ms) DROP TABLE "users"
4227
+  (3.6ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "uid" varchar(255) NOT NULL, "email" varchar(255) NOT NULL, "remotely_signed_out" boolean, "permissions" text) 
4228
+  (0.1ms) begin transaction
4229
+ SQL (2.4ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3613"]]
4230
+  (4.7ms) commit transaction
4231
+  (0.1ms) begin transaction
4232
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39406"]]
4233
+  (3.1ms) commit transaction
4234
+ WARNING: Can't mass-assign protected attributes: uid, name, permissions
4235
+ Processing by Api::UserController#update as HTML
4236
+ Parameters: {"uid"=>"a1s2d3613"}
4237
+ Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.9ms)
4238
+ Completed 403 Forbidden in 7.3ms (Views: 6.6ms | ActiveRecord: 0.0ms)
4239
+  (0.1ms) begin transaction
4240
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d31738"]]
4241
+  (3.9ms) commit transaction
4242
+  (0.1ms) begin transaction
4243
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39354"]]
4244
+  (3.7ms) commit transaction
4245
+ Processing by Api::UserController#update as HTML
4246
+ Parameters: {"uid"=>"a1s2d31738"}
4247
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d31738' LIMIT 1
4248
+  (0.1ms) begin transaction
4249
+  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '---
4250
+ - signin
4251
+ - new permission
4252
+ ' WHERE "users"."id" = 3
4253
+  (3.4ms) commit transaction
4254
+ Completed 200 OK in 13.5ms (ActiveRecord: 4.0ms)
4255
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]
4256
+  (0.1ms) begin transaction
4257
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d33165"]]
4258
+  (3.7ms) commit transaction
4259
+  (0.0ms) begin transaction
4260
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d31198"]]
4261
+  (3.6ms) commit transaction
4262
+ WARNING: Can't mass-assign protected attributes: uid, name, permissions
4263
+ Processing by Api::UserController#reauth as HTML
4264
+ Parameters: {"uid"=>"a1s2d33165"}
4265
+ Completed 403 Forbidden in 1.8ms (Views: 1.1ms | ActiveRecord: 0.0ms)
4266
+  (0.1ms) begin transaction
4267
+ SQL (0.3ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39677"]]
4268
+  (3.0ms) commit transaction
4269
+  (0.0ms) begin transaction
4270
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37547"]]
4271
+  (2.9ms) commit transaction
4272
+ Processing by Api::UserController#reauth as HTML
4273
+ Parameters: {"uid"=>"nonexistent-user"}
4274
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1
4275
+ Completed 200 OK in 1.2ms (ActiveRecord: 0.2ms)
4276
+  (0.1ms) begin transaction
4277
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32000"]]
4278
+  (3.4ms) commit transaction
4279
+  (0.0ms) begin transaction
4280
+ SQL (0.1ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34762"]]
4281
+  (3.5ms) commit transaction
4282
+ Processing by Api::UserController#reauth as HTML
4283
+ Parameters: {"uid"=>"a1s2d32000"}
4284
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d32000' LIMIT 1
4285
+  (0.0ms) begin transaction
4286
+  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
4287
+ - signin
4288
+ ' WHERE "users"."id" = 9
4289
+  (3.0ms) commit transaction
4290
+ Completed 200 OK in 7.7ms (ActiveRecord: 3.4ms)
4291
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]]
4292
+ Started GET "/" for 127.0.0.1 at 2013-10-31 11:29:45 +0000
4293
+ Processing by ExampleController#index as HTML
4294
+ Completed 200 OK in 2.4ms (Views: 1.9ms | ActiveRecord: 0.0ms)
4295
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:45 +0000
4296
+ Processing by ExampleController#restricted as HTML
4297
+ Authenticating with gds_sso strategy
4298
+ Completed in 2.9ms
4299
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:45 +0000
4300
+ Started GET "/auth/gds/callback?code=ea334fb3f4df36c7eff38383bec4d2da86f369e516c7896d81474995968f178b&state=d67b7b12aff13a8cea87ebf60dd9aefaf48c33b2cbd4c714" for 127.0.0.1 at 2013-10-31 11:29:46 +0000
4301
+ Processing by AuthenticationsController#callback as HTML
4302
+ Parameters: {"code"=>"ea334fb3f4df36c7eff38383bec4d2da86f369e516c7896d81474995968f178b", "state"=>"d67b7b12aff13a8cea87ebf60dd9aefaf48c33b2cbd4c714"}
4303
+ Authenticating with gds_sso strategy
4304
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4305
+  (0.1ms) begin transaction
4306
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]
4307
+  (5.9ms) commit transaction
4308
+  (0.0ms) begin transaction
4309
+  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
4310
+ - signin
4311
+ ' WHERE "users"."id" = 11
4312
+  (4.2ms) commit transaction
4313
+ Redirected to http://www.example-client.com/restricted
4314
+ Completed 302 Found in 18.7ms (ActiveRecord: 10.7ms)
4315
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:46 +0000
4316
+ Processing by ExampleController#restricted as HTML
4317
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4318
+ Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms)
4319
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:46 +0000
4320
+ Processing by ExampleController#restricted as HTML
4321
+ Authenticating with gds_sso strategy
4322
+ Completed in 0.4ms
4323
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:46 +0000
4324
+ Started GET "/auth/gds/callback?code=7a505bdc1b787708ade7037c58aaa9515efc32cc3eca3f1dc839c77fca810bb7&state=3de4c55203f7ac53b7f1f125f3f9289f04e113ec763ffc56" for 127.0.0.1 at 2013-10-31 11:29:46 +0000
4325
+ Processing by AuthenticationsController#callback as HTML
4326
+ Parameters: {"code"=>"7a505bdc1b787708ade7037c58aaa9515efc32cc3eca3f1dc839c77fca810bb7", "state"=>"3de4c55203f7ac53b7f1f125f3f9289f04e113ec763ffc56"}
4327
+ Authenticating with gds_sso strategy
4328
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4329
+  (0.1ms) begin transaction
4330
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4331
+ - signin
4332
+ ' WHERE "users"."id" = 11
4333
+  (4.3ms) commit transaction
4334
+  (0.0ms) begin transaction
4335
+  (0.1ms) UPDATE "users" SET "permissions" = '---
4336
+ - signin
4337
+ ' WHERE "users"."id" = 11
4338
+  (4.3ms) commit transaction
4339
+ Redirected to http://www.example-client.com/restricted
4340
+ Completed 302 Found in 18.7ms (ActiveRecord: 9.2ms)
4341
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:46 +0000
4342
+ Processing by ExampleController#restricted as HTML
4343
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4344
+ Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.1ms)
4345
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:46 +0000
4346
+ Processing by ExampleController#restricted as HTML
4347
+ Authenticating with gds_sso strategy
4348
+ Completed in 0.2ms
4349
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:46 +0000
4350
+ Started GET "/auth/gds/callback?code=f07c04e96868fd3c6c5bb2c39badad39dd08a634599c0fa95170ee5d4efb7329&state=64ce1792109d2001ee22c503eaeb791031d87ebc03c0c2a9" for 127.0.0.1 at 2013-10-31 11:29:47 +0000
4351
+ Processing by AuthenticationsController#callback as HTML
4352
+ Parameters: {"code"=>"f07c04e96868fd3c6c5bb2c39badad39dd08a634599c0fa95170ee5d4efb7329", "state"=>"64ce1792109d2001ee22c503eaeb791031d87ebc03c0c2a9"}
4353
+ Authenticating with gds_sso strategy
4354
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4355
+  (0.1ms) begin transaction
4356
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4357
+ - signin
4358
+ ' WHERE "users"."id" = 11
4359
+  (7.0ms) commit transaction
4360
+  (0.0ms) begin transaction
4361
+  (0.1ms) UPDATE "users" SET "permissions" = '---
4362
+ - signin
4363
+ ' WHERE "users"."id" = 11
4364
+  (4.4ms) commit transaction
4365
+ Redirected to http://www.example-client.com/restricted
4366
+ Completed 302 Found in 20.2ms (ActiveRecord: 12.0ms)
4367
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:47 +0000
4368
+ Processing by ExampleController#restricted as HTML
4369
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4370
+ Completed 200 OK in 1.4ms (Views: 0.3ms | ActiveRecord: 0.2ms)
4371
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:29:47 +0000
4372
+ Processing by ExampleController#this_requires_signin_permission as HTML
4373
+ Authenticating with gds_sso strategy
4374
+ Completed in 0.9ms
4375
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:47 +0000
4376
+ Started GET "/auth/gds/callback?code=eb48b4542e41de858cb1401917bd3b45b5310dfe41d58559e313d07c9d9bbead&state=fb0c181bcb7e5c4dc4e04cbdceb84dccf2c9ae04cb312be1" for 127.0.0.1 at 2013-10-31 11:29:47 +0000
4377
+ Processing by AuthenticationsController#callback as HTML
4378
+ Parameters: {"code"=>"eb48b4542e41de858cb1401917bd3b45b5310dfe41d58559e313d07c9d9bbead", "state"=>"fb0c181bcb7e5c4dc4e04cbdceb84dccf2c9ae04cb312be1"}
4379
+ Authenticating with gds_sso strategy
4380
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4381
+  (0.1ms) begin transaction
4382
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4383
+ - signin
4384
+ ' WHERE "users"."id" = 11
4385
+  (5.2ms) commit transaction
4386
+  (0.0ms) begin transaction
4387
+  (0.1ms) UPDATE "users" SET "permissions" = '---
4388
+ - signin
4389
+ ' WHERE "users"."id" = 11
4390
+  (4.6ms) commit transaction
4391
+ Redirected to http://www.example-client.com/this_requires_signin_permission
4392
+ Completed 302 Found in 20.7ms (ActiveRecord: 10.5ms)
4393
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:29:47 +0000
4394
+ Processing by ExampleController#this_requires_signin_permission as HTML
4395
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4396
+ Completed 200 OK in 3.4ms (Views: 0.5ms | ActiveRecord: 0.1ms)
4397
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:29:47 +0000
4398
+ Processing by ExampleController#this_requires_signin_permission as HTML
4399
+ Authenticating with gds_sso strategy
4400
+ Completed in 0.2ms
4401
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:47 +0000
4402
+ Started GET "/auth/gds/callback?code=bbad64af30b3ceb0f0bea70f55c5cdfc9b944597b0c5f895898ce7aae891d2fa&state=062b39ebbf6cadda37ad07b6d4d97cb3ecfb9c860385c083" for 127.0.0.1 at 2013-10-31 11:29:47 +0000
4403
+ Processing by AuthenticationsController#callback as HTML
4404
+ Parameters: {"code"=>"bbad64af30b3ceb0f0bea70f55c5cdfc9b944597b0c5f895898ce7aae891d2fa", "state"=>"062b39ebbf6cadda37ad07b6d4d97cb3ecfb9c860385c083"}
4405
+ Authenticating with gds_sso strategy
4406
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4407
+  (0.1ms) begin transaction
4408
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4409
+ - signin
4410
+ ' WHERE "users"."id" = 11
4411
+  (4.7ms) commit transaction
4412
+  (0.0ms) begin transaction
4413
+  (0.1ms) UPDATE "users" SET "permissions" = '---
4414
+ - signin
4415
+ ' WHERE "users"."id" = 11
4416
+  (3.5ms) commit transaction
4417
+ Redirected to http://www.example-client.com/this_requires_signin_permission
4418
+ Completed 302 Found in 16.7ms (ActiveRecord: 8.8ms)
4419
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:29:47 +0000
4420
+ Processing by ExampleController#this_requires_signin_permission as HTML
4421
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4422
+ Completed 200 OK in 2.9ms (Views: 0.3ms | ActiveRecord: 0.1ms)
4423
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:47 +0000
4424
+ Processing by ExampleController#restricted as HTML
4425
+ Authenticating with gds_sso strategy
4426
+ Completed in 0.3ms
4427
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:47 +0000
4428
+ Started GET "/auth/gds/callback?code=70eb8cc2821db0bdb529fd3426c94b99d68c7e4eb12b778e61dd50403acf6aad&state=fe739fcb50889b85a8af8277a420601f13d7ae36ba79f0a3" for 127.0.0.1 at 2013-10-31 11:29:48 +0000
4429
+ Processing by AuthenticationsController#callback as HTML
4430
+ Parameters: {"code"=>"70eb8cc2821db0bdb529fd3426c94b99d68c7e4eb12b778e61dd50403acf6aad", "state"=>"fe739fcb50889b85a8af8277a420601f13d7ae36ba79f0a3"}
4431
+ Authenticating with gds_sso strategy
4432
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4433
+  (0.1ms) begin transaction
4434
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4435
+ - signin
4436
+ ' WHERE "users"."id" = 11
4437
+  (4.8ms) commit transaction
4438
+  (0.0ms) begin transaction
4439
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4440
+ - signin
4441
+ ' WHERE "users"."id" = 11
4442
+  (3.0ms) commit transaction
4443
+ Redirected to http://www.example-client.com/restricted
4444
+ Completed 302 Found in 19.0ms (ActiveRecord: 8.5ms)
4445
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:48 +0000
4446
+ Processing by ExampleController#restricted as HTML
4447
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4448
+ Completed 200 OK in 1.4ms (Views: 0.5ms | ActiveRecord: 0.1ms)
4449
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4450
+  (0.0ms) begin transaction
4451
+  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
4452
+ - signin
4453
+ ' WHERE "users"."id" = 11
4454
+  (3.1ms) commit transaction
4455
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:48 +0000
4456
+ Processing by ExampleController#restricted as HTML
4457
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4458
+ Filter chain halted as :authenticate_user! rendered or redirected
4459
+ Completed 403 Forbidden in 3.4ms (Views: 2.4ms | ActiveRecord: 0.1ms)
4460
+ Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-10-31 11:29:48 +0000
4461
+ Processing by AuthenticationsController#sign_out as HTML
4462
+ Redirected to http://localhost:4567/users/sign_out
4463
+ Completed 302 Found in 0.6ms (ActiveRecord: 0.0ms)
4464
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:48 +0000
4465
+ Processing by ExampleController#restricted as HTML
4466
+ Authenticating with gds_sso strategy
4467
+ Completed in 0.3ms
4468
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:48 +0000
4469
+ Started GET "/auth/gds/callback?code=6df0c015afd6823152c95acc2031d9a240fdbb888069625907109d173c99cbb6&state=d75a201ebc3157d9862f91a78fcfbe4bf2a49e5d16cced59" for 127.0.0.1 at 2013-10-31 11:29:48 +0000
4470
+ Processing by AuthenticationsController#callback as HTML
4471
+ Parameters: {"code"=>"6df0c015afd6823152c95acc2031d9a240fdbb888069625907109d173c99cbb6", "state"=>"d75a201ebc3157d9862f91a78fcfbe4bf2a49e5d16cced59"}
4472
+ Authenticating with gds_sso strategy
4473
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4474
+  (0.1ms) begin transaction
4475
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4476
+ - signin
4477
+ ' WHERE "users"."id" = 11
4478
+  (7.1ms) commit transaction
4479
+  (0.1ms) begin transaction
4480
+  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
4481
+ - signin
4482
+ ' WHERE "users"."id" = 11
4483
+  (4.6ms) commit transaction
4484
+ Redirected to http://www.example-client.com/restricted
4485
+ Completed 302 Found in 20.8ms (ActiveRecord: 12.4ms)
4486
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:48 +0000
4487
+ Processing by ExampleController#restricted as HTML
4488
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4489
+ Completed 200 OK in 1.3ms (Views: 0.3ms | ActiveRecord: 0.1ms)
4490
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:48 +0000
4491
+ Processing by ExampleController#restricted as HTML
4492
+ Authenticating with gds_sso strategy
4493
+ Completed in 0.2ms
4494
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:48 +0000
4495
+ Started GET "/auth/gds/callback?code=f9288ca55b8e6cf4db6c2be2206da8f652cd5e3cdb057317d58b77e9498291de&state=20ec2c50661c7b68bc24e7eae4f9ae9dff2dfeac734f46df" for 127.0.0.1 at 2013-10-31 11:29:48 +0000
4496
+ Processing by AuthenticationsController#callback as HTML
4497
+ Parameters: {"code"=>"f9288ca55b8e6cf4db6c2be2206da8f652cd5e3cdb057317d58b77e9498291de", "state"=>"20ec2c50661c7b68bc24e7eae4f9ae9dff2dfeac734f46df"}
4498
+ Authenticating with gds_sso strategy
4499
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4500
+  (0.1ms) begin transaction
4501
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4502
+ - signin
4503
+ ' WHERE "users"."id" = 11
4504
+  (4.6ms) commit transaction
4505
+  (0.0ms) begin transaction
4506
+  (0.1ms) UPDATE "users" SET "permissions" = '---
4507
+ - signin
4508
+ ' WHERE "users"."id" = 11
4509
+  (3.0ms) commit transaction
4510
+ Redirected to http://www.example-client.com/restricted
4511
+ Completed 302 Found in 17.3ms (ActiveRecord: 8.1ms)
4512
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:48 +0000
4513
+ Processing by ExampleController#restricted as HTML
4514
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4515
+ Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms)
4516
+ Started GET "/restricted" for 127.0.0.1 at 2013-11-01 07:34:48 +0000
4517
+ Processing by ExampleController#restricted as HTML
4518
+ Authenticating with gds_sso strategy
4519
+ Completed in 0.3ms
4520
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 07:34:48 +0000
4521
+ Started GET "/auth/gds/callback?code=a7bbe8723628cc9643b443aeec6d01f157a551459487c75b9d736bed893bc79d&state=4e9244f89282b1883c5ac4453277f0ba1a5c98b362538f12" for 127.0.0.1 at 2013-11-01 07:34:48 +0000
4522
+ Processing by AuthenticationsController#callback as HTML
4523
+ Parameters: {"code"=>"a7bbe8723628cc9643b443aeec6d01f157a551459487c75b9d736bed893bc79d", "state"=>"4e9244f89282b1883c5ac4453277f0ba1a5c98b362538f12"}
4524
+ Authenticating with gds_sso strategy
4525
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4526
+  (0.1ms) begin transaction
4527
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4528
+ - signin
4529
+ ' WHERE "users"."id" = 11
4530
+  (4.2ms) commit transaction
4531
+  (0.1ms) begin transaction
4532
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4533
+ - signin
4534
+ ' WHERE "users"."id" = 11
4535
+  (3.9ms) commit transaction
4536
+ Redirected to http://www.example-client.com/restricted
4537
+ Completed 302 Found in 16.8ms (ActiveRecord: 8.7ms)
4538
+ Started GET "/restricted" for 127.0.0.1 at 2013-11-01 07:34:49 +0000
4539
+ Processing by ExampleController#restricted as HTML
4540
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4541
+ Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
4542
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:49 +0000
4543
+ Processing by ExampleController#restricted as HTML
4544
+ Authenticating with gds_sso strategy
4545
+ Completed in 0.2ms
4546
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:49 +0000
4547
+ Started GET "/auth/gds/callback?code=52fcbae45155f9d60188eb3972067cdb696f2aa0ae878829bf8b8875269407ec&state=00957b3c7b8f4bede1e4b64beda98279a6d7e5aed69274eb" for 127.0.0.1 at 2013-10-31 11:29:49 +0000
4548
+ Processing by AuthenticationsController#callback as HTML
4549
+ Parameters: {"code"=>"52fcbae45155f9d60188eb3972067cdb696f2aa0ae878829bf8b8875269407ec", "state"=>"00957b3c7b8f4bede1e4b64beda98279a6d7e5aed69274eb"}
4550
+ Authenticating with gds_sso strategy
4551
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4552
+  (0.1ms) begin transaction
4553
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4554
+ - signin
4555
+ ' WHERE "users"."id" = 11
4556
+  (5.2ms) commit transaction
4557
+  (0.0ms) begin transaction
4558
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4559
+ - signin
4560
+ ' WHERE "users"."id" = 11
4561
+  (4.3ms) commit transaction
4562
+ Redirected to http://www.example-client.com/restricted
4563
+ Completed 302 Found in 19.3ms (ActiveRecord: 10.1ms)
4564
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:49 +0000
4565
+ Processing by ExampleController#restricted as HTML
4566
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4567
+ Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.1ms)
4568
+ Started GET "/restricted" for 127.0.0.1 at 2013-11-01 07:24:49 +0000
4569
+ Processing by ExampleController#restricted as HTML
4570
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4571
+ Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms)
4572
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:49 +0000
4573
+ Processing by ExampleController#restricted as JSON
4574
+ Authenticating with gds_bearer_token strategy
4575
+ Completed in 8.3ms
4576
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:49 +0000
4577
+ Processing by ExampleController#restricted as JSON
4578
+ Authenticating with gds_bearer_token strategy
4579
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4580
+  (0.1ms) begin transaction
4581
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4582
+ - signin
4583
+ ' WHERE "users"."id" = 11
4584
+  (5.2ms) commit transaction
4585
+  (0.0ms) begin transaction
4586
+  (0.1ms) UPDATE "users" SET "permissions" = '---
4587
+ - signin
4588
+ ' WHERE "users"."id" = 11
4589
+  (5.0ms) commit transaction
4590
+ Completed 200 OK in 44.5ms (Views: 0.3ms | ActiveRecord: 10.7ms)
4591
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:29:49 +0000
4592
+ Processing by ExampleController#this_requires_signin_permission as JSON
4593
+ Authenticating with gds_bearer_token strategy
4594
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4595
+  (0.1ms) begin transaction
4596
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4597
+ - signin
4598
+ ' WHERE "users"."id" = 11
4599
+  (3.5ms) commit transaction
4600
+  (0.1ms) begin transaction
4601
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4602
+ - signin
4603
+ ' WHERE "users"."id" = 11
4604
+  (2.8ms) commit transaction
4605
+ Completed 200 OK in 42.5ms (Views: 0.3ms | ActiveRecord: 7.0ms)
4606
+ Connecting to database specified by database.yml
4607
+  (0.9ms) select sqlite_version(*)
4608
+  (7.1ms) DROP TABLE "users"
4609
+  (4.9ms) 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) 
4610
+  (0.1ms) begin transaction
4611
+ SQL (2.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34045"]]
4612
+  (4.0ms) commit transaction
4613
+  (0.1ms) begin transaction
4614
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34401"]]
4615
+  (3.8ms) commit transaction
4616
+ WARNING: Can't mass-assign protected attributes: uid, name, permissions
4617
+ Processing by Api::UserController#update as HTML
4618
+ Parameters: {"uid"=>"a1s2d34045"}
4619
+ Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (1.0ms)
4620
+ Completed 403 Forbidden in 7.1ms (Views: 6.4ms | ActiveRecord: 0.0ms)
4621
+  (0.1ms) begin transaction
4622
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37401"]]
4623
+  (4.9ms) commit transaction
4624
+  (0.1ms) begin transaction
4625
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38417"]]
4626
+  (5.1ms) commit transaction
4627
+ Processing by Api::UserController#update as HTML
4628
+ Parameters: {"uid"=>"a1s2d37401"}
4629
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d37401' LIMIT 1
4630
+  (0.1ms) begin transaction
4631
+  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '---
4632
+ - signin
4633
+ - new permission
4634
+ ' WHERE "users"."id" = 3
4635
+  (4.1ms) commit transaction
4636
+ Completed 200 OK in 14.6ms (ActiveRecord: 4.6ms)
4637
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]
4638
+  (0.1ms) begin transaction
4639
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3357"]]
4640
+  (7.3ms) commit transaction
4641
+  (0.1ms) begin transaction
4642
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35680"]]
4643
+  (9.0ms) commit transaction
4644
+ WARNING: Can't mass-assign protected attributes: uid, name, permissions
4645
+ Processing by Api::UserController#reauth as HTML
4646
+ Parameters: {"uid"=>"a1s2d3357"}
4647
+ Completed 403 Forbidden in 2.1ms (Views: 1.3ms | ActiveRecord: 0.0ms)
4648
+  (0.1ms) begin transaction
4649
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d33521"]]
4650
+  (13.4ms) commit transaction
4651
+  (0.1ms) begin transaction
4652
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34941"]]
4653
+  (3.6ms) commit transaction
4654
+ Processing by Api::UserController#reauth as HTML
4655
+ Parameters: {"uid"=>"nonexistent-user"}
4656
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1
4657
+ Completed 200 OK in 1.3ms (ActiveRecord: 0.3ms)
4658
+  (0.1ms) begin transaction
4659
+ SQL (0.2ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d31774"]]
4660
+  (5.1ms) commit transaction
4661
+  (0.0ms) begin transaction
4662
+ SQL (0.1ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d31106"]]
4663
+  (5.0ms) commit transaction
4664
+ Processing by Api::UserController#reauth as HTML
4665
+ Parameters: {"uid"=>"a1s2d31774"}
4666
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d31774' LIMIT 1
4667
+  (0.1ms) begin transaction
4668
+  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
4669
+ - signin
4670
+ ' WHERE "users"."id" = 9
4671
+  (4.7ms) commit transaction
4672
+ Completed 200 OK in 9.7ms (ActiveRecord: 5.2ms)
4673
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]]
4674
+ Started GET "/" for 127.0.0.1 at 2013-10-31 11:38:29 +0000
4675
+ Processing by ExampleController#index as HTML
4676
+ Completed 200 OK in 2.5ms (Views: 2.0ms | ActiveRecord: 0.0ms)
4677
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:29 +0000
4678
+ Processing by ExampleController#restricted as HTML
4679
+ Authenticating with gds_sso strategy
4680
+ Completed in 3.1ms
4681
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:29 +0000
4682
+ Started GET "/auth/gds/callback?code=7076c155ba2e6b897d4be0cea184f3ee669c54789ff8df4f3ec6303689e63f25&state=770ee508b2b88449dc584a5e510d496412f38273cc5e1f93" for 127.0.0.1 at 2013-10-31 11:38:30 +0000
4683
+ Processing by AuthenticationsController#callback as HTML
4684
+ Parameters: {"code"=>"7076c155ba2e6b897d4be0cea184f3ee669c54789ff8df4f3ec6303689e63f25", "state"=>"770ee508b2b88449dc584a5e510d496412f38273cc5e1f93"}
4685
+ Authenticating with gds_sso strategy
4686
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4687
+  (0.1ms) begin transaction
4688
+ SQL (0.3ms) INSERT INTO "users" ("email", "name", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]
4689
+  (4.4ms) commit transaction
4690
+  (0.0ms) begin transaction
4691
+  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
4692
+ - signin
4693
+ ' WHERE "users"."id" = 11
4694
+  (2.6ms) commit transaction
4695
+ Redirected to http://www.example-client.com/restricted
4696
+ Completed 302 Found in 15.9ms (ActiveRecord: 7.8ms)
4697
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:30 +0000
4698
+ Processing by ExampleController#restricted as HTML
4699
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4700
+ Completed 200 OK in 1.4ms (Views: 0.5ms | ActiveRecord: 0.1ms)
4701
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:30 +0000
4702
+ Processing by ExampleController#restricted as HTML
4703
+ Authenticating with gds_sso strategy
4704
+ Completed in 0.3ms
4705
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:30 +0000
4706
+ Started GET "/auth/gds/callback?code=c7ca4d809f924ea396e11557a456d3592df744c59f19cb35c58d12d85296f9ce&state=0df587715601a2f68981a64f74b971390937487447e4cb8f" for 127.0.0.1 at 2013-10-31 11:38:31 +0000
4707
+ Processing by AuthenticationsController#callback as HTML
4708
+ Parameters: {"code"=>"c7ca4d809f924ea396e11557a456d3592df744c59f19cb35c58d12d85296f9ce", "state"=>"0df587715601a2f68981a64f74b971390937487447e4cb8f"}
4709
+ Authenticating with gds_sso strategy
4710
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4711
+  (0.1ms) begin transaction
4712
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4713
+ - signin
4714
+ ' WHERE "users"."id" = 11
4715
+  (4.4ms) commit transaction
4716
+  (0.0ms) begin transaction
4717
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4718
+ - signin
4719
+ ' WHERE "users"."id" = 11
4720
+  (3.6ms) commit transaction
4721
+ Redirected to http://www.example-client.com/restricted
4722
+ Completed 302 Found in 18.1ms (ActiveRecord: 8.7ms)
4723
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:31 +0000
4724
+ Processing by ExampleController#restricted as HTML
4725
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4726
+ Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms)
4727
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:31 +0000
4728
+ Processing by ExampleController#restricted as HTML
4729
+ Authenticating with gds_sso strategy
4730
+ Completed in 0.2ms
4731
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:31 +0000
4732
+ Started GET "/auth/gds/callback?code=344801e2fa7aa06cb1ad37f59897de3c9f94b02e46dc5b58803f2d72e5f4e36b&state=ef509060c15900e987de31eed7b4dce7f2608cdd06cf04c8" for 127.0.0.1 at 2013-10-31 11:38:31 +0000
4733
+ Processing by AuthenticationsController#callback as HTML
4734
+ Parameters: {"code"=>"344801e2fa7aa06cb1ad37f59897de3c9f94b02e46dc5b58803f2d72e5f4e36b", "state"=>"ef509060c15900e987de31eed7b4dce7f2608cdd06cf04c8"}
4735
+ Authenticating with gds_sso strategy
4736
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4737
+  (0.0ms) begin transaction
4738
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4739
+ - signin
4740
+ ' WHERE "users"."id" = 11
4741
+  (3.6ms) commit transaction
4742
+  (0.1ms) begin transaction
4743
+  (0.1ms) UPDATE "users" SET "permissions" = '---
4744
+ - signin
4745
+ ' WHERE "users"."id" = 11
4746
+  (2.9ms) commit transaction
4747
+ Redirected to http://www.example-client.com/restricted
4748
+ Completed 302 Found in 15.7ms (ActiveRecord: 7.2ms)
4749
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:31 +0000
4750
+ Processing by ExampleController#restricted as HTML
4751
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4752
+ Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms)
4753
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:38:31 +0000
4754
+ Processing by ExampleController#this_requires_signin_permission as HTML
4755
+ Authenticating with gds_sso strategy
4756
+ Completed in 1.0ms
4757
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:31 +0000
4758
+ Started GET "/auth/gds/callback?code=e4d456776e183ac16c1a488fee5d37f0ef73b83eaab6babd84dcaba64b9a6de8&state=33a12d41614b3c0471c76c47a87dfb1c1d9d0e669947b31e" for 127.0.0.1 at 2013-10-31 11:38:31 +0000
4759
+ Processing by AuthenticationsController#callback as HTML
4760
+ Parameters: {"code"=>"e4d456776e183ac16c1a488fee5d37f0ef73b83eaab6babd84dcaba64b9a6de8", "state"=>"33a12d41614b3c0471c76c47a87dfb1c1d9d0e669947b31e"}
4761
+ Authenticating with gds_sso strategy
4762
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4763
+  (0.1ms) begin transaction
4764
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4765
+ - signin
4766
+ ' WHERE "users"."id" = 11
4767
+  (3.7ms) commit transaction
4768
+  (0.0ms) begin transaction
4769
+  (0.1ms) UPDATE "users" SET "permissions" = '---
4770
+ - signin
4771
+ ' WHERE "users"."id" = 11
4772
+  (3.6ms) commit transaction
4773
+ Redirected to http://www.example-client.com/this_requires_signin_permission
4774
+ Completed 302 Found in 17.0ms (ActiveRecord: 8.0ms)
4775
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:38:31 +0000
4776
+ Processing by ExampleController#this_requires_signin_permission as HTML
4777
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4778
+ Completed 200 OK in 3.6ms (Views: 0.6ms | ActiveRecord: 0.1ms)
4779
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:38:31 +0000
4780
+ Processing by ExampleController#this_requires_signin_permission as HTML
4781
+ Authenticating with gds_sso strategy
4782
+ Completed in 0.2ms
4783
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:31 +0000
4784
+ Started GET "/auth/gds/callback?code=06e4a236c113f2b9a712766532fbd02b4d0c5c988050e6e8588cae14fea1973b&state=a66a4cc2b23620d9d6e6737f5e68925c79530f1af0732b94" for 127.0.0.1 at 2013-10-31 11:38:31 +0000
4785
+ Processing by AuthenticationsController#callback as HTML
4786
+ Parameters: {"code"=>"06e4a236c113f2b9a712766532fbd02b4d0c5c988050e6e8588cae14fea1973b", "state"=>"a66a4cc2b23620d9d6e6737f5e68925c79530f1af0732b94"}
4787
+ Authenticating with gds_sso strategy
4788
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4789
+  (0.1ms) begin transaction
4790
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4791
+ - signin
4792
+ ' WHERE "users"."id" = 11
4793
+  (4.7ms) commit transaction
4794
+  (0.0ms) begin transaction
4795
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4796
+ - signin
4797
+ ' WHERE "users"."id" = 11
4798
+  (3.1ms) commit transaction
4799
+ Redirected to http://www.example-client.com/this_requires_signin_permission
4800
+ Completed 302 Found in 16.8ms (ActiveRecord: 8.4ms)
4801
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:38:32 +0000
4802
+ Processing by ExampleController#this_requires_signin_permission as HTML
4803
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4804
+ Completed 200 OK in 3.2ms (Views: 0.3ms | ActiveRecord: 0.1ms)
4805
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:32 +0000
4806
+ Processing by ExampleController#restricted as HTML
4807
+ Authenticating with gds_sso strategy
4808
+ Completed in 0.3ms
4809
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:32 +0000
4810
+ Started GET "/auth/gds/callback?code=e8aeebb3e2ba1909323787104940651c8a0981647bdf64a760e147e86ffbfefc&state=f79820d13a2122a8d3ac5f2c2ebc85ac261c47947c51585f" for 127.0.0.1 at 2013-10-31 11:38:32 +0000
4811
+ Processing by AuthenticationsController#callback as HTML
4812
+ Parameters: {"code"=>"e8aeebb3e2ba1909323787104940651c8a0981647bdf64a760e147e86ffbfefc", "state"=>"f79820d13a2122a8d3ac5f2c2ebc85ac261c47947c51585f"}
4813
+ Authenticating with gds_sso strategy
4814
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4815
+  (0.1ms) begin transaction
4816
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4817
+ - signin
4818
+ ' WHERE "users"."id" = 11
4819
+  (5.0ms) commit transaction
4820
+  (0.0ms) begin transaction
4821
+  (0.1ms) UPDATE "users" SET "permissions" = '---
4822
+ - signin
4823
+ ' WHERE "users"."id" = 11
4824
+  (2.8ms) commit transaction
4825
+ Redirected to http://www.example-client.com/restricted
4826
+ Completed 302 Found in 18.0ms (ActiveRecord: 8.5ms)
4827
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:32 +0000
4828
+ Processing by ExampleController#restricted as HTML
4829
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4830
+ Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms)
4831
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4832
+  (0.0ms) begin transaction
4833
+  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '---
4834
+ - signin
4835
+ ' WHERE "users"."id" = 11
4836
+  (2.9ms) commit transaction
4837
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:32 +0000
4838
+ Processing by ExampleController#restricted as HTML
4839
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4840
+ Filter chain halted as :authenticate_user! rendered or redirected
4841
+ Completed 403 Forbidden in 3.5ms (Views: 2.4ms | ActiveRecord: 0.1ms)
4842
+ Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-10-31 11:38:32 +0000
4843
+ Processing by AuthenticationsController#sign_out as HTML
4844
+ Redirected to http://localhost:4567/users/sign_out
4845
+ Completed 302 Found in 0.6ms (ActiveRecord: 0.0ms)
4846
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:32 +0000
4847
+ Processing by ExampleController#restricted as HTML
4848
+ Authenticating with gds_sso strategy
4849
+ Completed in 0.3ms
4850
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:32 +0000
4851
+ Started GET "/auth/gds/callback?code=7f24c5a305c90af77ec7cec351c5984876b2972f95f9e2bdeeddb39b07aa1157&state=7cb3208f25ead37892e645398274299dbe4d08fc0bae32d4" for 127.0.0.1 at 2013-10-31 11:38:32 +0000
4852
+ Processing by AuthenticationsController#callback as HTML
4853
+ Parameters: {"code"=>"7f24c5a305c90af77ec7cec351c5984876b2972f95f9e2bdeeddb39b07aa1157", "state"=>"7cb3208f25ead37892e645398274299dbe4d08fc0bae32d4"}
4854
+ Authenticating with gds_sso strategy
4855
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4856
+  (0.0ms) begin transaction
4857
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4858
+ - signin
4859
+ ' WHERE "users"."id" = 11
4860
+  (4.4ms) commit transaction
4861
+  (0.1ms) begin transaction
4862
+  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '---
4863
+ - signin
4864
+ ' WHERE "users"."id" = 11
4865
+  (3.6ms) commit transaction
4866
+ Redirected to http://www.example-client.com/restricted
4867
+ Completed 302 Found in 17.3ms (ActiveRecord: 8.7ms)
4868
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:32 +0000
4869
+ Processing by ExampleController#restricted as HTML
4870
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4871
+ Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms)
4872
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:32 +0000
4873
+ Processing by ExampleController#restricted as HTML
4874
+ Authenticating with gds_sso strategy
4875
+ Completed in 0.3ms
4876
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:32 +0000
4877
+ Started GET "/auth/gds/callback?code=7389b2655a69297e389913caf43fce07399e10de4e9b3d1b8aeeaeacb12541ff&state=6e1887d565e93ad7e6d2455ca48002569502e3d1c76c9584" for 127.0.0.1 at 2013-10-31 11:38:33 +0000
4878
+ Processing by AuthenticationsController#callback as HTML
4879
+ Parameters: {"code"=>"7389b2655a69297e389913caf43fce07399e10de4e9b3d1b8aeeaeacb12541ff", "state"=>"6e1887d565e93ad7e6d2455ca48002569502e3d1c76c9584"}
4880
+ Authenticating with gds_sso strategy
4881
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4882
+  (0.1ms) begin transaction
4883
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4884
+ - signin
4885
+ ' WHERE "users"."id" = 11
4886
+  (4.8ms) commit transaction
4887
+  (0.0ms) begin transaction
4888
+  (0.1ms) UPDATE "users" SET "permissions" = '---
4889
+ - signin
4890
+ ' WHERE "users"."id" = 11
4891
+  (3.0ms) commit transaction
4892
+ Redirected to http://www.example-client.com/restricted
4893
+ Completed 302 Found in 18.3ms (ActiveRecord: 8.5ms)
4894
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:33 +0000
4895
+ Processing by ExampleController#restricted as HTML
4896
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4897
+ Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms)
4898
+ Started GET "/restricted" for 127.0.0.1 at 2013-11-01 07:43:33 +0000
4899
+ Processing by ExampleController#restricted as HTML
4900
+ Authenticating with gds_sso strategy
4901
+ Completed in 0.3ms
4902
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 07:43:33 +0000
4903
+ Started GET "/auth/gds/callback?code=dda00818864f4f1f758d17f7270a2ae70004a6424993c00b950396e2fb66d455&state=f2b7c6d249227239f0df33b4f919530cd13e7a5583230cb7" for 127.0.0.1 at 2013-11-01 07:43:33 +0000
4904
+ Processing by AuthenticationsController#callback as HTML
4905
+ Parameters: {"code"=>"dda00818864f4f1f758d17f7270a2ae70004a6424993c00b950396e2fb66d455", "state"=>"f2b7c6d249227239f0df33b4f919530cd13e7a5583230cb7"}
4906
+ Authenticating with gds_sso strategy
4907
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4908
+  (0.1ms) begin transaction
4909
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4910
+ - signin
4911
+ ' WHERE "users"."id" = 11
4912
+  (4.0ms) commit transaction
4913
+  (0.1ms) begin transaction
4914
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4915
+ - signin
4916
+ ' WHERE "users"."id" = 11
4917
+  (2.7ms) commit transaction
4918
+ Redirected to http://www.example-client.com/restricted
4919
+ Completed 302 Found in 15.0ms (ActiveRecord: 7.3ms)
4920
+ Started GET "/restricted" for 127.0.0.1 at 2013-11-01 07:43:33 +0000
4921
+ Processing by ExampleController#restricted as HTML
4922
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4923
+ Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms)
4924
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:33 +0000
4925
+ Processing by ExampleController#restricted as HTML
4926
+ Authenticating with gds_sso strategy
4927
+ Completed in 0.3ms
4928
+ Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:33 +0000
4929
+ Started GET "/auth/gds/callback?code=163ff71d8a13eea08b9e061f7bc78c1acf07117cfbd653020e43ed56e2ad642f&state=cc7649abe8fa5d4abaf5ff934b0b39c99d336a1ee509b053" for 127.0.0.1 at 2013-10-31 11:38:33 +0000
4930
+ Processing by AuthenticationsController#callback as HTML
4931
+ Parameters: {"code"=>"163ff71d8a13eea08b9e061f7bc78c1acf07117cfbd653020e43ed56e2ad642f", "state"=>"cc7649abe8fa5d4abaf5ff934b0b39c99d336a1ee509b053"}
4932
+ Authenticating with gds_sso strategy
4933
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4934
+  (0.1ms) begin transaction
4935
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4936
+ - signin
4937
+ ' WHERE "users"."id" = 11
4938
+  (3.9ms) commit transaction
4939
+  (0.0ms) begin transaction
4940
+  (0.1ms) UPDATE "users" SET "permissions" = '---
4941
+ - signin
4942
+ ' WHERE "users"."id" = 11
4943
+  (3.6ms) commit transaction
4944
+ Redirected to http://www.example-client.com/restricted
4945
+ Completed 302 Found in 18.0ms (ActiveRecord: 8.1ms)
4946
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:33 +0000
4947
+ Processing by ExampleController#restricted as HTML
4948
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4949
+ Completed 200 OK in 1.5ms (Views: 0.5ms | ActiveRecord: 0.1ms)
4950
+ Started GET "/restricted" for 127.0.0.1 at 2013-11-01 07:33:33 +0000
4951
+ Processing by ExampleController#restricted as HTML
4952
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4953
+ Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
4954
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:33 +0000
4955
+ Processing by ExampleController#restricted as JSON
4956
+ Authenticating with gds_bearer_token strategy
4957
+ Completed in 7.9ms
4958
+ Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:33 +0000
4959
+ Processing by ExampleController#restricted as JSON
4960
+ Authenticating with gds_bearer_token strategy
4961
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4962
+  (0.1ms) begin transaction
4963
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4964
+ - signin
4965
+ ' WHERE "users"."id" = 11
4966
+  (4.4ms) commit transaction
4967
+  (0.0ms) begin transaction
4968
+  (0.1ms) UPDATE "users" SET "permissions" = '---
4969
+ - signin
4970
+ ' WHERE "users"."id" = 11
4971
+  (3.7ms) commit transaction
4972
+ Completed 200 OK in 42.1ms (Views: 0.3ms | ActiveRecord: 8.7ms)
4973
+ Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:38:33 +0000
4974
+ Processing by ExampleController#this_requires_signin_permission as JSON
4975
+ Authenticating with gds_bearer_token strategy
4976
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1
4977
+  (0.1ms) begin transaction
4978
+  (0.2ms) UPDATE "users" SET "permissions" = '---
4979
+ - signin
4980
+ ' WHERE "users"."id" = 11
4981
+  (5.5ms) commit transaction
4982
+  (0.0ms) begin transaction
4983
+  (0.1ms) UPDATE "users" SET "permissions" = '---
4984
+ - signin
4985
+ ' WHERE "users"."id" = 11
4986
+  (4.3ms) commit transaction
4987
+ Completed 200 OK in 46.0ms (Views: 0.3ms | ActiveRecord: 10.4ms)