Connecting to database specified by database.yml  (0.7ms) select sqlite_version(*)  (7.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)  (2.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (2.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) begin transaction SQL (1.9ms) 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", "a1s2d31153"]]  (3.6ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d31153"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.7ms) Completed 403 Forbidden in 7ms (Views: 5.9ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d3755"]]  (3.1ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d3755"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d3755' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ' WHERE "users"."id" = 2  (3.7ms) commit transaction Completed 200 OK in 12ms (ActiveRecord: 4.1ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) begin transaction SQL (0.1ms) 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", "a1s2d33273"]]  (2.8ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d33273"} Completed 403 Forbidden in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d37928"]]  (3.5ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1ms (ActiveRecord: 0.1ms)  (0.0ms) begin transaction SQL (0.1ms) 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", "a1s2d32662"]]  (2.8ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d32662"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d32662' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 5  (2.8ms) commit transaction Completed 200 OK in 7ms (ActiveRecord: 3.2ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 5]] Connecting to database specified by database.yml  (0.7ms) select sqlite_version(*)  (5.6ms) DROP TABLE "users"  (3.0ms) 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)   (0.1ms) begin transaction SQL (1.9ms) 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", "a1s2d31969"]]  (3.0ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d31969"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.8ms) Completed 403 Forbidden in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d36064"]]  (2.9ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d36064"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d36064' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ' WHERE "users"."id" = 2  (3.0ms) commit transaction Completed 200 OK in 12ms (ActiveRecord: 3.4ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) begin transaction SQL (0.1ms) 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", "a1s2d34297"]]  (3.7ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d34297"} Completed 403 Forbidden in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d35885"]]  (4.4ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1ms (ActiveRecord: 0.1ms)  (0.0ms) begin transaction SQL (0.1ms) 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", "a1s2d39447"]]  (3.6ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d39447"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d39447' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 5  (3.1ms) commit transaction Completed 200 OK in 7ms (ActiveRecord: 3.4ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 5]] Started GET "/" for 127.0.0.1 at 2013-09-16 13:43:51 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 1ms (Views: 1.2ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:51 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-16 13:43:51 +0000 Started GET "/auth/gds/callback?code=4cd55425411f5f17191049bf5a5b0b88fb17587557e24b248875998935813c69&state=88e2aa542b830685b71793311d588c9fb868c49b063d6617" for 127.0.0.1 at 2013-09-16 13:43:52 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"4cd55425411f5f17191049bf5a5b0b88fb17587557e24b248875998935813c69", "state"=>"88e2aa542b830685b71793311d588c9fb868c49b063d6617"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction 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"]]  (3.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 13ms (ActiveRecord: 7.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:52 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:52 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-16 13:43:52 +0000 Started GET "/auth/gds/callback?code=f540a8943ce23cc5af7291b757c22235707e603d5a5f561d6d837db04b99d7f8&state=4e1ed685832c88d85150aec0809fe136bc587590149ed46b" for 127.0.0.1 at 2013-09-16 13:43:52 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"f540a8943ce23cc5af7291b757c22235707e603d5a5f561d6d837db04b99d7f8", "state"=>"4e1ed685832c88d85150aec0809fe136bc587590149ed46b"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 44ms (ActiveRecord: 7.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:52 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:52 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-16 13:43:52 +0000 Started GET "/auth/gds/callback?code=b796d9db1611e33c6f642258e238c1acbfcc20ca270a4d167fc3b8320859e562&state=108cbb9bcd9f995597cdf670f6c29304e2a023677c52f1c2" for 127.0.0.1 at 2013-09-16 13:43:53 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"b796d9db1611e33c6f642258e238c1acbfcc20ca270a4d167fc3b8320859e562", "state"=>"108cbb9bcd9f995597cdf670f6c29304e2a023677c52f1c2"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15ms (ActiveRecord: 8.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:53 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-16 13:43:53 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-16 13:43:53 +0000 Started GET "/auth/gds/callback?code=d97d65756eb1e88462c295525367febf92e10b5d30cafa8ed486211fa6d83742&state=e6d8e85324bab268370a322643ac4145aecd15e2813b7e87" for 127.0.0.1 at 2013-09-16 13:43:53 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"d97d65756eb1e88462c295525367febf92e10b5d30cafa8ed486211fa6d83742", "state"=>"e6d8e85324bab268370a322643ac4145aecd15e2813b7e87"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.9ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 15ms (ActiveRecord: 7.4ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-16 13:43:53 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-16 13:43:53 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-16 13:43:53 +0000 Started GET "/auth/gds/callback?code=55bd5f47a39b8ec4e6258331208190d0c888ee1016c67f24ef5011b3f011b811&state=29b7c8f8436a98cf04140436d32a2a0dbac1fde0d1d631ec" for 127.0.0.1 at 2013-09-16 13:43:53 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"55bd5f47a39b8ec4e6258331208190d0c888ee1016c67f24ef5011b3f011b811", "state"=>"29b7c8f8436a98cf04140436d32a2a0dbac1fde0d1d631ec"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.6ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 14ms (ActiveRecord: 7.7ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-16 13:43:53 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:53 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-16 13:43:53 +0000 Started GET "/auth/gds/callback?code=ca935d837cf7b6d476023db86acbf743a187e97c4771d246a4a3b9c1e74ba772&state=0cd65d47b189d50037b1e0f44fa8098cf5de72f8234cb390" for 127.0.0.1 at 2013-09-16 13:43:54 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"ca935d837cf7b6d476023db86acbf743a187e97c4771d246a4a3b9c1e74ba772", "state"=>"0cd65d47b189d50037b1e0f44fa8098cf5de72f8234cb390"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16ms (ActiveRecord: 8.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:54 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.0ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:54 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 3ms (Views: 1.8ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-09-16 13:43:54 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:54 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-16 13:43:54 +0000 Started GET "/auth/gds/callback?code=14b4757002e4edec2988e34d70e04c5a6668d8de1f707ed69715b8a7b0b277e0&state=f83f76a95d9d502514e8b18ef26e5c5633fa201735582379" for 127.0.0.1 at 2013-09-16 13:43:54 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"14b4757002e4edec2988e34d70e04c5a6668d8de1f707ed69715b8a7b0b277e0", "state"=>"f83f76a95d9d502514e8b18ef26e5c5633fa201735582379"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.4ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16ms (ActiveRecord: 8.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:54 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:54 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-16 13:43:54 +0000 Started GET "/auth/gds/callback?code=de6654fc8171cdde1193e757faf0d123bf19da9f222f3a10a0bbf76c612bd2af&state=5fca6928f35151486626a2c964b69906658e222439a0448b" for 127.0.0.1 at 2013-09-16 13:43:54 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"de6654fc8171cdde1193e757faf0d123bf19da9f222f3a10a0bbf76c612bd2af", "state"=>"5fca6928f35151486626a2c964b69906658e222439a0448b"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15ms (ActiveRecord: 7.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:54 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-17 09:48:54 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-17 09:48:54 +0000 Started GET "/auth/gds/callback?code=210fe92b3031924190d42cac8ae62872432a561c37db5b949c6c401151a640a1&state=9d88db5b8bc8173164ee381d06ba0a0014edf2b038277951" for 127.0.0.1 at 2013-09-17 09:48:54 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"210fe92b3031924190d42cac8ae62872432a561c37db5b949c6c401151a640a1", "state"=>"9d88db5b8bc8173164ee381d06ba0a0014edf2b038277951"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.4ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.6ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.5ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 46ms (ActiveRecord: 7.9ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-17 09:48:54 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:54 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-16 13:43:54 +0000 Started GET "/auth/gds/callback?code=7435f598318f6156aef6f49a3890c45b1c3590461698af63d3403dcf5b4f0e2f&state=4563da7f010b0a616b1f2e63414581cc5d055df8a431f06d" for 127.0.0.1 at 2013-09-16 13:43:55 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7435f598318f6156aef6f49a3890c45b1c3590461698af63d3403dcf5b4f0e2f", "state"=>"4563da7f010b0a616b1f2e63414581cc5d055df8a431f06d"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15ms (ActiveRecord: 7.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:55 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-17 09:38:55 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:55 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed in 2ms Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:55 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-16 13:43:55 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:55 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 7ms Started GET "/restricted" for 127.0.0.1 at 2013-09-16 13:43:55 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.7ms) commit transaction Completed 200 OK in 35ms (Views: 0.2ms | ActiveRecord: 7.3ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-16 13:43:55 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.4ms) commit transaction Completed 200 OK in 35ms (Views: 0.2ms | ActiveRecord: 7.2ms) Connecting to database specified by database.yml  (0.7ms) select sqlite_version(*)  (14.3ms) DROP TABLE "users"  (11.7ms) 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)   (0.1ms) begin transaction SQL (2.0ms) 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", "a1s2d39228"]]  (10.7ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d39228"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.7ms) Completed 403 Forbidden in 21ms (Views: 20.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d34759"]]  (11.3ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d34759"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d34759' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ' WHERE "users"."id" = 2  (11.9ms) commit transaction Completed 200 OK in 20ms (ActiveRecord: 12.3ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) begin transaction SQL (0.1ms) 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", "a1s2d36361"]]  (32.4ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d36361"} Completed 403 Forbidden in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d32615"]]  (11.5ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1ms (ActiveRecord: 0.2ms)  (0.0ms) begin transaction 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", "a1s2d39189"]]  (12.0ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d39189"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d39189' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 5  (12.0ms) commit transaction Completed 200 OK in 16ms (ActiveRecord: 12.4ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 5]] Started GET "/" for 127.0.0.1 at 2013-09-23 11:30:45 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 1ms (Views: 1.2ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:45 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 11:30:45 +0000 Started GET "/auth/gds/callback?code=bdee3e71c9f2f13d411966be940130266e796aab92a2b4e2b21252d868dda087&state=dfebadce4a162af9389ba8874be6579ce1b711176de75971" for 127.0.0.1 at 2013-09-23 11:30:46 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"bdee3e71c9f2f13d411966be940130266e796aab92a2b4e2b21252d868dda087", "state"=>"dfebadce4a162af9389ba8874be6579ce1b711176de75971"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction 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"]]  (3.6ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 14ms (ActiveRecord: 6.9ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:46 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:46 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 11:30:46 +0000 Started GET "/auth/gds/callback?code=ead45bb6be335fbd5c0e6189e912ddc74622c31dd13aa0fdbfd8d064cef55fad&state=3c4b825384b5576836abc0eb698312b41eb20ff0e291c7b4" for 127.0.0.1 at 2013-09-23 11:30:46 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"ead45bb6be335fbd5c0e6189e912ddc74622c31dd13aa0fdbfd8d064cef55fad", "state"=>"3c4b825384b5576836abc0eb698312b41eb20ff0e291c7b4"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.7ms) commit transaction  (0.0ms) begin transaction  (0.3ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 45ms (ActiveRecord: 8.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:46 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:46 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 11:30:46 +0000 Started GET "/auth/gds/callback?code=609fcdc1a2297ee45c2a60e54efc93b0f7de9f608c6c463b52cd01a4d8869525&state=cfc88f934b9f9b00d3dadeeda67c3db641988c63df97b47e" for 127.0.0.1 at 2013-09-23 11:30:47 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"609fcdc1a2297ee45c2a60e54efc93b0f7de9f608c6c463b52cd01a4d8869525", "state"=>"cfc88f934b9f9b00d3dadeeda67c3db641988c63df97b47e"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16ms (ActiveRecord: 9.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:47 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-23 11:30:47 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 11:30:47 +0000 Started GET "/auth/gds/callback?code=6f2be0abb02c49562330b9cc643173e8f81daf92e985ca1482ea1054104a024f&state=0b7cae04d7db420a81f7a96c4018f7de7595bf43f6ad052a" for 127.0.0.1 at 2013-09-23 11:30:47 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"6f2be0abb02c49562330b9cc643173e8f81daf92e985ca1482ea1054104a024f", "state"=>"0b7cae04d7db420a81f7a96c4018f7de7595bf43f6ad052a"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.5ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 17ms (ActiveRecord: 9.6ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-23 11:30:47 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-23 11:30:47 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 11:30:47 +0000 Started GET "/auth/gds/callback?code=ac955142e56830c27a94ef2a82563e46d2325cfee4bdfa95f4307d36767f436c&state=f77a1c0438590e2eeb8615ec7d5ffca3d19ab548b57ba9ed" for 127.0.0.1 at 2013-09-23 11:30:47 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"ac955142e56830c27a94ef2a82563e46d2325cfee4bdfa95f4307d36767f436c", "state"=>"f77a1c0438590e2eeb8615ec7d5ffca3d19ab548b57ba9ed"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.6ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 16ms (ActiveRecord: 9.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-23 11:30:47 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:47 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 11:30:47 +0000 Started GET "/auth/gds/callback?code=05d3e5b0dd2b3dfe7171a66b8c5962549bee156c8a9976b74841641d8385d7b8&state=eb6e4ae8f6ef2c9dd607917e0fed0cfe5c7099508d8f573a" for 127.0.0.1 at 2013-09-23 11:30:48 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"05d3e5b0dd2b3dfe7171a66b8c5962549bee156c8a9976b74841641d8385d7b8", "state"=>"eb6e4ae8f6ef2c9dd607917e0fed0cfe5c7099508d8f573a"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17ms (ActiveRecord: 9.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:48 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.7ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:48 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 3ms (Views: 1.7ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-09-23 11:30:48 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:48 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 11:30:48 +0000 Started GET "/auth/gds/callback?code=8448e7fe5f7a7953e45de6fc9acf910e47aa26eaf5358a30e3c161993129fb60&state=a8e8575a54e33efff78fda39f092646b1b8f8338e2b7f3a6" for 127.0.0.1 at 2013-09-23 11:30:48 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"8448e7fe5f7a7953e45de6fc9acf910e47aa26eaf5358a30e3c161993129fb60", "state"=>"a8e8575a54e33efff78fda39f092646b1b8f8338e2b7f3a6"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17ms (ActiveRecord: 10.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:48 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:48 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 11:30:48 +0000 Started GET "/auth/gds/callback?code=8d6a586ed25f31979a6882b59fbf1b16f3a5c867a55c5dcd3535c8c877ace626&state=b9c54448a1c07decba8f60ffe97bc07f523ead372e9b8045" for 127.0.0.1 at 2013-09-23 11:30:48 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"8d6a586ed25f31979a6882b59fbf1b16f3a5c867a55c5dcd3535c8c877ace626", "state"=>"b9c54448a1c07decba8f60ffe97bc07f523ead372e9b8045"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17ms (ActiveRecord: 9.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:48 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-24 07:35:48 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-24 07:35:48 +0000 Started GET "/auth/gds/callback?code=fa39c2668673b8005193ff4b2dd82df3c95bfa71f25a5acab21a1c4446fe23f4&state=4c494cabb99675828db85230c1b041df8d9525354d4f969e" for 127.0.0.1 at 2013-09-24 07:35:48 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"fa39c2668673b8005193ff4b2dd82df3c95bfa71f25a5acab21a1c4446fe23f4", "state"=>"4c494cabb99675828db85230c1b041df8d9525354d4f969e"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15ms (ActiveRecord: 9.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-24 07:35:48 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:48 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 11:30:48 +0000 Started GET "/auth/gds/callback?code=9da24ac5af0bc125433ecc9524db2068ff3549eeadf2a22a78177dfafadebbb3&state=2be262b2d2ed96e507a8908b23ba2c554e6e9b1dbec84be5" for 127.0.0.1 at 2013-09-23 11:30:49 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"9da24ac5af0bc125433ecc9524db2068ff3549eeadf2a22a78177dfafadebbb3", "state"=>"2be262b2d2ed96e507a8908b23ba2c554e6e9b1dbec84be5"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16ms (ActiveRecord: 9.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:49 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-24 07:25:49 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:49 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed in 2ms Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:49 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-23 11:30:49 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:49 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 7ms Started GET "/restricted" for 127.0.0.1 at 2013-09-23 11:30:49 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.8ms) commit transaction Completed 200 OK in 38ms (Views: 0.2ms | ActiveRecord: 9.5ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-23 11:30:49 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.9ms) commit transaction Completed 200 OK in 38ms (Views: 0.2ms | ActiveRecord: 8.4ms) Connecting to database specified by database.yml  (0.8ms) select sqlite_version(*)  (13.3ms) DROP TABLE "users"  (31.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)   (0.1ms) begin transaction SQL (1.9ms) 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", "a1s2d3884"]]  (10.3ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d3884"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.8ms) Completed 403 Forbidden in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d35734"]]  (37.5ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d35734"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d35734' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ' WHERE "users"."id" = 2  (17.0ms) commit transaction Completed 200 OK in 25ms (ActiveRecord: 17.4ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) begin transaction 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", "a1s2d34199"]]  (18.8ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d34199"} Completed 403 Forbidden in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d31081"]]  (8.6ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1ms (ActiveRecord: 0.2ms)  (0.0ms) begin transaction 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", "a1s2d32250"]]  (3.6ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d32250"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d32250' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 5  (2.7ms) commit transaction Completed 200 OK in 6ms (ActiveRecord: 3.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 5]] Started GET "/" for 127.0.0.1 at 2013-09-23 12:37:30 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 1ms (Views: 1.2ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:30 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 12:37:30 +0000 Started GET "/auth/gds/callback?code=055c5e5115e535a3c909d62315c3a6db0a7e15ffcde8e329fc71ea9a170be736&state=d8a52901859ffbc4a2c48a2e109b6ff5cbc3a832b3c4bbf9" for 127.0.0.1 at 2013-09-23 12:37:31 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"055c5e5115e535a3c909d62315c3a6db0a7e15ffcde8e329fc71ea9a170be736", "state"=>"d8a52901859ffbc4a2c48a2e109b6ff5cbc3a832b3c4bbf9"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction 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"]]  (5.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 14ms (ActiveRecord: 8.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:31 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:31 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 12:37:31 +0000 Started GET "/auth/gds/callback?code=9884bd0f7c963f4c38422c50e6283674378e49a7c38d54e296b1433ebe99b03b&state=3181d316ff573488c20bda39399d6ea5063e89380d6f3143" for 127.0.0.1 at 2013-09-23 12:37:32 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"9884bd0f7c963f4c38422c50e6283674378e49a7c38d54e296b1433ebe99b03b", "state"=>"3181d316ff573488c20bda39399d6ea5063e89380d6f3143"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.1ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 45ms (ActiveRecord: 8.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:32 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:32 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 12:37:32 +0000 Started GET "/auth/gds/callback?code=80d8dc624d65622878e4c3c1eb174e4d28c9b1d9e7319c83335f0eaf572e313d&state=e5a89af3fa88ea720177be4b7946de40693fb0096820a0ac" for 127.0.0.1 at 2013-09-23 12:37:32 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"80d8dc624d65622878e4c3c1eb174e4d28c9b1d9e7319c83335f0eaf572e313d", "state"=>"e5a89af3fa88ea720177be4b7946de40693fb0096820a0ac"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 14ms (ActiveRecord: 7.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:32 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-23 12:37:32 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 12:37:32 +0000 Started GET "/auth/gds/callback?code=da4935f3727a513cfcd258d36bd769a429bba53972f7c6ab59c68892616aa513&state=dcfc1695bf5b9a894de6b703a7f69b4ebe772a9b03a07a5d" for 127.0.0.1 at 2013-09-23 12:37:32 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"da4935f3727a513cfcd258d36bd769a429bba53972f7c6ab59c68892616aa513", "state"=>"dcfc1695bf5b9a894de6b703a7f69b4ebe772a9b03a07a5d"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.6ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 14ms (ActiveRecord: 7.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-23 12:37:32 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-23 12:37:32 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 12:37:32 +0000 Started GET "/auth/gds/callback?code=7c321cd30d0c43ab2851a7cc3d6687ab5bbe3afd7847cafd6fad512cb8e2d6e2&state=2bddf3a79f4b65e60bbb5c565430b36326a9d0fa94816b20" for 127.0.0.1 at 2013-09-23 12:37:33 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7c321cd30d0c43ab2851a7cc3d6687ab5bbe3afd7847cafd6fad512cb8e2d6e2", "state"=>"2bddf3a79f4b65e60bbb5c565430b36326a9d0fa94816b20"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (12.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (11.9ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 31ms (ActiveRecord: 24.4ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-23 12:37:33 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:33 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 12:37:33 +0000 Started GET "/auth/gds/callback?code=0c3b23240b97cb7d99126dd2c3397a06fc3f8c531a47fabaf9e39ab7f9d9a001&state=59102a409f214d76343f2ce4108ae7ebe90d6ee8b20f2893" for 127.0.0.1 at 2013-09-23 12:37:33 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"0c3b23240b97cb7d99126dd2c3397a06fc3f8c531a47fabaf9e39ab7f9d9a001", "state"=>"59102a409f214d76343f2ce4108ae7ebe90d6ee8b20f2893"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (12.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (12.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 32ms (ActiveRecord: 25.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:33 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (10.2ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:33 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-09-23 12:37:33 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:33 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 12:37:33 +0000 Started GET "/auth/gds/callback?code=4aa78db028388035a6cfee00434bd3310848e6a5c4a368f779f40522b1a04979&state=58e4edf72f862d640aa271c8e9d89ce0a8353d20ce87c272" for 127.0.0.1 at 2013-09-23 12:37:33 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"4aa78db028388035a6cfee00434bd3310848e6a5c4a368f779f40522b1a04979", "state"=>"58e4edf72f862d640aa271c8e9d89ce0a8353d20ce87c272"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 14ms (ActiveRecord: 7.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:33 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:33 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 12:37:33 +0000 Started GET "/auth/gds/callback?code=b7d909b346c327e4bf227637f560ed19c90ae5e712188df5a1ae8b52d5046405&state=f5d58cc9029dc6607e7899f4e3dd7e87b0532d8a63b7599e" for 127.0.0.1 at 2013-09-23 12:37:34 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"b7d909b346c327e4bf227637f560ed19c90ae5e712188df5a1ae8b52d5046405", "state"=>"f5d58cc9029dc6607e7899f4e3dd7e87b0532d8a63b7599e"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 14ms (ActiveRecord: 7.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:34 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-24 08:42:34 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-24 08:42:34 +0000 Started GET "/auth/gds/callback?code=6b11da83c5d76f81708ed1270ff93c01018676674569959874aed9665f7c7e82&state=230300d21864fdb6e3a47558d0fb7882da07dac4e6f23ed7" for 127.0.0.1 at 2013-09-24 08:42:34 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"6b11da83c5d76f81708ed1270ff93c01018676674569959874aed9665f7c7e82", "state"=>"230300d21864fdb6e3a47558d0fb7882da07dac4e6f23ed7"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 13ms (ActiveRecord: 7.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-24 08:42:34 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:34 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-23 12:37:34 +0000 Started GET "/auth/gds/callback?code=1ef0a5ea47e0d6b21764f34294b0c4801f007d0cfd868196677ed5504b5b7fe2&state=d94b355bbd641f86ce4a1749a6df73097dccc4f83dc0cab1" for 127.0.0.1 at 2013-09-23 12:37:34 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"1ef0a5ea47e0d6b21764f34294b0c4801f007d0cfd868196677ed5504b5b7fe2", "state"=>"d94b355bbd641f86ce4a1749a6df73097dccc4f83dc0cab1"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15ms (ActiveRecord: 7.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:34 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-24 08:32:34 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:34 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed in 2ms Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:34 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-23 12:37:34 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:34 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 7ms Started GET "/restricted" for 127.0.0.1 at 2013-09-23 12:37:34 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.6ms) commit transaction Completed 200 OK in 34ms (Views: 0.2ms | ActiveRecord: 7.5ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-23 12:37:34 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.9ms) commit transaction Completed 200 OK in 36ms (Views: 0.2ms | ActiveRecord: 7.1ms) Connecting to database specified by database.yml  (0.8ms) select sqlite_version(*)  (24.4ms) DROP TABLE "users"  (11.7ms) 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)   (0.1ms) begin transaction SQL (2.1ms) 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", "a1s2d37458"]]  (18.8ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d37458"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (1.0ms) Completed 403 Forbidden in 15ms (Views: 14.4ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d32480"]]  (19.3ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d32480"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d32480' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ' WHERE "users"."id" = 2  (32.4ms) commit transaction Completed 200 OK in 98ms (ActiveRecord: 32.8ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) begin transaction 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", "a1s2d32629"]]  (15.3ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d32629"} Completed 403 Forbidden in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d37907"]]  (23.5ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1ms (ActiveRecord: 0.2ms)  (0.0ms) begin transaction 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", "a1s2d33618"]]  (37.5ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d33618"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d33618' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 5  (13.8ms) commit transaction Completed 200 OK in 18ms (ActiveRecord: 14.2ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 5]] Started GET "/" for 127.0.0.1 at 2013-09-30 12:48:18 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:18 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-30 12:48:18 +0000 Started GET "/auth/gds/callback?code=d484013d97e38f16404fc0b9c63d8cd742a8d99cf1d84d1f9b064066d028a420&state=b4c00acff89a7cb5ce2174417668700c4382dc3e73e8bb9e" for 127.0.0.1 at 2013-09-30 12:48:19 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"d484013d97e38f16404fc0b9c63d8cd742a8d99cf1d84d1f9b064066d028a420", "state"=>"b4c00acff89a7cb5ce2174417668700c4382dc3e73e8bb9e"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction 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"]]  (4.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 14ms (ActiveRecord: 7.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:19 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:19 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-30 12:48:19 +0000 Started GET "/auth/gds/callback?code=f1f7d684f3b2ee4a232c6a1a1f0b047ec671a2c989f6e4a3511493c143ffdf23&state=a2b093684d5cae367f7a8f53ba37a4f7afbffd063701fc81" for 127.0.0.1 at 2013-09-30 12:48:20 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"f1f7d684f3b2ee4a232c6a1a1f0b047ec671a2c989f6e4a3511493c143ffdf23", "state"=>"a2b093684d5cae367f7a8f53ba37a4f7afbffd063701fc81"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.8ms) commit transaction  (0.0ms) begin transaction  (0.3ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 48ms (ActiveRecord: 8.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:20 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:20 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-30 12:48:20 +0000 Started GET "/auth/gds/callback?code=bac9627d46507ebb2f947e603592f753b0bf746e9595b438463c968ee2f222e3&state=d0b9b796ce713b154d0eacadba38d2f6de8bd94f6cc204d0" for 127.0.0.1 at 2013-09-30 12:48:20 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"bac9627d46507ebb2f947e603592f753b0bf746e9595b438463c968ee2f222e3", "state"=>"d0b9b796ce713b154d0eacadba38d2f6de8bd94f6cc204d0"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 14ms (ActiveRecord: 7.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:20 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-30 12:48:20 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-30 12:48:20 +0000 Started GET "/auth/gds/callback?code=d1df3abf2b5a516a4febdc2e1159d3a20e033a0817f43c7061895f7aa82b1985&state=5a5a0416a0aaa51cb6ec52a1ff4f13dca69579076610c963" for 127.0.0.1 at 2013-09-30 12:48:20 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"d1df3abf2b5a516a4febdc2e1159d3a20e033a0817f43c7061895f7aa82b1985", "state"=>"5a5a0416a0aaa51cb6ec52a1ff4f13dca69579076610c963"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.2ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 16ms (ActiveRecord: 7.6ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-30 12:48:20 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-30 12:48:20 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-30 12:48:20 +0000 Started GET "/auth/gds/callback?code=1560bb6c2536efa132f1b279c9687bdfca58ff36ff263be0e30d4996798a091e&state=882f3aff87783aef08fc533e8b08722a852112256b248753" for 127.0.0.1 at 2013-09-30 12:48:20 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"1560bb6c2536efa132f1b279c9687bdfca58ff36ff263be0e30d4996798a091e", "state"=>"882f3aff87783aef08fc533e8b08722a852112256b248753"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.3ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.4ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 30ms (ActiveRecord: 8.3ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-30 12:48:21 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:21 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-30 12:48:21 +0000 Started GET "/auth/gds/callback?code=79eeefafa5ba2723361a415e9a90261a57aaba45793a711b2783bf6d11c60f5e&state=8df4f2ec3f7940d348fa004eb56bed7e3a38768376631c24" for 127.0.0.1 at 2013-09-30 12:48:21 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"79eeefafa5ba2723361a415e9a90261a57aaba45793a711b2783bf6d11c60f5e", "state"=>"8df4f2ec3f7940d348fa004eb56bed7e3a38768376631c24"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (16.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 28ms (ActiveRecord: 20.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:21 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.8ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:21 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-09-30 12:48:21 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:21 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-30 12:48:21 +0000 Started GET "/auth/gds/callback?code=d2f3535c89a462e478c76136a836413487510740cc6400f942163be5f9dd4d37&state=47bb6b00c720cb4c552b258f8010598e3c401ae5c456d4b2" for 127.0.0.1 at 2013-09-30 12:48:21 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"d2f3535c89a462e478c76136a836413487510740cc6400f942163be5f9dd4d37", "state"=>"47bb6b00c720cb4c552b258f8010598e3c401ae5c456d4b2"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (21.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 32ms (ActiveRecord: 25.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:21 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:21 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-30 12:48:21 +0000 Started GET "/auth/gds/callback?code=2682deac4667cce26808ee90e880ab6bc6455e8f585fadd1401a436f657e36c0&state=2982124f0b79ec5783a634b5bddeb2a7b6eb251db7dc3a00" for 127.0.0.1 at 2013-09-30 12:48:22 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"2682deac4667cce26808ee90e880ab6bc6455e8f585fadd1401a436f657e36c0", "state"=>"2982124f0b79ec5783a634b5bddeb2a7b6eb251db7dc3a00"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17ms (ActiveRecord: 8.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:22 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-01 08:53:22 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-01 08:53:22 +0000 Started GET "/auth/gds/callback?code=6cf1c043bdd35b99a550550e17abfb9a4ea606bb37efb4733db0fe5acb9e22af&state=0639a411cf813df9283c79cf0db70c7669476d1e018dc93d" for 127.0.0.1 at 2013-10-01 08:53:22 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"6cf1c043bdd35b99a550550e17abfb9a4ea606bb37efb4733db0fe5acb9e22af", "state"=>"0639a411cf813df9283c79cf0db70c7669476d1e018dc93d"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (23.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (20.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 52ms (ActiveRecord: 44.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-01 08:53:22 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:22 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-09-30 12:48:22 +0000 Started GET "/auth/gds/callback?code=f7759babbc6cdea65fee47ee0424df5f1605d0706e70c345133211bd323101ef&state=32573a9fc99b5ceae14cce6a793620ace6e2e008033ebc73" for 127.0.0.1 at 2013-09-30 12:48:22 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"f7759babbc6cdea65fee47ee0424df5f1605d0706e70c345133211bd323101ef", "state"=>"32573a9fc99b5ceae14cce6a793620ace6e2e008033ebc73"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16ms (ActiveRecord: 8.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:22 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-01 08:43:22 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:22 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed in 2ms Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:22 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-30 12:48:22 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:22 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 7ms Started GET "/restricted" for 127.0.0.1 at 2013-09-30 12:48:23 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.9ms) commit transaction Completed 200 OK in 38ms (Views: 0.2ms | ActiveRecord: 8.7ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-09-30 12:48:23 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (7.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.9ms) commit transaction Completed 200 OK in 52ms (Views: 0.2ms | ActiveRecord: 11.2ms) Connecting to database specified by database.yml  (1.0ms) select sqlite_version(*)  (7.9ms) DROP TABLE "users"  (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)   (0.1ms) begin transaction SQL (2.7ms) 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", "a1s2d33503"]]  (3.2ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d33503"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (1.2ms) Completed 403 Forbidden in 10ms (Views: 9.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d37801"]]  (3.6ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d37801"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d37801' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ' WHERE "users"."id" = 2  (3.2ms) commit transaction Completed 200 OK in 12ms (ActiveRecord: 3.5ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) begin transaction 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", "a1s2d38543"]]  (3.5ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d38543"} Completed 403 Forbidden in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d32466"]]  (3.5ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1ms (ActiveRecord: 0.1ms)  (0.0ms) begin transaction SQL (0.1ms) 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", "a1s2d38600"]]  (2.9ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d38600"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d38600' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 5  (2.7ms) commit transaction Completed 200 OK in 7ms (ActiveRecord: 3.0ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 5]] Started GET "/" for 127.0.0.1 at 2013-10-02 15:26:12 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:12 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-02 15:26:12 +0000 Started GET "/auth/gds/callback?code=7d15e1520c4dda96d8658b721b6902d7f79e59bd9011f6256320b484f2c7b980&state=84d29007268fb84523e04a0ef2dc3d9796634e7dec2a5a32" for 127.0.0.1 at 2013-10-02 15:26:13 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7d15e1520c4dda96d8658b721b6902d7f79e59bd9011f6256320b484f2c7b980", "state"=>"84d29007268fb84523e04a0ef2dc3d9796634e7dec2a5a32"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction 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"]]  (3.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 12ms (ActiveRecord: 6.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:14 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:14 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-02 15:26:14 +0000 Started GET "/auth/gds/callback?code=08bb64663aef878a49f6a4dbdd5e6fd1a4a8dabbece06b09f3af900604674745&state=dd24d6bc43769a17fcaee9a83a269a4548e875e1463ab159" for 127.0.0.1 at 2013-10-02 15:26:14 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"08bb64663aef878a49f6a4dbdd5e6fd1a4a8dabbece06b09f3af900604674745", "state"=>"dd24d6bc43769a17fcaee9a83a269a4548e875e1463ab159"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.3ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 47ms (ActiveRecord: 8.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:14 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:14 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-02 15:26:14 +0000 Started GET "/auth/gds/callback?code=fd3cb17aabfd5fd329298c80492d9c5e1edca43098f629cbd25267d1c7ef22ff&state=f371d9d4389b16937d81d39a9c2083ceeba444fa63686084" for 127.0.0.1 at 2013-10-02 15:26:14 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"fd3cb17aabfd5fd329298c80492d9c5e1edca43098f629cbd25267d1c7ef22ff", "state"=>"f371d9d4389b16937d81d39a9c2083ceeba444fa63686084"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15ms (ActiveRecord: 7.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:14 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-02 15:26:14 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-02 15:26:14 +0000 Started GET "/auth/gds/callback?code=a40b525e5ba17e73fdbe6b5d206b0505908e4bf9dbf656c04acf00249f0eca49&state=5afd1b2d20fd3f7b958d2f05faedf85f25b4e6a0396ce1ca" for 127.0.0.1 at 2013-10-02 15:26:15 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"a40b525e5ba17e73fdbe6b5d206b0505908e4bf9dbf656c04acf00249f0eca49", "state"=>"5afd1b2d20fd3f7b958d2f05faedf85f25b4e6a0396ce1ca"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.2ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 16ms (ActiveRecord: 8.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-02 15:26:15 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-02 15:26:15 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-02 15:26:15 +0000 Started GET "/auth/gds/callback?code=12762211dd795628ada82bf246ffd0d1837f3245d645982937d4aa2a23a5524e&state=d15f37cd1a1f10e73ace34f7df2f51390367e09e491cd9b7" for 127.0.0.1 at 2013-10-02 15:26:15 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"12762211dd795628ada82bf246ffd0d1837f3245d645982937d4aa2a23a5524e", "state"=>"d15f37cd1a1f10e73ace34f7df2f51390367e09e491cd9b7"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.5ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 14ms (ActiveRecord: 7.5ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-02 15:26:15 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:15 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-02 15:26:15 +0000 Started GET "/auth/gds/callback?code=729168400275b7ed95cd7d87495234f962ced9f39a494f194315a463b261b207&state=d3ee9a84fac64d20e25bf97c76b4911ab62ded0862a28450" for 127.0.0.1 at 2013-10-02 15:26:15 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"729168400275b7ed95cd7d87495234f962ced9f39a494f194315a463b261b207", "state"=>"d3ee9a84fac64d20e25bf97c76b4911ab62ded0862a28450"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15ms (ActiveRecord: 7.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:15 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.7ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:15 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 3ms (Views: 1.8ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-10-02 15:26:15 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:15 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-02 15:26:15 +0000 Started GET "/auth/gds/callback?code=ccc88fc69647c69a53f872aee0c3d21c0ce01599b8c5bcfe4ae79207dc016752&state=efec1487654ea1c636c503ed9f5cb0730b11692621dd4215" for 127.0.0.1 at 2013-10-02 15:26:15 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"ccc88fc69647c69a53f872aee0c3d21c0ce01599b8c5bcfe4ae79207dc016752", "state"=>"efec1487654ea1c636c503ed9f5cb0730b11692621dd4215"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15ms (ActiveRecord: 8.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:16 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:16 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-02 15:26:16 +0000 Started GET "/auth/gds/callback?code=faef8624a6b69371cf7e207af1b215f16dda59e7a8f669938a4ec555fbf0b153&state=804798fc4266b2e588149e9b51e4f1176699febf620301a1" for 127.0.0.1 at 2013-10-02 15:26:16 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"faef8624a6b69371cf7e207af1b215f16dda59e7a8f669938a4ec555fbf0b153", "state"=>"804798fc4266b2e588149e9b51e4f1176699febf620301a1"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15ms (ActiveRecord: 7.9ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:16 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-03 11:31:16 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-03 11:31:16 +0000 Started GET "/auth/gds/callback?code=253b26881b71c3d54a29f58a4b10aa0c651d70e80f19b1615f3da6b41ed89202&state=deeb55564cc8cdbd526b56d17eff67e8c37959c9da283d9b" for 127.0.0.1 at 2013-10-03 11:31:16 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"253b26881b71c3d54a29f58a4b10aa0c651d70e80f19b1615f3da6b41ed89202", "state"=>"deeb55564cc8cdbd526b56d17eff67e8c37959c9da283d9b"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.3ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 47ms (ActiveRecord: 7.9ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-03 11:31:16 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:16 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-02 15:26:16 +0000 Started GET "/auth/gds/callback?code=75cca67039ce35bfaa00bf812b968e049d8d3e9387f305703df19a024873f11e&state=4ea070cb7db43a9118eb51c9920e3959ac96dbb83205628d" for 127.0.0.1 at 2013-10-02 15:26:16 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"75cca67039ce35bfaa00bf812b968e049d8d3e9387f305703df19a024873f11e", "state"=>"4ea070cb7db43a9118eb51c9920e3959ac96dbb83205628d"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15ms (ActiveRecord: 7.9ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:16 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-03 11:21:16 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:16 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed in 4ms Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:16 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-02 15:26:16 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:16 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 7ms Started GET "/restricted" for 127.0.0.1 at 2013-10-02 15:26:17 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.7ms) commit transaction Completed 200 OK in 37ms (Views: 0.2ms | ActiveRecord: 7.3ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-02 15:26:17 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.3ms) commit transaction Completed 200 OK in 71ms (Views: 0.2ms | ActiveRecord: 7.9ms) Connecting to database specified by database.yml  (0.7ms) select sqlite_version(*)  (6.8ms) DROP TABLE "users"  (3.0ms) 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)   (0.1ms) begin transaction SQL (2.1ms) 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", "a1s2d36132"]]  (4.1ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d36132"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.8ms) Completed 403 Forbidden in 7ms (Views: 6.2ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d3823"]]  (3.2ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d3823"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d3823' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ' WHERE "users"."id" = 2  (4.0ms) commit transaction Completed 200 OK in 12ms (ActiveRecord: 4.3ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) begin transaction 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", "a1s2d32729"]]  (3.0ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d32729"} Completed 403 Forbidden in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d32211"]]  (2.9ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1ms (ActiveRecord: 0.2ms)  (0.0ms) begin transaction 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", "a1s2d39814"]]  (3.5ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d39814"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d39814' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 5  (3.3ms) commit transaction Completed 200 OK in 7ms (ActiveRecord: 3.6ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 5]] Started GET "/" for 127.0.0.1 at 2013-10-04 11:53:03 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 1ms (Views: 1.2ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:03 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-04 11:53:03 +0000 Started GET "/auth/gds/callback?code=420c8437e87daaed288186ffe45158464c83dbc97735000353e0895b1130c2cf&state=e499c377bc1d3cc446906afe1da47cc62faec253f94228db" for 127.0.0.1 at 2013-10-04 11:53:04 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"420c8437e87daaed288186ffe45158464c83dbc97735000353e0895b1130c2cf", "state"=>"e499c377bc1d3cc446906afe1da47cc62faec253f94228db"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction 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"]]  (4.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 14ms (ActiveRecord: 7.9ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:04 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:04 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-04 11:53:04 +0000 Started GET "/auth/gds/callback?code=0beefafe73571b828d506e314137c383b3d9668dc2de2932bffb85df95833f2b&state=282e9bd73eff42035b8745db4110e69a9d8ddff70061d142" for 127.0.0.1 at 2013-10-04 11:53:04 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"0beefafe73571b828d506e314137c383b3d9668dc2de2932bffb85df95833f2b", "state"=>"282e9bd73eff42035b8745db4110e69a9d8ddff70061d142"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.3ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 46ms (ActiveRecord: 8.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:04 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:04 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-04 11:53:04 +0000 Started GET "/auth/gds/callback?code=792120e6a364952401684794fa5ea62930c961998d1938b894a8add846d45404&state=09de51349003ab34c874771932f31a3141578e7c0aa50e8b" for 127.0.0.1 at 2013-10-04 11:53:04 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"792120e6a364952401684794fa5ea62930c961998d1938b894a8add846d45404", "state"=>"09de51349003ab34c874771932f31a3141578e7c0aa50e8b"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16ms (ActiveRecord: 9.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:04 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-04 11:53:05 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-04 11:53:05 +0000 Started GET "/auth/gds/callback?code=804bbe29d7672dcf529c2cf5e1970b419c2c33ade6206583c82f3b9b27417ee7&state=e6ebcaf670c31cec3f168991124dbabcf8456ea4bb0ceade" for 127.0.0.1 at 2013-10-04 11:53:05 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"804bbe29d7672dcf529c2cf5e1970b419c2c33ade6206583c82f3b9b27417ee7", "state"=>"e6ebcaf670c31cec3f168991124dbabcf8456ea4bb0ceade"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.7ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 15ms (ActiveRecord: 7.8ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-04 11:53:05 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-04 11:53:05 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-04 11:53:05 +0000 Started GET "/auth/gds/callback?code=1e02e7105ebdecd3c8ee938a9b8b2f1813affbd5717747ff567aef58a3e46724&state=9fc7cdfa8b0876d4ea180c8d7cea3dbaab9248465ed112fb" for 127.0.0.1 at 2013-10-04 11:53:05 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"1e02e7105ebdecd3c8ee938a9b8b2f1813affbd5717747ff567aef58a3e46724", "state"=>"9fc7cdfa8b0876d4ea180c8d7cea3dbaab9248465ed112fb"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.7ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 14ms (ActiveRecord: 7.3ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-04 11:53:05 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:05 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-04 11:53:05 +0000 Started GET "/auth/gds/callback?code=c79fe0cd5919c3eba88e4c02817e9d608da079f39456cf918179222f2faa8bd6&state=c1d3da5b0ea9e07c111c0a00ed9c33b223dd00ebcdae05c3" for 127.0.0.1 at 2013-10-04 11:53:05 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"c79fe0cd5919c3eba88e4c02817e9d608da079f39456cf918179222f2faa8bd6", "state"=>"c1d3da5b0ea9e07c111c0a00ed9c33b223dd00ebcdae05c3"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15ms (ActiveRecord: 7.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:05 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.8ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:05 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 3ms (Views: 1.8ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-10-04 11:53:05 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:06 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-04 11:53:06 +0000 Started GET "/auth/gds/callback?code=a445b0f78f7fcb96c5f67df707bdda18c8d6f8e255402eb5fdb3fdd4f7107a4e&state=069acacf2707ee34ee8c62fe146e04e956ebe33d63499378" for 127.0.0.1 at 2013-10-04 11:53:06 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"a445b0f78f7fcb96c5f67df707bdda18c8d6f8e255402eb5fdb3fdd4f7107a4e", "state"=>"069acacf2707ee34ee8c62fe146e04e956ebe33d63499378"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15ms (ActiveRecord: 7.9ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:06 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:06 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-04 11:53:06 +0000 Started GET "/auth/gds/callback?code=b36ebf97e8f46ff74a4b4e299cd0b7ec137a9ac1da1d16ff61678ae9fbabbf2c&state=1c2f476c38445734195139417c19d2e9b73ee430defb57c8" for 127.0.0.1 at 2013-10-04 11:53:06 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"b36ebf97e8f46ff74a4b4e299cd0b7ec137a9ac1da1d16ff61678ae9fbabbf2c", "state"=>"1c2f476c38445734195139417c19d2e9b73ee430defb57c8"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15ms (ActiveRecord: 7.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:06 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-05 07:58:06 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-05 07:58:06 +0000 Started GET "/auth/gds/callback?code=c8c9d9275c5b5560573226ea5d01eef7595e50346e92839e991596802f8d790b&state=393045a693c13525b75877dd89eae5cc724385a28399104d" for 127.0.0.1 at 2013-10-05 07:58:06 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"c8c9d9275c5b5560573226ea5d01eef7595e50346e92839e991596802f8d790b", "state"=>"393045a693c13525b75877dd89eae5cc724385a28399104d"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.3ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 46ms (ActiveRecord: 8.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-05 07:58:06 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:06 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-04 11:53:06 +0000 Started GET "/auth/gds/callback?code=bcfadc014c245982fc8a7e1095c083500c27bd2410f1ad4f035fea95489c65f7&state=3a11f2dda7d8a9fb049b21bde7a49664e6cbff428a8d1e0d" for 127.0.0.1 at 2013-10-04 11:53:06 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"bcfadc014c245982fc8a7e1095c083500c27bd2410f1ad4f035fea95489c65f7", "state"=>"3a11f2dda7d8a9fb049b21bde7a49664e6cbff428a8d1e0d"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15ms (ActiveRecord: 7.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:06 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-05 07:48:07 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:07 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed in 2ms Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:07 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-04 11:53:07 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:07 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 7ms Started GET "/restricted" for 127.0.0.1 at 2013-10-04 11:53:07 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.9ms) commit transaction Completed 200 OK in 36ms (Views: 0.2ms | ActiveRecord: 7.5ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-04 11:53:07 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.8ms) commit transaction Completed 200 OK in 37ms (Views: 0.2ms | ActiveRecord: 6.7ms) Connecting to database specified by database.yml  (0.7ms) select sqlite_version(*)  (16.2ms) DROP TABLE "users"  (10.7ms) 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)   (0.1ms) begin transaction SQL (1.7ms) 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", "a1s2d39466"]]  (11.0ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d39466"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.7ms) Completed 403 Forbidden in 5.7ms (Views: 5.2ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d3645"]]  (13.0ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d3645"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d3645' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ' WHERE "users"."id" = 2  (10.6ms) commit transaction Completed 200 OK in 17.7ms (ActiveRecord: 10.9ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) begin transaction SQL (0.1ms) 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", "a1s2d31950"]]  (9.6ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d31950"} Completed 403 Forbidden in 1.5ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d32120"]]  (10.4ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 0.9ms (ActiveRecord: 0.2ms)  (0.0ms) begin transaction SQL (0.1ms) 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", "a1s2d31170"]]  (8.5ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d31170"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d31170' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 5  (7.7ms) commit transaction Completed 200 OK in 11.3ms (ActiveRecord: 8.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 5]] Started GET "/" for 127.0.0.1 at 2013-10-21 08:59:36 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 1.7ms (Views: 1.4ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:36 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 3.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-21 08:59:36 +0000 Started GET "/auth/gds/callback?code=9e4a7c53d9d79a13544760f76b1cac7205cbfac73b00d482dfb3600979635971&state=f1240fbbdb3835d15211c5bb2670afa3d9dcddefaa6f2581" for 127.0.0.1 at 2013-10-21 08:59:37 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"9e4a7c53d9d79a13544760f76b1cac7205cbfac73b00d482dfb3600979635971", "state"=>"f1240fbbdb3835d15211c5bb2670afa3d9dcddefaa6f2581"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction 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"]]  (4.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 14.2ms (ActiveRecord: 7.9ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:37 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:38 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-21 08:59:38 +0000 Started GET "/auth/gds/callback?code=acf9b7b1bd87cda6b6c89084ecbf678bf212173cdab1abf3807bb843f5a44723&state=497cb4bb8a4498b035bc0404bee7583d6950a0b360f044e2" for 127.0.0.1 at 2013-10-21 08:59:38 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"acf9b7b1bd87cda6b6c89084ecbf678bf212173cdab1abf3807bb843f5a44723", "state"=>"497cb4bb8a4498b035bc0404bee7583d6950a0b360f044e2"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.1ms (ActiveRecord: 8.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:38 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:38 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-21 08:59:38 +0000 Started GET "/auth/gds/callback?code=08137148f6a030dcade8fc1c7df6aaace857d94ef1e1763edf8283d732a11ecc&state=c8023e5955ab4278f87310670fcca4eaf03bfb30a1e2c032" for 127.0.0.1 at 2013-10-21 08:59:38 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"08137148f6a030dcade8fc1c7df6aaace857d94ef1e1763edf8283d732a11ecc", "state"=>"c8023e5955ab4278f87310670fcca4eaf03bfb30a1e2c032"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 14.5ms (ActiveRecord: 7.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:38 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 0.9ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-21 08:59:38 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.6ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-21 08:59:38 +0000 Started GET "/auth/gds/callback?code=7be251ef7b108391155bbc351de1350e8977a89897b04b67f965ef2057d46729&state=5a8faaeaddde3ee3bc2fecf27ad00a0f1a0ed90e01dea17b" for 127.0.0.1 at 2013-10-21 08:59:38 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7be251ef7b108391155bbc351de1350e8977a89897b04b67f965ef2057d46729", "state"=>"5a8faaeaddde3ee3bc2fecf27ad00a0f1a0ed90e01dea17b"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.7ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 18.2ms (ActiveRecord: 10.5ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-21 08:59:38 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.8ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-21 08:59:38 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-21 08:59:38 +0000 Started GET "/auth/gds/callback?code=f84048344d9191d02a01569374e42a08dee9cb6955f58664e2f6d21335502d4f&state=dd641334695cfd3cc1077afbb0b729cf985bc659c8f4ede6" for 127.0.0.1 at 2013-10-21 08:59:39 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"f84048344d9191d02a01569374e42a08dee9cb6955f58664e2f6d21335502d4f", "state"=>"dd641334695cfd3cc1077afbb0b729cf985bc659c8f4ede6"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.8ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 16.7ms (ActiveRecord: 9.4ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-21 08:59:39 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.7ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:39 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-21 08:59:39 +0000 Started GET "/auth/gds/callback?code=b543b9ea990a206e79a6897eb1932a9b98279d3bc932a9b14e38e8c6f65b2731&state=544ce6e653ec06a528a7b12f680eb099729f4a6569715fe2" for 127.0.0.1 at 2013-10-21 08:59:39 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"b543b9ea990a206e79a6897eb1932a9b98279d3bc932a9b14e38e8c6f65b2731", "state"=>"544ce6e653ec06a528a7b12f680eb099729f4a6569715fe2"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (6.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.6ms (ActiveRecord: 10.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:39 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.1ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:39 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 2.5ms (Views: 1.7ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-10-21 08:59:39 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.4ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:39 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-21 08:59:39 +0000 Started GET "/auth/gds/callback?code=c414167674321a74ad1460a9fcc4c24b8ecfd612bf209e9c160249c51b02b05c&state=6d4b192a4b2304818d63a0ac5511f3967ba29f9275e35d0d" for 127.0.0.1 at 2013-10-21 08:59:39 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"c414167674321a74ad1460a9fcc4c24b8ecfd612bf209e9c160249c51b02b05c", "state"=>"6d4b192a4b2304818d63a0ac5511f3967ba29f9275e35d0d"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15.4ms (ActiveRecord: 8.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:39 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:39 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-21 08:59:39 +0000 Started GET "/auth/gds/callback?code=0981412c345ec339d41ab7a71727ffb918f19d9d96b39e88d4efa448ab4ddc5b&state=a21c3ff3622ebd028d390eaf4604874b36a4918312bf0708" for 127.0.0.1 at 2013-10-21 08:59:40 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"0981412c345ec339d41ab7a71727ffb918f19d9d96b39e88d4efa448ab4ddc5b", "state"=>"a21c3ff3622ebd028d390eaf4604874b36a4918312bf0708"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (6.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 50.6ms (ActiveRecord: 9.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:40 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-22 05:04:40 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-22 05:04:40 +0000 Started GET "/auth/gds/callback?code=7208885479dedf545807ed283aec1513bb62d9094b6a32ed2d8f8c2f9142f1e1&state=45b0115e837090bbf47e9faec63c064c0f2fd640a454af24" for 127.0.0.1 at 2013-10-22 05:04:40 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7208885479dedf545807ed283aec1513bb62d9094b6a32ed2d8f8c2f9142f1e1", "state"=>"45b0115e837090bbf47e9faec63c064c0f2fd640a454af24"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (6.0ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.8ms (ActiveRecord: 10.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-22 05:04:40 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:40 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-21 08:59:40 +0000 Started GET "/auth/gds/callback?code=4317672d83fe2e79f460d6e347e5e1b7420970edc7386c8a665ddb6de0322854&state=644d45d39ee8eda36f6486f0b22821e0159a0ce0c613983a" for 127.0.0.1 at 2013-10-21 08:59:40 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"4317672d83fe2e79f460d6e347e5e1b7420970edc7386c8a665ddb6de0322854", "state"=>"644d45d39ee8eda36f6486f0b22821e0159a0ce0c613983a"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15.1ms (ActiveRecord: 7.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:40 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-22 04:54:40 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 0.9ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:40 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed in 2.1ms Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:40 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 0.9ms (Views: 0.4ms | ActiveRecord: 0.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-21 08:59:40 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 0.7ms (Views: 0.2ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:40 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 7.1ms Started GET "/restricted" for 127.0.0.1 at 2013-10-21 08:59:40 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.8ms) commit transaction Completed 200 OK in 35.9ms (Views: 0.2ms | ActiveRecord: 7.2ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-21 08:59:40 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.6ms) commit transaction Completed 200 OK in 36.5ms (Views: 0.2ms | ActiveRecord: 7.0ms) Connecting to database specified by database.yml  (0.9ms) select sqlite_version(*)  (9.5ms) DROP TABLE "users"  (3.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "uid" varchar(255) NOT NULL, "email" varchar(255) NOT NULL, "remotely_signed_out" boolean, "permissions" text)   (0.1ms) begin transaction SQL (2.5ms) 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", "a1s2d37932"]]  (5.5ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d37932"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.9ms) Completed 403 Forbidden in 7.7ms (Views: 7.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d36842"]]  (5.6ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d36842"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d36842' LIMIT 1  (0.1ms) begin transaction  (0.3ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ' WHERE "users"."id" = 2  (4.2ms) commit transaction Completed 200 OK in 42.0ms (ActiveRecord: 4.7ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) begin transaction 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", "a1s2d31391"]]  (4.2ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d31391"} Completed 403 Forbidden in 1.9ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.3ms) begin transaction 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", "a1s2d38574"]]  (5.8ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.2ms (ActiveRecord: 0.2ms)  (0.1ms) begin transaction 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", "a1s2d3671"]]  (6.2ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d3671"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d3671' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 5  (5.4ms) commit transaction Completed 200 OK in 10.0ms (ActiveRecord: 5.8ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 5]] Started GET "/" for 127.0.0.1 at 2013-10-29 22:06:47 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 2.4ms (Views: 1.9ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:47 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 3.0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-29 22:06:47 +0000 Started GET "/auth/gds/callback?code=bfad229443ad7f7c502d74dd1855733f173dece7f39002680a485f6de3530cdc&state=fc0b308a709a3db43e2be9c3a6199dcabae1321711cffbaf" for 127.0.0.1 at 2013-10-29 22:06:48 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"bfad229443ad7f7c502d74dd1855733f173dece7f39002680a485f6de3530cdc", "state"=>"fc0b308a709a3db43e2be9c3a6199dcabae1321711cffbaf"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction 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"]]  (4.5ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.3ms (ActiveRecord: 8.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:48 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:48 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-29 22:06:48 +0000 Started GET "/auth/gds/callback?code=c2c08bb86316bb1761eeb0541653a936428c95b3a3a8851505d98d118ffcfcc5&state=09328c483f66a296fe1ddad1daabedc98cb879092dfc0a87" for 127.0.0.1 at 2013-10-29 22:06:48 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"c2c08bb86316bb1761eeb0541653a936428c95b3a3a8851505d98d118ffcfcc5", "state"=>"09328c483f66a296fe1ddad1daabedc98cb879092dfc0a87"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 19.6ms (ActiveRecord: 10.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:48 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:48 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-29 22:06:48 +0000 Started GET "/auth/gds/callback?code=505af0ae594cc55882709086d0cc7ee978a4db8c0b1a746ea75f8e92502e8562&state=3c8d9960c716970b360f9731211ace4e9132e163f0e5404a" for 127.0.0.1 at 2013-10-29 22:06:49 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"505af0ae594cc55882709086d0cc7ee978a4db8c0b1a746ea75f8e92502e8562", "state"=>"3c8d9960c716970b360f9731211ace4e9132e163f0e5404a"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.3ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.8ms (ActiveRecord: 8.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:49 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-29 22:06:49 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.8ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-29 22:06:49 +0000 Started GET "/auth/gds/callback?code=ea532f74d907a78bedf124318d2ecf6786cff724fc7452359397fae5521cfa18&state=417e3e0a955e869d810faade85b70fd2a161428d15f186b7" for 127.0.0.1 at 2013-10-29 22:06:49 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"ea532f74d907a78bedf124318d2ecf6786cff724fc7452359397fae5521cfa18", "state"=>"417e3e0a955e869d810faade85b70fd2a161428d15f186b7"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.3ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.0ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 20.0ms (ActiveRecord: 10.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-29 22:06:49 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3.5ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-29 22:06:49 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-29 22:06:49 +0000 Started GET "/auth/gds/callback?code=07eaba147159a74f8e48e1d1533c3094c0834ea078b062a7c7f93ac6d02a1e05&state=398859ae46c844aceac2371aa2d17491b72de59865a9f0cd" for 127.0.0.1 at 2013-10-29 22:06:49 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"07eaba147159a74f8e48e1d1533c3094c0834ea078b062a7c7f93ac6d02a1e05", "state"=>"398859ae46c844aceac2371aa2d17491b72de59865a9f0cd"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.3ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 18.5ms (ActiveRecord: 10.3ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-29 22:06:49 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:49 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.4ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-29 22:06:49 +0000 Started GET "/auth/gds/callback?code=3c6ddfcc33e241accd76bf8e5663763e7031c8d5ca4c31ca2273ce6c34f5e4da&state=feb1babd82029749d6ea5030b197c904572c49399d069e72" for 127.0.0.1 at 2013-10-29 22:06:50 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"3c6ddfcc33e241accd76bf8e5663763e7031c8d5ca4c31ca2273ce6c34f5e4da", "state"=>"feb1babd82029749d6ea5030b197c904572c49399d069e72"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.6ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.5ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 20.1ms (ActiveRecord: 10.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:50 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.5ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.7ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:50 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 3.3ms (Views: 2.3ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-10-29 22:06:50 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.5ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:50 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-29 22:06:50 +0000 Started GET "/auth/gds/callback?code=e5ee885e58a23fdb741d66ccda0acd550bf1fef0aa0984b1be736fb167cbca1b&state=33b9619b5f2478d1c3165a30ef2695df3e838372d9dc9e1f" for 127.0.0.1 at 2013-10-29 22:06:50 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"e5ee885e58a23fdb741d66ccda0acd550bf1fef0aa0984b1be736fb167cbca1b", "state"=>"33b9619b5f2478d1c3165a30ef2695df3e838372d9dc9e1f"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.7ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (11.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 25.8ms (ActiveRecord: 17.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:50 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:50 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-29 22:06:50 +0000 Started GET "/auth/gds/callback?code=806a4d1546badf92bd4d9c338bac570aed4ff00f0bcdbaf2d4578d1dd02a6ee3&state=9116220569a839ba8c9a2af26a1a0d63057e9a16dfe43b63" for 127.0.0.1 at 2013-10-29 22:06:50 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"806a4d1546badf92bd4d9c338bac570aed4ff00f0bcdbaf2d4578d1dd02a6ee3", "state"=>"9116220569a839ba8c9a2af26a1a0d63057e9a16dfe43b63"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 20.0ms (ActiveRecord: 10.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:50 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.5ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 18:11:50 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 18:11:50 +0000 Started GET "/auth/gds/callback?code=728ce244ce0e13097e1aa5f096e8746469f6045aaf961039bfe9a7c67a9b1a38&state=16466f821199d0f710ad7806aec57d8c14bc3cd03d048ff9" for 127.0.0.1 at 2013-10-30 18:11:50 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"728ce244ce0e13097e1aa5f096e8746469f6045aaf961039bfe9a7c67a9b1a38", "state"=>"16466f821199d0f710ad7806aec57d8c14bc3cd03d048ff9"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.6ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.4ms (ActiveRecord: 9.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 18:11:51 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:51 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-29 22:06:51 +0000 Started GET "/auth/gds/callback?code=d0f7eb08a6e6da864bf58de465cc8dd2a616aedd16e26a0679c3c568d17bb50e&state=5d4789d94f85b07cf5f7cf2af16858959f9003d148b330d1" for 127.0.0.1 at 2013-10-29 22:06:51 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"d0f7eb08a6e6da864bf58de465cc8dd2a616aedd16e26a0679c3c568d17bb50e", "state"=>"5d4789d94f85b07cf5f7cf2af16858959f9003d148b330d1"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.2ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 18.3ms (ActiveRecord: 8.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:51 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 18:01:51 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:51 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed in 2.4ms Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:51 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 1.3ms (Views: 0.5ms | ActiveRecord: 0.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-29 22:06:51 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 0.8ms (Views: 0.2ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:51 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 42.7ms Started GET "/restricted" for 127.0.0.1 at 2013-10-29 22:06:51 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.5ms) commit transaction Completed 200 OK in 42.0ms (Views: 0.3ms | ActiveRecord: 8.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-29 22:06:51 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.3ms) commit transaction Completed 200 OK in 46.6ms (Views: 0.3ms | ActiveRecord: 9.9ms) Connecting to database specified by database.yml  (0.8ms) select sqlite_version(*)  (28.5ms) DROP TABLE "users"  (25.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)   (0.1ms) begin transaction SQL (2.1ms) 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", "a1s2d38009"]]  (3.3ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d38009"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.8ms) Completed 403 Forbidden in 7.1ms (Views: 6.4ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d32094"]]  (3.9ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d32094"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d32094' LIMIT 1  (0.1ms) begin transaction  (0.3ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ' WHERE "users"."id" = 2  (3.3ms) commit transaction Completed 200 OK in 42.6ms (ActiveRecord: 3.9ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) begin transaction 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", "a1s2d33167"]]  (3.1ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d33167"} Completed 403 Forbidden in 2.0ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d32494"]]  (3.7ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.1ms (ActiveRecord: 0.2ms)  (0.1ms) begin transaction 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", "a1s2d32783"]]  (3.0ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d32783"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d32783' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 5  (3.2ms) commit transaction Completed 200 OK in 7.4ms (ActiveRecord: 3.5ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 5]] Started GET "/" for 127.0.0.1 at 2013-10-30 12:47:02 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 2.3ms (Views: 1.9ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:02 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 3.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:47:02 +0000 Started GET "/auth/gds/callback?code=d2f5403fbc91ea3030e53899d8a5cdcdb00b87b8b2cdec0fbf4249e2bd024911&state=30364844d59592c7093d9bbf8795357f145a45e0f583e290" for 127.0.0.1 at 2013-10-30 12:47:03 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"d2f5403fbc91ea3030e53899d8a5cdcdb00b87b8b2cdec0fbf4249e2bd024911", "state"=>"30364844d59592c7093d9bbf8795357f145a45e0f583e290"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction 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"]]  (4.6ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.1ms (ActiveRecord: 8.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:03 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:03 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.4ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:47:03 +0000 Started GET "/auth/gds/callback?code=10c380b3098e063a19552a045434a5d5f1384cb65c412249496d960988780946&state=6951e93169ce9ef0156481380c0fa9a1b64d6bfb32d5f2e4" for 127.0.0.1 at 2013-10-30 12:47:04 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"10c380b3098e063a19552a045434a5d5f1384cb65c412249496d960988780946", "state"=>"6951e93169ce9ef0156481380c0fa9a1b64d6bfb32d5f2e4"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.4ms (ActiveRecord: 7.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:04 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.5ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:04 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:47:04 +0000 Started GET "/auth/gds/callback?code=b141d5daa63c247d164243df3a76c95e34893bfec3df01636af65a29f3fd0bfd&state=dcc2465af505ba91aaa2bd6aadc8893d21750d1f414dc2c0" for 127.0.0.1 at 2013-10-30 12:47:04 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"b141d5daa63c247d164243df3a76c95e34893bfec3df01636af65a29f3fd0bfd", "state"=>"dcc2465af505ba91aaa2bd6aadc8893d21750d1f414dc2c0"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.2ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15.1ms (ActiveRecord: 7.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:04 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 12:47:04 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.8ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:47:04 +0000 Started GET "/auth/gds/callback?code=53b9bbe99988ae378e821ec29cc433f80c53b2de8f8fc501b34f944ec918e046&state=2fa8465b79e1b1f1db534d3fdbfc3b32557109306b933477" for 127.0.0.1 at 2013-10-30 12:47:04 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"53b9bbe99988ae378e821ec29cc433f80c53b2de8f8fc501b34f944ec918e046", "state"=>"2fa8465b79e1b1f1db534d3fdbfc3b32557109306b933477"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.8ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 16.7ms (ActiveRecord: 7.9ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 12:47:04 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3.1ms (Views: 0.5ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 12:47:04 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:47:04 +0000 Started GET "/auth/gds/callback?code=b6702c1af8e5d3ccc2b026c4926cc28bba039cd2e383c5521c19677713b27f26&state=241c3a65bc43b766632a0fe4ca00b8bbab798a7e1e2ef509" for 127.0.0.1 at 2013-10-30 12:47:05 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"b6702c1af8e5d3ccc2b026c4926cc28bba039cd2e383c5521c19677713b27f26", "state"=>"241c3a65bc43b766632a0fe4ca00b8bbab798a7e1e2ef509"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.8ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 16.1ms (ActiveRecord: 8.4ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 12:47:05 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.8ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:05 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:47:05 +0000 Started GET "/auth/gds/callback?code=8aae158a8bfcc0f7c4399be14e452f67c9bb49b2a93fcbc29b71fa7764ff4837&state=7205e6da505664c8bc0f7019b1f69d2831510db6a5ac8098" for 127.0.0.1 at 2013-10-30 12:47:05 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"8aae158a8bfcc0f7c4399be14e452f67c9bb49b2a93fcbc29b71fa7764ff4837", "state"=>"7205e6da505664c8bc0f7019b1f69d2831510db6a5ac8098"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.1ms (ActiveRecord: 7.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:05 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.6ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:05 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 3.3ms (Views: 2.4ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-10-30 12:47:05 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.6ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:05 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:47:05 +0000 Started GET "/auth/gds/callback?code=fdf7b8895211cb1b1457c8546a7549dd3d567e5ee1bd4e9e4b506148f50ad31b&state=c3ae6df21e93f250a51ee1fb53453aa1e31e5ec5e2e61ca3" for 127.0.0.1 at 2013-10-30 12:47:05 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"fdf7b8895211cb1b1457c8546a7549dd3d567e5ee1bd4e9e4b506148f50ad31b", "state"=>"c3ae6df21e93f250a51ee1fb53453aa1e31e5ec5e2e61ca3"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.9ms (ActiveRecord: 9.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:05 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:05 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:47:05 +0000 Started GET "/auth/gds/callback?code=14c75c8302e3908eacf51a6736b4ca9611c7106141cdf51672b09fd68e181211&state=5841214313ea61f08b54dbdb072d16dc7faef82030144e06" for 127.0.0.1 at 2013-10-30 12:47:06 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"14c75c8302e3908eacf51a6736b4ca9611c7106141cdf51672b09fd68e181211", "state"=>"5841214313ea61f08b54dbdb072d16dc7faef82030144e06"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.4ms (ActiveRecord: 8.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:06 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.5ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 08:52:06 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 08:52:06 +0000 Started GET "/auth/gds/callback?code=31e78b521f37d104ee2851c279fd8b9d1f5017f70684c2365fc39cfb5238921e&state=32d9aede2fa12a9e6326080464df63ee312d00eaac51e9ef" for 127.0.0.1 at 2013-10-31 08:52:06 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"31e78b521f37d104ee2851c279fd8b9d1f5017f70684c2365fc39cfb5238921e", "state"=>"32d9aede2fa12a9e6326080464df63ee312d00eaac51e9ef"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.4ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.5ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.9ms (ActiveRecord: 9.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 08:52:06 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:06 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:47:06 +0000 Started GET "/auth/gds/callback?code=7c18d522b58c786c23b3b277b822f2f65f7c3adc7a8f5a16590cb78276e59ed5&state=2d11faaff51a8ba15fc650d30270244d1ca650411d72a7d3" for 127.0.0.1 at 2013-10-30 12:47:06 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7c18d522b58c786c23b3b277b822f2f65f7c3adc7a8f5a16590cb78276e59ed5", "state"=>"2d11faaff51a8ba15fc650d30270244d1ca650411d72a7d3"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 18.4ms (ActiveRecord: 9.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:06 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.5ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 08:42:06 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:06 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed in 2.3ms Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:06 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 1.2ms (Views: 0.5ms | ActiveRecord: 0.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 12:47:06 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 0.9ms (Views: 0.2ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:06 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 8.4ms Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:47:06 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.6ms) commit transaction Completed 200 OK in 39.9ms (Views: 0.3ms | ActiveRecord: 7.6ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 12:47:07 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.8ms) commit transaction Completed 200 OK in 43.3ms (Views: 0.3ms | ActiveRecord: 7.8ms) Connecting to database specified by database.yml  (0.9ms) select sqlite_version(*)  (13.5ms) DROP TABLE "users"  (2.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)   (0.1ms) begin transaction 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", "a1s2d31967"]]  (6.9ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d31967"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.8ms) Completed 403 Forbidden in 7.0ms (Views: 6.3ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d31453"]]  (3.8ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d31453"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d31453' LIMIT 1  (0.1ms) begin transaction  (0.3ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ' WHERE "users"."id" = 2  (3.5ms) commit transaction Completed 200 OK in 40.9ms (ActiveRecord: 4.0ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) begin transaction 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", "a1s2d38552"]]  (4.6ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d38552"} Completed 403 Forbidden in 1.8ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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", "a1s2d33909"]]  (3.8ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.1ms (ActiveRecord: 0.2ms)  (0.1ms) begin transaction 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", "a1s2d33546"]]  (4.3ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d33546"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d33546' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 5  (4.7ms) commit transaction Completed 200 OK in 9.2ms (ActiveRecord: 5.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 5]] Started GET "/" for 127.0.0.1 at 2013-10-30 12:55:14 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 2.3ms (Views: 1.8ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:14 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 3.0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:55:14 +0000 Started GET "/auth/gds/callback?code=5901e6e152958ee53e2eb6ffba820367b7a69d61a225bffaa46c73da31f3e039&state=2fd438af5eb8ce854b275ee647af9c752834e134a09107eb" for 127.0.0.1 at 2013-10-30 12:55:15 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"5901e6e152958ee53e2eb6ffba820367b7a69d61a225bffaa46c73da31f3e039", "state"=>"2fd438af5eb8ce854b275ee647af9c752834e134a09107eb"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction 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"]]  (5.5ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 18.9ms (ActiveRecord: 11.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:15 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:15 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:55:15 +0000 Started GET "/auth/gds/callback?code=71ac7202d4a3f0d357b4839140896cda41c7e2d0764d3eb3e4bf8693947e8e2f&state=0d933dc87568c431e8fcfb945c9380b3d90af4a94becc179" for 127.0.0.1 at 2013-10-30 12:55:15 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"71ac7202d4a3f0d357b4839140896cda41c7e2d0764d3eb3e4bf8693947e8e2f", "state"=>"0d933dc87568c431e8fcfb945c9380b3d90af4a94becc179"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.7ms (ActiveRecord: 8.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:15 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:15 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:55:15 +0000 Started GET "/auth/gds/callback?code=9370da5b9f42d91b56ad137f474838dca008dc3aa23d45e3397cda0be627542f&state=86f69f92ec120f24ada08329ad44c52a211726584fd2e308" for 127.0.0.1 at 2013-10-30 12:55:16 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"9370da5b9f42d91b56ad137f474838dca008dc3aa23d45e3397cda0be627542f", "state"=>"86f69f92ec120f24ada08329ad44c52a211726584fd2e308"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.7ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15.8ms (ActiveRecord: 8.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:16 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 12:55:16 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.8ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:55:16 +0000 Started GET "/auth/gds/callback?code=40ca3dcb4718907ae3baa404ac4aa1e35cc9fbd9b056640a42c61b22f89ada2b&state=a82151a8df4bc4c7c2af4c533b01938c44a44e75b2044f9d" for 127.0.0.1 at 2013-10-30 12:55:16 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"40ca3dcb4718907ae3baa404ac4aa1e35cc9fbd9b056640a42c61b22f89ada2b", "state"=>"a82151a8df4bc4c7c2af4c533b01938c44a44e75b2044f9d"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (11.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (8.7ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 29.8ms (ActiveRecord: 21.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 12:55:16 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3.2ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 12:55:16 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:55:16 +0000 Started GET "/auth/gds/callback?code=24dc1f1ceb425bf0acc6a73cb3ceecd6fb90158b7aa035a61e6b499ab2aa02b3&state=729b7beb80411872899bd1d0e46956b6868cbfb90dcc9385" for 127.0.0.1 at 2013-10-30 12:55:16 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"24dc1f1ceb425bf0acc6a73cb3ceecd6fb90158b7aa035a61e6b499ab2aa02b3", "state"=>"729b7beb80411872899bd1d0e46956b6868cbfb90dcc9385"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.5ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.2ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 14.9ms (ActiveRecord: 7.3ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 12:55:16 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.9ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:16 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:55:16 +0000 Started GET "/auth/gds/callback?code=0100042293d2c7e830a22822ea65c6c6045e34fbef4ebd8f8d88900d94677ed5&state=35369200bcf68adca750c5387ec2efb330930ce3e41dfd4e" for 127.0.0.1 at 2013-10-30 12:55:17 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"0100042293d2c7e830a22822ea65c6c6045e34fbef4ebd8f8d88900d94677ed5", "state"=>"35369200bcf68adca750c5387ec2efb330930ce3e41dfd4e"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (6.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 20.6ms (ActiveRecord: 11.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:17 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.0ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:17 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 3.3ms (Views: 2.3ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-10-30 12:55:17 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.5ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:17 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:55:17 +0000 Started GET "/auth/gds/callback?code=a3b475f892300048894a8b116edab59c69d39a58aac4f1d297419cda30e2e60c&state=a5ff23d1b5c671314788e32c879ec3e4ce61d3465a883d24" for 127.0.0.1 at 2013-10-30 12:55:17 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"a3b475f892300048894a8b116edab59c69d39a58aac4f1d297419cda30e2e60c", "state"=>"a5ff23d1b5c671314788e32c879ec3e4ce61d3465a883d24"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15.3ms (ActiveRecord: 7.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:17 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:17 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:55:17 +0000 Started GET "/auth/gds/callback?code=ef7df9ebfd94d40488a4b90a70e4a57fd1c8dffa96e60f8cc7891ae65e08005b&state=11080402cb476cbdb88b0c752a670b801d691a590645d524" for 127.0.0.1 at 2013-10-30 12:55:17 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"ef7df9ebfd94d40488a4b90a70e4a57fd1c8dffa96e60f8cc7891ae65e08005b", "state"=>"11080402cb476cbdb88b0c752a670b801d691a590645d524"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.7ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.1ms (ActiveRecord: 7.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:17 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 09:00:17 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 09:00:17 +0000 Started GET "/auth/gds/callback?code=55da2103f3f0fc1bb5fb9476d5ecd9dc5370c305ec4e28886be730e8998b631a&state=66ae85366ba15dd6051f7fcf6ad2ce09b204f539f86b17b6" for 127.0.0.1 at 2013-10-31 09:00:17 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"55da2103f3f0fc1bb5fb9476d5ecd9dc5370c305ec4e28886be730e8998b631a", "state"=>"66ae85366ba15dd6051f7fcf6ad2ce09b204f539f86b17b6"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.1ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 14.5ms (ActiveRecord: 7.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 09:00:17 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:17 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 12:55:17 +0000 Started GET "/auth/gds/callback?code=8949021d8c6fbf8f8338e319dfb4c7cca794182f1f36b94d1c9ce2eebb8c714c&state=031d45faeb2e45b63d82911c526fc9ddeb1918a2096e4ea7" for 127.0.0.1 at 2013-10-30 12:55:18 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"8949021d8c6fbf8f8338e319dfb4c7cca794182f1f36b94d1c9ce2eebb8c714c", "state"=>"031d45faeb2e45b63d82911c526fc9ddeb1918a2096e4ea7"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (6.0ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 19.2ms (ActiveRecord: 10.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:18 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 08:50:18 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:18 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed in 2.3ms Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:18 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 12:55:18 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 0.9ms (Views: 0.2ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:18 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 8.4ms Started GET "/restricted" for 127.0.0.1 at 2013-10-30 12:55:18 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.0ms) commit transaction Completed 200 OK in 42.4ms (Views: 0.4ms | ActiveRecord: 9.3ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 12:55:18 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.3ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.7ms) commit transaction Completed 200 OK in 76.1ms (Views: 0.3ms | ActiveRecord: 7.6ms) Connecting to database specified by database.yml  (0.9ms) select sqlite_version(*)  (6.4ms) DROP TABLE "users"  (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)   (0.1ms) begin transaction 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"]]  (3.3ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d38120"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.9ms) Completed 403 Forbidden in 7.7ms (Views: 6.9ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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"]]  (3.7ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d37442"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d37442' LIMIT 1  (0.1ms) begin transaction  (0.3ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ' WHERE "users"."id" = 2  (3.6ms) commit transaction Completed 200 OK in 41.5ms (ActiveRecord: 4.2ms) User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 2]]  (0.1ms) begin transaction 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"]]  (3.7ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d35316"} Completed 403 Forbidden in 1.9ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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"]]  (3.6ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.1ms (ActiveRecord: 0.2ms)  (0.1ms) begin transaction 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"]]  (3.4ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d32312"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d32312' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 5  (3.1ms) commit transaction Completed 200 OK in 7.7ms (ActiveRecord: 3.5ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 5]] Started GET "/" for 127.0.0.1 at 2013-10-30 14:58:39 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 2.4ms (Views: 1.9ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:39 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 3.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:39 +0000 Started GET "/auth/gds/callback?code=21546b2d9ad4eac9af531e441d189e32374b72b07fa4595ccdc90e26f06bf5bc&state=4e2c3a74c3e20574e39358e44bb801e5fa2d82b0812546c6" for 127.0.0.1 at 2013-10-30 14:58:40 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"21546b2d9ad4eac9af531e441d189e32374b72b07fa4595ccdc90e26f06bf5bc", "state"=>"4e2c3a74c3e20574e39358e44bb801e5fa2d82b0812546c6"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction 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"]]  (4.9ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.5ms (ActiveRecord: 8.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:41 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.5ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:41 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:41 +0000 Started GET "/auth/gds/callback?code=b502c94aa9f9e6a5c22c8232bbdb33e45ffa417003478602d9431a701021e7f5&state=d4d6b16cf6ec8214fa1472c1e08f51e085490bcd4d767886" for 127.0.0.1 at 2013-10-30 14:58:41 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"b502c94aa9f9e6a5c22c8232bbdb33e45ffa417003478602d9431a701021e7f5", "state"=>"d4d6b16cf6ec8214fa1472c1e08f51e085490bcd4d767886"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.4ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15.9ms (ActiveRecord: 6.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:41 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:41 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:41 +0000 Started GET "/auth/gds/callback?code=cb181f89b3f5f0a5cf01ed58b0fa6d9a19d6103681566112ff2e9b5c291fb435&state=463eea390a459f0b3bc6c396f3440194a74f09fe360d7942" for 127.0.0.1 at 2013-10-30 14:58:41 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"cb181f89b3f5f0a5cf01ed58b0fa6d9a19d6103681566112ff2e9b5c291fb435", "state"=>"463eea390a459f0b3bc6c396f3440194a74f09fe360d7942"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.0ms (ActiveRecord: 9.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:41 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 14:58:41 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.9ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:41 +0000 Started GET "/auth/gds/callback?code=0abbf3732068ec26d861f589015b48d9a47a052307122a8333cae758fcf50df8&state=5a63670716405b23224915160b440ace463901bfae234e3b" for 127.0.0.1 at 2013-10-30 14:58:42 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"0abbf3732068ec26d861f589015b48d9a47a052307122a8333cae758fcf50df8", "state"=>"5a63670716405b23224915160b440ace463901bfae234e3b"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (11.7ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 26.0ms (ActiveRecord: 16.8ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 14:58:42 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3.3ms (Views: 0.5ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 14:58:42 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:42 +0000 Started GET "/auth/gds/callback?code=4393d4eb5d4056deb04e22601d9d750f197ff2f67dadafd2e1e28a6cf811ff85&state=b8cab794093fd92b46e8d39c63dffffdc523af2f770860a2" for 127.0.0.1 at 2013-10-30 14:58:42 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"4393d4eb5d4056deb04e22601d9d750f197ff2f67dadafd2e1e28a6cf811ff85", "state"=>"b8cab794093fd92b46e8d39c63dffffdc523af2f770860a2"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.3ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 18.7ms (ActiveRecord: 10.4ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 14:58:42 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:42 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:42 +0000 Started GET "/auth/gds/callback?code=e7dd5b6ce99dde23d4e201fe072581c16f6ec38f18dca14912e2f99d21723ef8&state=d1fb30062bf4605aa9e69cf627352c1b5bcac088374a98b2" for 127.0.0.1 at 2013-10-30 14:58:42 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"e7dd5b6ce99dde23d4e201fe072581c16f6ec38f18dca14912e2f99d21723ef8", "state"=>"d1fb30062bf4605aa9e69cf627352c1b5bcac088374a98b2"} Authenticating with gds_sso strategy User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (7.1ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 23.0ms (ActiveRecord: 12.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:42 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.4ms (Views: 0.5ms | ActiveRecord: 0.2ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (8.9ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:42 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 5.8ms (Views: 3.9ms | ActiveRecord: 0.2ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-10-30 14:58:42 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.5ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:43 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:43 +0000 Started GET "/auth/gds/callback?code=87bc7d06f9e52b5040f78d5ff86fbb263582b33244bed765d729002aac8001d7&state=1fbfeba924b1b068322d0fbef2b4da4d53fb74a256364324" for 127.0.0.1 at 2013-10-30 14:58:43 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"87bc7d06f9e52b5040f78d5ff86fbb263582b33244bed765d729002aac8001d7", "state"=>"1fbfeba924b1b068322d0fbef2b4da4d53fb74a256364324"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (7.2ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 20.1ms (ActiveRecord: 11.9ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:43 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:43 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:43 +0000 Started GET "/auth/gds/callback?code=e1bd6f888ef37e5f44cc5a61ce36d141c51fc0208846c2718ae49def19e5f1f5&state=b4bf18736e24adef0702b62688f117ab0368826e88a41dda" for 127.0.0.1 at 2013-10-30 14:58:43 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"e1bd6f888ef37e5f44cc5a61ce36d141c51fc0208846c2718ae49def19e5f1f5", "state"=>"b4bf18736e24adef0702b62688f117ab0368826e88a41dda"} Authenticating with gds_sso strategy User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (12.0ms) commit transaction  (0.1ms) begin transaction  (0.3ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.5ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 30.4ms (ActiveRecord: 16.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:43 +0000 Processing by ExampleController#restricted as HTML User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.6ms (Views: 0.7ms | ActiveRecord: 0.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:03:43 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.5ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:03:43 +0000 Started GET "/auth/gds/callback?code=973f0fa8a743e55c374e166c86c0da2753453e40b0994b02e576e9799d65c6cf&state=ce5a5d8001cced1f32f81a71982b7ae354697d1e80e108a3" for 127.0.0.1 at 2013-10-31 11:03:43 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"973f0fa8a743e55c374e166c86c0da2753453e40b0994b02e576e9799d65c6cf", "state"=>"ce5a5d8001cced1f32f81a71982b7ae354697d1e80e108a3"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.9ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.0ms (ActiveRecord: 9.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:03:43 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:43 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-30 14:58:43 +0000 Started GET "/auth/gds/callback?code=e05906c7d82b5d9daf4a495c55296ad7159eb4ff81223f9082414307ba86758d&state=52504b0b1d107ce958c4f76ca1ee4643be771726c2544e3e" for 127.0.0.1 at 2013-10-30 14:58:44 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"e05906c7d82b5d9daf4a495c55296ad7159eb4ff81223f9082414307ba86758d", "state"=>"52504b0b1d107ce958c4f76ca1ee4643be771726c2544e3e"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (6.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 20.8ms (ActiveRecord: 11.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:44 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.5ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 10:53:44 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:44 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed in 2.3ms Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:44 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 1.3ms (Views: 0.5ms | ActiveRecord: 0.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 14:58:44 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_sso_api_access strategy Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:44 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 8.2ms Started GET "/restricted" for 127.0.0.1 at 2013-10-30 14:58:44 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (5.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (3.4ms) commit transaction Completed 200 OK in 41.7ms (Views: 0.3ms | ActiveRecord: 9.2ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-30 14:58:44 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (4.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 6  (2.8ms) commit transaction Completed 200 OK in 40.3ms (Views: 0.3ms | ActiveRecord: 7.8ms) Connecting to database specified by database.yml  (0.9ms) select sqlite_version(*)  (9.6ms) DROP TABLE "users"  (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)   (0.1ms) begin transaction 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"]]  (4.7ms) commit transaction  (0.1ms) begin transaction 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"]]  (3.1ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d3613"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.9ms) Completed 403 Forbidden in 7.3ms (Views: 6.6ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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"]]  (3.9ms) commit transaction  (0.1ms) begin transaction 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"]]  (3.7ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d31738"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d31738' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ' WHERE "users"."id" = 3  (3.4ms) commit transaction Completed 200 OK in 13.5ms (ActiveRecord: 4.0ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]  (0.1ms) begin transaction 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"]]  (3.7ms) commit transaction  (0.0ms) begin transaction 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"]]  (3.6ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d33165"} Completed 403 Forbidden in 1.8ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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"]]  (3.0ms) commit transaction  (0.0ms) begin transaction 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"]]  (2.9ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.2ms (ActiveRecord: 0.2ms)  (0.1ms) begin transaction 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"]]  (3.4ms) commit transaction  (0.0ms) begin transaction 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"]]  (3.5ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d32000"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d32000' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 9  (3.0ms) commit transaction Completed 200 OK in 7.7ms (ActiveRecord: 3.4ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]] Started GET "/" for 127.0.0.1 at 2013-10-31 11:29:45 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 2.4ms (Views: 1.9ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:45 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 2.9ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:45 +0000 Started GET "/auth/gds/callback?code=ea334fb3f4df36c7eff38383bec4d2da86f369e516c7896d81474995968f178b&state=d67b7b12aff13a8cea87ebf60dd9aefaf48c33b2cbd4c714" for 127.0.0.1 at 2013-10-31 11:29:46 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"ea334fb3f4df36c7eff38383bec4d2da86f369e516c7896d81474995968f178b", "state"=>"d67b7b12aff13a8cea87ebf60dd9aefaf48c33b2cbd4c714"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction 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"]]  (5.9ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 18.7ms (ActiveRecord: 10.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:46 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:46 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.4ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:46 +0000 Started GET "/auth/gds/callback?code=7a505bdc1b787708ade7037c58aaa9515efc32cc3eca3f1dc839c77fca810bb7&state=3de4c55203f7ac53b7f1f125f3f9289f04e113ec763ffc56" for 127.0.0.1 at 2013-10-31 11:29:46 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7a505bdc1b787708ade7037c58aaa9515efc32cc3eca3f1dc839c77fca810bb7", "state"=>"3de4c55203f7ac53b7f1f125f3f9289f04e113ec763ffc56"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 18.7ms (ActiveRecord: 9.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:46 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:46 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:46 +0000 Started GET "/auth/gds/callback?code=f07c04e96868fd3c6c5bb2c39badad39dd08a634599c0fa95170ee5d4efb7329&state=64ce1792109d2001ee22c503eaeb791031d87ebc03c0c2a9" for 127.0.0.1 at 2013-10-31 11:29:47 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"f07c04e96868fd3c6c5bb2c39badad39dd08a634599c0fa95170ee5d4efb7329", "state"=>"64ce1792109d2001ee22c503eaeb791031d87ebc03c0c2a9"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (7.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 20.2ms (ActiveRecord: 12.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:47 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:29:47 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.9ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:47 +0000 Started GET "/auth/gds/callback?code=eb48b4542e41de858cb1401917bd3b45b5310dfe41d58559e313d07c9d9bbead&state=fb0c181bcb7e5c4dc4e04cbdceb84dccf2c9ae04cb312be1" for 127.0.0.1 at 2013-10-31 11:29:47 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"eb48b4542e41de858cb1401917bd3b45b5310dfe41d58559e313d07c9d9bbead", "state"=>"fb0c181bcb7e5c4dc4e04cbdceb84dccf2c9ae04cb312be1"} Authenticating with gds_sso strategy User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.6ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 20.7ms (ActiveRecord: 10.5ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:29:47 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3.4ms (Views: 0.5ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:29:47 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:47 +0000 Started GET "/auth/gds/callback?code=bbad64af30b3ceb0f0bea70f55c5cdfc9b944597b0c5f895898ce7aae891d2fa&state=062b39ebbf6cadda37ad07b6d4d97cb3ecfb9c860385c083" for 127.0.0.1 at 2013-10-31 11:29:47 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"bbad64af30b3ceb0f0bea70f55c5cdfc9b944597b0c5f895898ce7aae891d2fa", "state"=>"062b39ebbf6cadda37ad07b6d4d97cb3ecfb9c860385c083"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.5ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 16.7ms (ActiveRecord: 8.8ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:29:47 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.9ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:47 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:47 +0000 Started GET "/auth/gds/callback?code=70eb8cc2821db0bdb529fd3426c94b99d68c7e4eb12b778e61dd50403acf6aad&state=fe739fcb50889b85a8af8277a420601f13d7ae36ba79f0a3" for 127.0.0.1 at 2013-10-31 11:29:48 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"70eb8cc2821db0bdb529fd3426c94b99d68c7e4eb12b778e61dd50403acf6aad", "state"=>"fe739fcb50889b85a8af8277a420601f13d7ae36ba79f0a3"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.8ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 19.0ms (ActiveRecord: 8.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:48 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.5ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.1ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:48 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 3.4ms (Views: 2.4ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-10-31 11:29:48 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.6ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:48 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:48 +0000 Started GET "/auth/gds/callback?code=6df0c015afd6823152c95acc2031d9a240fdbb888069625907109d173c99cbb6&state=d75a201ebc3157d9862f91a78fcfbe4bf2a49e5d16cced59" for 127.0.0.1 at 2013-10-31 11:29:48 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"6df0c015afd6823152c95acc2031d9a240fdbb888069625907109d173c99cbb6", "state"=>"d75a201ebc3157d9862f91a78fcfbe4bf2a49e5d16cced59"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (7.1ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 20.8ms (ActiveRecord: 12.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:48 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:48 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:48 +0000 Started GET "/auth/gds/callback?code=f9288ca55b8e6cf4db6c2be2206da8f652cd5e3cdb057317d58b77e9498291de&state=20ec2c50661c7b68bc24e7eae4f9ae9dff2dfeac734f46df" for 127.0.0.1 at 2013-10-31 11:29:48 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"f9288ca55b8e6cf4db6c2be2206da8f652cd5e3cdb057317d58b77e9498291de", "state"=>"20ec2c50661c7b68bc24e7eae4f9ae9dff2dfeac734f46df"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.3ms (ActiveRecord: 8.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:48 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 07:34:48 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 07:34:48 +0000 Started GET "/auth/gds/callback?code=a7bbe8723628cc9643b443aeec6d01f157a551459487c75b9d736bed893bc79d&state=4e9244f89282b1883c5ac4453277f0ba1a5c98b362538f12" for 127.0.0.1 at 2013-11-01 07:34:48 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"a7bbe8723628cc9643b443aeec6d01f157a551459487c75b9d736bed893bc79d", "state"=>"4e9244f89282b1883c5ac4453277f0ba1a5c98b362538f12"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.2ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.8ms (ActiveRecord: 8.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 07:34:49 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:49 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:29:49 +0000 Started GET "/auth/gds/callback?code=52fcbae45155f9d60188eb3972067cdb696f2aa0ae878829bf8b8875269407ec&state=00957b3c7b8f4bede1e4b64beda98279a6d7e5aed69274eb" for 127.0.0.1 at 2013-10-31 11:29:49 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"52fcbae45155f9d60188eb3972067cdb696f2aa0ae878829bf8b8875269407ec", "state"=>"00957b3c7b8f4bede1e4b64beda98279a6d7e5aed69274eb"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.2ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 19.3ms (ActiveRecord: 10.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:49 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 07:24:49 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:49 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 8.3ms Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:29:49 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.0ms) commit transaction Completed 200 OK in 44.5ms (Views: 0.3ms | ActiveRecord: 10.7ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:29:49 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.5ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (2.8ms) commit transaction Completed 200 OK in 42.5ms (Views: 0.3ms | ActiveRecord: 7.0ms) Connecting to database specified by database.yml  (0.9ms) select sqlite_version(*)  (7.1ms) DROP TABLE "users"  (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)   (0.1ms) begin transaction 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"]]  (4.0ms) commit transaction  (0.1ms) begin transaction 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"]]  (3.8ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d34045"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (1.0ms) Completed 403 Forbidden in 7.1ms (Views: 6.4ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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"]]  (4.9ms) commit transaction  (0.1ms) begin transaction 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"]]  (5.1ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d37401"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d37401' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ' WHERE "users"."id" = 3  (4.1ms) commit transaction Completed 200 OK in 14.6ms (ActiveRecord: 4.6ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]  (0.1ms) begin transaction 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"]]  (7.3ms) commit transaction  (0.1ms) begin transaction 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"]]  (9.0ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d3357"} Completed 403 Forbidden in 2.1ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction 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"]]  (13.4ms) commit transaction  (0.1ms) begin transaction 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"]]  (3.6ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.3ms (ActiveRecord: 0.3ms)  (0.1ms) begin transaction 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"]]  (5.1ms) commit transaction  (0.0ms) begin transaction 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"]]  (5.0ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d31774"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d31774' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 9  (4.7ms) commit transaction Completed 200 OK in 9.7ms (ActiveRecord: 5.2ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]] Started GET "/" for 127.0.0.1 at 2013-10-31 11:38:29 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 2.5ms (Views: 2.0ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:29 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 3.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:29 +0000 Started GET "/auth/gds/callback?code=7076c155ba2e6b897d4be0cea184f3ee669c54789ff8df4f3ec6303689e63f25&state=770ee508b2b88449dc584a5e510d496412f38273cc5e1f93" for 127.0.0.1 at 2013-10-31 11:38:30 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7076c155ba2e6b897d4be0cea184f3ee669c54789ff8df4f3ec6303689e63f25", "state"=>"770ee508b2b88449dc584a5e510d496412f38273cc5e1f93"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction 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"]]  (4.4ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (2.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15.9ms (ActiveRecord: 7.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:30 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.5ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:30 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:30 +0000 Started GET "/auth/gds/callback?code=c7ca4d809f924ea396e11557a456d3592df744c59f19cb35c58d12d85296f9ce&state=0df587715601a2f68981a64f74b971390937487447e4cb8f" for 127.0.0.1 at 2013-10-31 11:38:31 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"c7ca4d809f924ea396e11557a456d3592df744c59f19cb35c58d12d85296f9ce", "state"=>"0df587715601a2f68981a64f74b971390937487447e4cb8f"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.4ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 18.1ms (ActiveRecord: 8.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:31 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:31 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:31 +0000 Started GET "/auth/gds/callback?code=344801e2fa7aa06cb1ad37f59897de3c9f94b02e46dc5b58803f2d72e5f4e36b&state=ef509060c15900e987de31eed7b4dce7f2608cdd06cf04c8" for 127.0.0.1 at 2013-10-31 11:38:31 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"344801e2fa7aa06cb1ad37f59897de3c9f94b02e46dc5b58803f2d72e5f4e36b", "state"=>"ef509060c15900e987de31eed7b4dce7f2608cdd06cf04c8"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (2.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15.7ms (ActiveRecord: 7.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:31 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:38:31 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 1.0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:31 +0000 Started GET "/auth/gds/callback?code=e4d456776e183ac16c1a488fee5d37f0ef73b83eaab6babd84dcaba64b9a6de8&state=33a12d41614b3c0471c76c47a87dfb1c1d9d0e669947b31e" for 127.0.0.1 at 2013-10-31 11:38:31 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"e4d456776e183ac16c1a488fee5d37f0ef73b83eaab6babd84dcaba64b9a6de8", "state"=>"33a12d41614b3c0471c76c47a87dfb1c1d9d0e669947b31e"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.6ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 17.0ms (ActiveRecord: 8.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:38:31 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3.6ms (Views: 0.6ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:38:31 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:31 +0000 Started GET "/auth/gds/callback?code=06e4a236c113f2b9a712766532fbd02b4d0c5c988050e6e8588cae14fea1973b&state=a66a4cc2b23620d9d6e6737f5e68925c79530f1af0732b94" for 127.0.0.1 at 2013-10-31 11:38:31 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"06e4a236c113f2b9a712766532fbd02b4d0c5c988050e6e8588cae14fea1973b", "state"=>"a66a4cc2b23620d9d6e6737f5e68925c79530f1af0732b94"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.7ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.1ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 16.8ms (ActiveRecord: 8.4ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:38:32 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:32 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:32 +0000 Started GET "/auth/gds/callback?code=e8aeebb3e2ba1909323787104940651c8a0981647bdf64a760e147e86ffbfefc&state=f79820d13a2122a8d3ac5f2c2ebc85ac261c47947c51585f" for 127.0.0.1 at 2013-10-31 11:38:32 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"e8aeebb3e2ba1909323787104940651c8a0981647bdf64a760e147e86ffbfefc", "state"=>"f79820d13a2122a8d3ac5f2c2ebc85ac261c47947c51585f"} Authenticating with gds_sso strategy User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (2.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 18.0ms (ActiveRecord: 8.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:32 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (2.9ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:32 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 3.5ms (Views: 2.4ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-10-31 11:38:32 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.6ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:32 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:32 +0000 Started GET "/auth/gds/callback?code=7f24c5a305c90af77ec7cec351c5984876b2972f95f9e2bdeeddb39b07aa1157&state=7cb3208f25ead37892e645398274299dbe4d08fc0bae32d4" for 127.0.0.1 at 2013-10-31 11:38:32 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7f24c5a305c90af77ec7cec351c5984876b2972f95f9e2bdeeddb39b07aa1157", "state"=>"7cb3208f25ead37892e645398274299dbe4d08fc0bae32d4"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.4ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.3ms (ActiveRecord: 8.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:32 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:32 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:32 +0000 Started GET "/auth/gds/callback?code=7389b2655a69297e389913caf43fce07399e10de4e9b3d1b8aeeaeacb12541ff&state=6e1887d565e93ad7e6d2455ca48002569502e3d1c76c9584" for 127.0.0.1 at 2013-10-31 11:38:33 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7389b2655a69297e389913caf43fce07399e10de4e9b3d1b8aeeaeacb12541ff", "state"=>"6e1887d565e93ad7e6d2455ca48002569502e3d1c76c9584"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 18.3ms (ActiveRecord: 8.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:33 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 07:43:33 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 07:43:33 +0000 Started GET "/auth/gds/callback?code=dda00818864f4f1f758d17f7270a2ae70004a6424993c00b950396e2fb66d455&state=f2b7c6d249227239f0df33b4f919530cd13e7a5583230cb7" for 127.0.0.1 at 2013-11-01 07:43:33 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"dda00818864f4f1f758d17f7270a2ae70004a6424993c00b950396e2fb66d455", "state"=>"f2b7c6d249227239f0df33b4f919530cd13e7a5583230cb7"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.0ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (2.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15.0ms (ActiveRecord: 7.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 07:43:33 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:33 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 11:38:33 +0000 Started GET "/auth/gds/callback?code=163ff71d8a13eea08b9e061f7bc78c1acf07117cfbd653020e43ed56e2ad642f&state=cc7649abe8fa5d4abaf5ff934b0b39c99d336a1ee509b053" for 127.0.0.1 at 2013-10-31 11:38:33 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"163ff71d8a13eea08b9e061f7bc78c1acf07117cfbd653020e43ed56e2ad642f", "state"=>"cc7649abe8fa5d4abaf5ff934b0b39c99d336a1ee509b053"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 18.0ms (ActiveRecord: 8.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:33 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.5ms (Views: 0.5ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 07:33:33 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:33 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 7.9ms Started GET "/restricted" for 127.0.0.1 at 2013-10-31 11:38:33 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.7ms) commit transaction Completed 200 OK in 42.1ms (Views: 0.3ms | ActiveRecord: 8.7ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 11:38:33 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.3ms) commit transaction Completed 200 OK in 46.0ms (Views: 0.3ms | ActiveRecord: 10.4ms) Connecting to database specified by database.yml  (0.7ms) select sqlite_version(*)  (7.3ms) DROP TABLE "users"  (3.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "uid" varchar(255) NOT NULL, "email" varchar(255) NOT NULL, "remotely_signed_out" boolean, "permissions" text, "organisations" text)   (0.1ms) begin transaction SQL (2.0ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34089"]]  (3.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3996"]]  (2.8ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d34089"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.8ms) Completed 403 Forbidden in 6.4ms (Views: 5.8ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39189"]]  (3.0ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38102"]]  (3.2ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d39189"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d39189' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ', "organisations" = '--- - justice-league ' WHERE "users"."id" = 3  (3.0ms) commit transaction Completed 200 OK in 12.6ms (ActiveRecord: 3.4ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34195"]]  (2.8ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38635"]]  (3.0ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d34195"} Completed 403 Forbidden in 1.6ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d33699"]]  (2.8ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37674"]]  (2.7ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.0ms (ActiveRecord: 0.2ms)  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d36180"]]  (3.7ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38910"]]  (3.4ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d36180"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d36180' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 9  (3.7ms) commit transaction Completed 200 OK in 7.5ms (ActiveRecord: 4.0ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]] Started GET "/" for 127.0.0.1 at 2013-10-31 15:52:11 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 1.7ms (Views: 1.3ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 15:52:11 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 2.4ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 15:52:11 +0000 Started GET "/auth/gds/callback?code=a209758b79b2131c0535bbe675b198c8fd90e757f8ea1aa1fc2ef9a5c9492c42&state=f39e66d83a224e841bd76b3048d88c825252c1c49b43c54f" for 127.0.0.1 at 2013-10-31 15:52:11 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"a209758b79b2131c0535bbe675b198c8fd90e757f8ea1aa1fc2ef9a5c9492c42", "state"=>"f39e66d83a224e841bd76b3048d88c825252c1c49b43c54f"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["organisations", "--- []\n"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]  (14.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 26.2ms (ActiveRecord: 18.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 15:52:12 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 15:52:12 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 15:52:12 +0000 Started GET "/auth/gds/callback?code=1028b92ea395dff6aecc194accfbb8e7c7599a8b1bce4b74d6019ad0fc343693&state=a118ebbe209e944731bf4124ea8e8a8ed80f52cb61f3dc53" for 127.0.0.1 at 2013-10-31 15:52:12 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"1028b92ea395dff6aecc194accfbb8e7c7599a8b1bce4b74d6019ad0fc343693", "state"=>"a118ebbe209e944731bf4124ea8e8a8ed80f52cb61f3dc53"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (4.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 19.2ms (ActiveRecord: 8.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 15:52:12 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 15:52:12 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 15:52:12 +0000 Started GET "/auth/gds/callback?code=ff4e4137830a9245bac2bbba3045b0be54ffea458b5a0fd8e71a92626d6a3657&state=d109ba6dc85e36cf4b9a4957cd2cce84e9876d98af184050" for 127.0.0.1 at 2013-10-31 15:52:12 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"ff4e4137830a9245bac2bbba3045b0be54ffea458b5a0fd8e71a92626d6a3657", "state"=>"d109ba6dc85e36cf4b9a4957cd2cce84e9876d98af184050"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 19.1ms (ActiveRecord: 7.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 15:52:12 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 15:52:12 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.6ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 15:52:12 +0000 Started GET "/auth/gds/callback?code=4097cfc5e079a307cff1068e2c9c9b985e0dde863fdfba7060b6c71148db931e&state=87c4a1caf35e3f4fe138c9b9e2ef6a33a292bcec944eac32" for 127.0.0.1 at 2013-10-31 15:52:13 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"4097cfc5e079a307cff1068e2c9c9b985e0dde863fdfba7060b6c71148db931e", "state"=>"87c4a1caf35e3f4fe138c9b9e2ef6a33a292bcec944eac32"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (5.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (4.6ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 20.8ms (ActiveRecord: 10.4ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 15:52:13 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.6ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 15:52:13 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 15:52:13 +0000 Started GET "/auth/gds/callback?code=14e859e39d2c67a5be17c5c1ee89321ab092b27cf7911f1bc5142f82e01149d1&state=3ff33fc028a77951a4b72999c3a5e8ba2241737882b6423f" for 127.0.0.1 at 2013-10-31 15:52:13 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"14e859e39d2c67a5be17c5c1ee89321ab092b27cf7911f1bc5142f82e01149d1", "state"=>"3ff33fc028a77951a4b72999c3a5e8ba2241737882b6423f"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (4.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.0ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 17.6ms (ActiveRecord: 7.6ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 15:52:13 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.6ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 15:52:13 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 15:52:13 +0000 Started GET "/auth/gds/callback?code=21ef03551b75ba90b1cfd4bd5ae6ed3098ca7d17e3dcabb0d21198c5bf8584ec&state=e9cc1fee3b65e3fe62ab4b3dcd858471f2d2953952950d02" for 127.0.0.1 at 2013-10-31 15:52:13 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"21ef03551b75ba90b1cfd4bd5ae6ed3098ca7d17e3dcabb0d21198c5bf8584ec", "state"=>"e9cc1fee3b65e3fe62ab4b3dcd858471f2d2953952950d02"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (2.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.9ms (ActiveRecord: 6.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 15:52:13 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (2.5ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-10-31 15:52:13 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 2.6ms (Views: 1.8ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-10-31 15:52:13 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.5ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 15:52:13 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 15:52:13 +0000 Started GET "/auth/gds/callback?code=5e511bbb58db010f8af8e4d7916fe3d3540b5c30cda091aba51fbc44c34c83c4&state=b067cda03e319707b0077f8543dd2e96c798e811eb2506ba" for 127.0.0.1 at 2013-10-31 15:52:14 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"5e511bbb58db010f8af8e4d7916fe3d3540b5c30cda091aba51fbc44c34c83c4", "state"=>"b067cda03e319707b0077f8543dd2e96c798e811eb2506ba"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.3ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (2.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.3ms (ActiveRecord: 7.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 15:52:14 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 15:52:14 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 15:52:14 +0000 Started GET "/auth/gds/callback?code=d96b93f617e14e7f85e4df191893281fa21fbc3e4f997fc90b2d49d1108ed8f4&state=14d89b1d0a69b1a520733569d6b2eccb4c1a65661ee8159c" for 127.0.0.1 at 2013-10-31 15:52:14 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"d96b93f617e14e7f85e4df191893281fa21fbc3e4f997fc90b2d49d1108ed8f4", "state"=>"14d89b1d0a69b1a520733569d6b2eccb4c1a65661ee8159c"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (2.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 18.0ms (ActiveRecord: 7.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 15:52:14 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 11:57:14 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 11:57:14 +0000 Started GET "/auth/gds/callback?code=536f958d99bc9df1cbb702a01aa39a7e98c3e681234e688b8a9bd5375f0d0b44&state=583ae1df19a5df870720b123cfbe98f59a032b2704abcfda" for 127.0.0.1 at 2013-11-01 11:57:14 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"536f958d99bc9df1cbb702a01aa39a7e98c3e681234e688b8a9bd5375f0d0b44", "state"=>"583ae1df19a5df870720b123cfbe98f59a032b2704abcfda"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (2.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.1ms (ActiveRecord: 7.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 11:57:14 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 15:52:14 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 15:52:14 +0000 Started GET "/auth/gds/callback?code=46612155324ea49e413f4d9a6cd7a669e947939b6e12aadddc1e7a3ba6a322b1&state=f9197ac3f652449ae8dbb58fbcc8cbcae63e80ee44934d26" for 127.0.0.1 at 2013-10-31 15:52:14 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"46612155324ea49e413f4d9a6cd7a669e947939b6e12aadddc1e7a3ba6a322b1", "state"=>"f9197ac3f652449ae8dbb58fbcc8cbcae63e80ee44934d26"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 18.3ms (ActiveRecord: 7.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 15:52:14 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 11:47:14 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 0.9ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 15:52:14 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 6.7ms Started GET "/restricted" for 127.0.0.1 at 2013-10-31 15:52:15 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (2.8ms) commit transaction Completed 200 OK in 38.6ms (Views: 0.2ms | ActiveRecord: 6.9ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 15:52:15 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.2ms) commit transaction Completed 200 OK in 42.7ms (Views: 0.2ms | ActiveRecord: 7.3ms) Connecting to database specified by database.yml  (0.8ms) select sqlite_version(*)  (34.6ms) DROP TABLE "users"  (6.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, "organisations" text)   (0.1ms) begin transaction SQL (2.3ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32344"]]  (4.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37414"]]  (3.8ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d32344"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.8ms) Completed 403 Forbidden in 6.6ms (Views: 5.9ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35734"]]  (3.9ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39966"]]  (3.7ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d35734"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d35734' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ', "organisations" = '--- - justice-league ' WHERE "users"."id" = 3  (4.0ms) commit transaction Completed 200 OK in 14.1ms (ActiveRecord: 4.4ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38691"]]  (3.8ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d33567"]]  (3.7ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d38691"} Completed 403 Forbidden in 1.7ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35881"]]  (4.4ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34835"]]  (40.2ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.0ms (ActiveRecord: 0.2ms)  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d31514"]]  (3.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d36094"]]  (3.0ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d31514"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d31514' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 9  (3.6ms) commit transaction Completed 200 OK in 7.8ms (ActiveRecord: 3.9ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]] Started GET "/" for 127.0.0.1 at 2013-10-31 16:05:28 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 1.8ms (Views: 1.5ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 16:05:28 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 2.6ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 16:05:28 +0000 Started GET "/auth/gds/callback?code=1c62032084b8244625c9ec530b1aee653c634dc2f93c341ee87ac89df7733c44&state=66f8aae2e04b3847d6552c7d0cc1f4102ba247ab8b0d25a7" for 127.0.0.1 at 2013-10-31 16:05:29 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"1c62032084b8244625c9ec530b1aee653c634dc2f93c341ee87ac89df7733c44", "state"=>"66f8aae2e04b3847d6552c7d0cc1f4102ba247ab8b0d25a7"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["organisations", "--- []\n"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]  (4.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.4ms (ActiveRecord: 8.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 16:05:29 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 16:05:29 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 16:05:29 +0000 Started GET "/auth/gds/callback?code=cb6515bf10f5eac28bae082284da1f22cf2017283e2dcf9f2b62bc7710970e9d&state=b7e6782b2faa7baf1b78a918aa32df707bee280235690ffe" for 127.0.0.1 at 2013-10-31 16:05:29 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"cb6515bf10f5eac28bae082284da1f22cf2017283e2dcf9f2b62bc7710970e9d", "state"=>"b7e6782b2faa7baf1b78a918aa32df707bee280235690ffe"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (5.2ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 21.1ms (ActiveRecord: 9.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 16:05:29 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 16:05:29 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 16:05:29 +0000 Started GET "/auth/gds/callback?code=e69eebf06bec82b8e4ad23e317973cce3be18d350988f2a127e6f10a0c671a95&state=9c0e6c19f456fb7360a20416ca42a53f28cbddd6c3fa9a48" for 127.0.0.1 at 2013-10-31 16:05:29 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"e69eebf06bec82b8e4ad23e317973cce3be18d350988f2a127e6f10a0c671a95", "state"=>"9c0e6c19f456fb7360a20416ca42a53f28cbddd6c3fa9a48"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (5.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (4.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 20.6ms (ActiveRecord: 10.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 16:05:29 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 16:05:30 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.8ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 16:05:30 +0000 Started GET "/auth/gds/callback?code=b1e31468ecb01c7481fa0018933c9590a0a5f434962063289e3a96d89ba4d40c&state=a9faa44665e6a90b81f50b598dfb4e9d26cfa777dbd54f00" for 127.0.0.1 at 2013-10-31 16:05:30 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"b1e31468ecb01c7481fa0018933c9590a0a5f434962063289e3a96d89ba4d40c", "state"=>"a9faa44665e6a90b81f50b598dfb4e9d26cfa777dbd54f00"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (5.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (4.0ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 21.3ms (ActiveRecord: 9.8ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 16:05:30 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3.1ms (Views: 0.4ms | ActiveRecord: 0.2ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 16:05:30 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 16:05:30 +0000 Started GET "/auth/gds/callback?code=386e52c1e23c30e200df0b16597864710bb1d1c7c060d59ada2fcc0069ed4ce5&state=7a790232602701f44962d30f2b396a1aadedab8921ec7ec0" for 127.0.0.1 at 2013-10-31 16:05:30 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"386e52c1e23c30e200df0b16597864710bb1d1c7c060d59ada2fcc0069ed4ce5", "state"=>"7a790232602701f44962d30f2b396a1aadedab8921ec7ec0"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (5.7ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (4.0ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 21.0ms (ActiveRecord: 10.4ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 16:05:30 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.7ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 16:05:30 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 16:05:30 +0000 Started GET "/auth/gds/callback?code=70beb55f70ac04ac21ef4a183418280ea46056270b3cd041ae86e186695a62e8&state=544b67a14f017575c36f5861e8cb8c6c17967ae57c76ce43" for 127.0.0.1 at 2013-10-31 16:05:30 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"70beb55f70ac04ac21ef4a183418280ea46056270b3cd041ae86e186695a62e8", "state"=>"544b67a14f017575c36f5861e8cb8c6c17967ae57c76ce43"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (6.6ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 23.0ms (ActiveRecord: 11.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 16:05:30 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (4.4ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-10-31 16:05:31 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 3.0ms (Views: 2.0ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-10-31 16:05:31 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.5ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 16:05:31 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 16:05:31 +0000 Started GET "/auth/gds/callback?code=382f4ac231619f9e60e8b34fc08c6504a1a3aa49c4d7bb5c36ec7f079b4b721b&state=9c230d76cfd2c9f60c7e1f9f6683a58b1b6062b4810709f2" for 127.0.0.1 at 2013-10-31 16:05:31 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"382f4ac231619f9e60e8b34fc08c6504a1a3aa49c4d7bb5c36ec7f079b4b721b", "state"=>"9c230d76cfd2c9f60c7e1f9f6683a58b1b6062b4810709f2"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (7.1ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (4.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 23.5ms (ActiveRecord: 12.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 16:05:31 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 16:05:31 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 16:05:31 +0000 Started GET "/auth/gds/callback?code=56db0a87c01b2eb44cbe03164eb62d25356b7274ece2816a2a469bb4e2eeee5a&state=b16d66bc2f497c0a4a7201f8b060079d83c99af8968ff2c8" for 127.0.0.1 at 2013-10-31 16:05:31 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"56db0a87c01b2eb44cbe03164eb62d25356b7274ece2816a2a469bb4e2eeee5a", "state"=>"b16d66bc2f497c0a4a7201f8b060079d83c99af8968ff2c8"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (8.2ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (6.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 27.3ms (ActiveRecord: 15.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 16:05:31 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 12:10:31 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 12:10:31 +0000 Started GET "/auth/gds/callback?code=c3cd0659f1d34682397627d1fdc06626355edcaca5268e7c7ce847f1ae021f6d&state=fda5e234204b0eec844bf791e4a8921926fce92207ac63a6" for 127.0.0.1 at 2013-11-01 12:10:31 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"c3cd0659f1d34682397627d1fdc06626355edcaca5268e7c7ce847f1ae021f6d", "state"=>"fda5e234204b0eec844bf791e4a8921926fce92207ac63a6"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (9.1ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (5.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 25.5ms (ActiveRecord: 14.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 12:10:31 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 16:05:31 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-10-31 16:05:31 +0000 Started GET "/auth/gds/callback?code=09e4b9e898446807d3195e8f82fd447462fb5063f76cf8c534f27b9d246a4626&state=c54b2f84c9a7feeeb51261860ef10a5c89357c3e616d735f" for 127.0.0.1 at 2013-10-31 16:05:32 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"09e4b9e898446807d3195e8f82fd447462fb5063f76cf8c534f27b9d246a4626", "state"=>"c54b2f84c9a7feeeb51261860ef10a5c89357c3e616d735f"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (4.3ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 19.8ms (ActiveRecord: 8.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 16:05:32 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 12:00:32 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-10-31 16:05:32 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 7.3ms Started GET "/restricted" for 127.0.0.1 at 2013-10-31 16:05:32 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (5.5ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.4ms) commit transaction Completed 200 OK in 45.5ms (Views: 0.3ms | ActiveRecord: 9.8ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-10-31 16:05:32 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (11.3ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.2ms) commit transaction Completed 200 OK in 52.9ms (Views: 0.2ms | ActiveRecord: 15.2ms) Connecting to database specified by database.yml  (0.7ms) select sqlite_version(*)  (5.4ms) DROP TABLE "users"  (2.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, "organisations" text)   (0.1ms) begin transaction SQL (2.1ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37997"]]  (5.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38980"]]  (4.2ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d37997"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.9ms) Completed 403 Forbidden in 6.7ms (Views: 6.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38131"]]  (4.1ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37630"]]  (4.2ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d38131"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d38131' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ', "organisations" = '--- - justice-league ' WHERE "users"."id" = 3  (3.8ms) commit transaction Completed 200 OK in 14.4ms (ActiveRecord: 4.3ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37589"]]  (3.8ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37011"]]  (3.4ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d37589"} Completed 403 Forbidden in 1.8ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39992"]]  (3.2ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34549"]]  (4.5ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.1ms (ActiveRecord: 0.2ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38686"]]  (4.2ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d36824"]]  (4.4ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d38686"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d38686' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 9  (3.7ms) commit transaction Completed 200 OK in 8.2ms (ActiveRecord: 4.2ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]] Started GET "/" for 127.0.0.1 at 2013-11-01 10:22:44 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 2.1ms (Views: 1.7ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 10:22:44 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 2.5ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 10:22:44 +0000 Started GET "/auth/gds/callback?code=19cef20cb286a2ff7b4de41c4a2856936a71efcfe97f62b74d1ac15b4fbd8a47&state=6b736556fc2c41f6d0bebcc1aeb10410b1415e756f9731b0" for 127.0.0.1 at 2013-11-01 10:22:45 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"19cef20cb286a2ff7b4de41c4a2856936a71efcfe97f62b74d1ac15b4fbd8a47", "state"=>"6b736556fc2c41f6d0bebcc1aeb10410b1415e756f9731b0"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["organisations", "--- []\n"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]  (4.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (2.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.2ms (ActiveRecord: 8.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 10:22:45 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 10:22:45 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 10:22:45 +0000 Started GET "/auth/gds/callback?code=3d3b93cfc9d21d02de05eabbf2b4202b18ec4cba473467c7a8899b44cb61a3ce&state=f24a2ec7e37c4511cc52e566a067a06125e84040b06e3ede" for 127.0.0.1 at 2013-11-01 10:22:46 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"3d3b93cfc9d21d02de05eabbf2b4202b18ec4cba473467c7a8899b44cb61a3ce", "state"=>"f24a2ec7e37c4511cc52e566a067a06125e84040b06e3ede"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (4.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (2.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 19.1ms (ActiveRecord: 8.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 10:22:46 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 10:22:46 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 10:22:46 +0000 Started GET "/auth/gds/callback?code=59aabfa79506ddc2bee2274974b612be2d4009de0e20b612c51e1e60128468f5&state=4944aac86f8eaecf0b17135970c398f11d140ca6d78b87f3" for 127.0.0.1 at 2013-11-01 10:22:46 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"59aabfa79506ddc2bee2274974b612be2d4009de0e20b612c51e1e60128468f5", "state"=>"4944aac86f8eaecf0b17135970c398f11d140ca6d78b87f3"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.7ms (ActiveRecord: 7.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 10:22:46 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-01 10:22:46 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.6ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 10:22:46 +0000 Started GET "/auth/gds/callback?code=f49cd39986b224f1c5a27707a75477cdfbc7d26ebc3599af0adb40905ab22fbf&state=9037843d24c2e9f4c1f6790829cd43c6da24d79a8ddef812" for 127.0.0.1 at 2013-11-01 10:22:46 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"f49cd39986b224f1c5a27707a75477cdfbc7d26ebc3599af0adb40905ab22fbf", "state"=>"9037843d24c2e9f4c1f6790829cd43c6da24d79a8ddef812"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (4.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.3ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 18.4ms (ActiveRecord: 7.9ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-01 10:22:46 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.7ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-01 10:22:46 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 10:22:46 +0000 Started GET "/auth/gds/callback?code=08386c1211961032856d3e5acef34fbb4a52155a0d8893341417b60cc4b54924&state=6c66bcb259de8ac93d6bdc30eb50c90e024cb4a414612719" for 127.0.0.1 at 2013-11-01 10:22:46 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"08386c1211961032856d3e5acef34fbb4a52155a0d8893341417b60cc4b54924", "state"=>"6c66bcb259de8ac93d6bdc30eb50c90e024cb4a414612719"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (11.6ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 26.3ms (ActiveRecord: 16.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-01 10:22:47 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.6ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 10:22:47 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 10:22:47 +0000 Started GET "/auth/gds/callback?code=59c38590490837d6a2d48b1a0ba2b464aed00a17e9bf25972ed1f73fb5040a91&state=d28cf0af4aad3eeab77870f6973633d8a7574983119703cd" for 127.0.0.1 at 2013-11-01 10:22:47 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"59c38590490837d6a2d48b1a0ba2b464aed00a17e9bf25972ed1f73fb5040a91", "state"=>"d28cf0af4aad3eeab77870f6973633d8a7574983119703cd"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (4.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 19.7ms (ActiveRecord: 9.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 10:22:47 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.4ms | ActiveRecord: 0.1ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (2.9ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-11-01 10:22:47 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 2.6ms (Views: 1.8ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-11-01 10:22:47 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.4ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 10:22:47 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 10:22:47 +0000 Started GET "/auth/gds/callback?code=5d37a488b73eb055168e88714076e408407f6d15ad9fc67404c24e4d3cd98962&state=d21d673b2fa4350c231a7c68d19d89a9b2aa24bd1cac7721" for 127.0.0.1 at 2013-11-01 10:22:47 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"5d37a488b73eb055168e88714076e408407f6d15ad9fc67404c24e4d3cd98962", "state"=>"d21d673b2fa4350c231a7c68d19d89a9b2aa24bd1cac7721"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.9ms (ActiveRecord: 7.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 10:22:47 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 10:22:47 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 10:22:47 +0000 Started GET "/auth/gds/callback?code=52d0ff9b3efe8abde60d3e9e6dfae8f04d67e78818c088bdc0dde0d75f0ba8c2&state=42d5515d89d93bcdc9f7f1c9487dc3749d448d91b8009d06" for 127.0.0.1 at 2013-11-01 10:22:47 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"52d0ff9b3efe8abde60d3e9e6dfae8f04d67e78818c088bdc0dde0d75f0ba8c2", "state"=>"42d5515d89d93bcdc9f7f1c9487dc3749d448d91b8009d06"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (4.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (2.5ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 19.0ms (ActiveRecord: 7.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 10:22:48 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-02 06:27:48 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-02 06:27:48 +0000 Started GET "/auth/gds/callback?code=902097aabfd85b3c61d45350c2878d9528eb09549a158bf85134e0b64cad5ad0&state=879f144564d8bb18e8639558df153002f84db8e2a2f5098c" for 127.0.0.1 at 2013-11-02 06:27:48 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"902097aabfd85b3c61d45350c2878d9528eb09549a158bf85134e0b64cad5ad0", "state"=>"879f144564d8bb18e8639558df153002f84db8e2a2f5098c"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.9ms (ActiveRecord: 7.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-02 06:27:48 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 10:22:48 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 10:22:48 +0000 Started GET "/auth/gds/callback?code=851fe8f0c7f5481b3e0a01a84fa76ab1690bf2d819941467a9bc3e2b95bfe84e&state=8e3d6b258ad1e3b1865946ad1042d688376e8b370124cec5" for 127.0.0.1 at 2013-11-01 10:22:48 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"851fe8f0c7f5481b3e0a01a84fa76ab1690bf2d819941467a9bc3e2b95bfe84e", "state"=>"8e3d6b258ad1e3b1865946ad1042d688376e8b370124cec5"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (4.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 19.7ms (ActiveRecord: 8.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 10:22:48 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-02 06:17:48 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 0.9ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 10:22:48 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 7.3ms Started GET "/restricted" for 127.0.0.1 at 2013-11-01 10:22:48 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (4.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (2.8ms) commit transaction Completed 200 OK in 41.6ms (Views: 0.2ms | ActiveRecord: 7.5ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-01 10:22:48 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (4.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (2.8ms) commit transaction Completed 200 OK in 43.1ms (Views: 0.2ms | ActiveRecord: 7.7ms) Connecting to database specified by database.yml  (0.7ms) select sqlite_version(*)  (28.4ms) DROP TABLE "users"  (13.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, "organisations" text)   (0.1ms) begin transaction SQL (1.9ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39893"]]  (20.2ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35649"]]  (48.1ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d39893"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.8ms) Completed 403 Forbidden in 16.4ms (Views: 5.6ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d31171"]]  (16.8ms) commit transaction  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37785"]]  (20.1ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d31171"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d31171' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ', "organisations" = '--- - justice-league ' WHERE "users"."id" = 3  (16.1ms) commit transaction Completed 200 OK in 35.8ms (ActiveRecord: 16.5ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38789"]]  (17.4ms) commit transaction  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32212"]]  (13.2ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d38789"} Completed 403 Forbidden in 1.9ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3419"]]  (16.7ms) commit transaction  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38493"]]  (26.4ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.7ms (ActiveRecord: 0.2ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d31001"]]  (20.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d33036"]]  (11.9ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d31001"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d31001' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 9  (21.4ms) commit transaction Completed 200 OK in 53.9ms (ActiveRecord: 21.8ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]] Started GET "/" for 127.0.0.1 at 2013-11-01 17:03:56 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 1.7ms (Views: 1.4ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 17:03:56 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 2.4ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 17:03:56 +0000 Started GET "/auth/gds/callback?code=783e3b3d0a3ddb2cc1adbf81a4c5577d3151c5dfd5430c93ea92e11c41db39d0&state=d002c1df400ea2ab8550b77b474c5ab2727b475fdcd45a0c" for 127.0.0.1 at 2013-11-01 17:03:57 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"783e3b3d0a3ddb2cc1adbf81a4c5577d3151c5dfd5430c93ea92e11c41db39d0", "state"=>"d002c1df400ea2ab8550b77b474c5ab2727b475fdcd45a0c"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["organisations", "--- []\n"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]  (11.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (2.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 22.2ms (ActiveRecord: 14.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 17:03:57 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 17:03:57 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 17:03:57 +0000 Started GET "/auth/gds/callback?code=73f1527c59d3efcac3eb14321cea19b5307e50feeb12e5348bf2732fe6f2d4a0&state=afe2ab60b511ef06e29654ad6cccdf7366254dd87003d5e0" for 127.0.0.1 at 2013-11-01 17:03:58 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"73f1527c59d3efcac3eb14321cea19b5307e50feeb12e5348bf2732fe6f2d4a0", "state"=>"afe2ab60b511ef06e29654ad6cccdf7366254dd87003d5e0"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (5.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (4.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 22.0ms (ActiveRecord: 10.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 17:03:58 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 17:03:58 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 17:03:58 +0000 Started GET "/auth/gds/callback?code=b58c58c80f8dbc7f27635cd17034fc7d8dd713c3b215f8527e4a3a1df9fd3f3d&state=5b700227a2439edeaf116c502d3f18c7a52a75a53410eeb5" for 127.0.0.1 at 2013-11-01 17:03:58 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"b58c58c80f8dbc7f27635cd17034fc7d8dd713c3b215f8527e4a3a1df9fd3f3d", "state"=>"5b700227a2439edeaf116c502d3f18c7a52a75a53410eeb5"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (14.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (12.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 37.8ms (ActiveRecord: 27.9ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 17:03:58 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-01 17:03:58 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.5ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 17:03:58 +0000 Started GET "/auth/gds/callback?code=5561e9afe84d3e4c8ef3538e547cf682cb9fcf7278e7bd3635966a1dbe1262f6&state=902086e3bdfcad9629273f070fd8ff5a9ddc763ffee127d1" for 127.0.0.1 at 2013-11-01 17:03:59 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"5561e9afe84d3e4c8ef3538e547cf682cb9fcf7278e7bd3635966a1dbe1262f6", "state"=>"902086e3bdfcad9629273f070fd8ff5a9ddc763ffee127d1"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (2.6ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (13.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (12.1ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 45.3ms (ActiveRecord: 28.9ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-01 17:03:59 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.5ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-01 17:03:59 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 17:03:59 +0000 Started GET "/auth/gds/callback?code=dbd272eb65fb3376d60373f9f25bc0f61b3dfe5d0f4a9d3cf708ece5c7fc2048&state=eb61df8ff7f3a508d16a83447e73dda12a11c423fb0a22ac" for 127.0.0.1 at 2013-11-01 17:03:59 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"dbd272eb65fb3376d60373f9f25bc0f61b3dfe5d0f4a9d3cf708ece5c7fc2048", "state"=>"eb61df8ff7f3a508d16a83447e73dda12a11c423fb0a22ac"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (13.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (10.2ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 33.8ms (ActiveRecord: 23.7ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-01 17:03:59 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.5ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 17:03:59 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 17:03:59 +0000 Started GET "/auth/gds/callback?code=f6c5de21f80bb0e6cb0b9ed3de22e27c53bf23cd06d409cfd16e3603a9bda6ed&state=da77b372e42e46ee3203caa239e4a5a0741496628b8d2d86" for 127.0.0.1 at 2013-11-01 17:03:59 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"f6c5de21f80bb0e6cb0b9ed3de22e27c53bf23cd06d409cfd16e3603a9bda6ed", "state"=>"da77b372e42e46ee3203caa239e4a5a0741496628b8d2d86"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (11.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (11.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 34.9ms (ActiveRecord: 23.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 17:03:59 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (8.7ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-11-01 17:03:59 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 2.8ms (Views: 1.8ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-11-01 17:03:59 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.5ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 17:04:00 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.4ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 17:04:00 +0000 Started GET "/auth/gds/callback?code=10dea31bf59fc792dd100e38bc02e9e2917e319fe52ee5adc3b07a952c27176d&state=cb5c1358cdf199402249d647eb86b62fcb3fc76e4c880be2" for 127.0.0.1 at 2013-11-01 17:04:00 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"10dea31bf59fc792dd100e38bc02e9e2917e319fe52ee5adc3b07a952c27176d", "state"=>"cb5c1358cdf199402249d647eb86b62fcb3fc76e4c880be2"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (8.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (5.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 25.5ms (ActiveRecord: 15.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 17:04:00 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 17:04:00 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 17:04:00 +0000 Started GET "/auth/gds/callback?code=5970f14d47f292a3ffb28f516a506a2f17431fb50ccacc770bd49fc78591639f&state=4ef9e2e606da002f74837fccd49404d83d2ffddb31bdf082" for 127.0.0.1 at 2013-11-01 17:04:00 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"5970f14d47f292a3ffb28f516a506a2f17431fb50ccacc770bd49fc78591639f", "state"=>"4ef9e2e606da002f74837fccd49404d83d2ffddb31bdf082"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (12.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (9.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 32.5ms (ActiveRecord: 21.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 17:04:00 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-02 13:09:00 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-02 13:09:00 +0000 Started GET "/auth/gds/callback?code=42e2cfed4ab7e8da0a33599bfd4cdcf757a96db59dd6ade5b15e50f05de4e4c7&state=34242a3bc5f857bcc3bb3628da94e405293e67b01fa3bd8c" for 127.0.0.1 at 2013-11-02 13:09:00 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"42e2cfed4ab7e8da0a33599bfd4cdcf757a96db59dd6ade5b15e50f05de4e4c7", "state"=>"34242a3bc5f857bcc3bb3628da94e405293e67b01fa3bd8c"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (8.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (9.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 28.5ms (ActiveRecord: 18.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-02 13:09:00 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 17:04:01 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-01 17:04:01 +0000 Started GET "/auth/gds/callback?code=7ef5aca29251a16e126031031bcca28cbbeda5d8d0a706cc838aa3969437c26c&state=cad5120c1e3a7966ef53334f646da574bbfb57123a3bc51d" for 127.0.0.1 at 2013-11-01 17:04:01 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7ef5aca29251a16e126031031bcca28cbbeda5d8d0a706cc838aa3969437c26c", "state"=>"cad5120c1e3a7966ef53334f646da574bbfb57123a3bc51d"} Authenticating with gds_sso strategy User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.2ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (17.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (43.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 71.6ms (ActiveRecord: 61.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 17:04:01 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-02 12:59:01 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 0.9ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-01 17:04:01 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 7.3ms Started GET "/restricted" for 127.0.0.1 at 2013-11-01 17:04:01 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (13.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (10.7ms) commit transaction Completed 200 OK in 65.7ms (Views: 0.2ms | ActiveRecord: 24.5ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-01 17:04:01 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (28.3ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (12.9ms) commit transaction Completed 200 OK in 86.5ms (Views: 0.3ms | ActiveRecord: 41.8ms) Connecting to database specified by database.yml  (0.9ms) select sqlite_version(*)  (27.9ms) DROP TABLE "users"  (25.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "uid" varchar(255) NOT NULL, "email" varchar(255) NOT NULL, "remotely_signed_out" boolean, "permissions" text, "organisations" text)   (0.1ms) begin transaction SQL (2.7ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d33803"]]  (55.1ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37045"]]  (10.9ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d33803"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (1.0ms) Completed 403 Forbidden in 11.9ms (Views: 11.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d33573"]]  (19.6ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32330"]]  (18.6ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d33573"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d33573' LIMIT 1  (0.1ms) begin transaction  (0.3ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ', "organisations" = '--- - justice-league ' WHERE "users"."id" = 3  (28.3ms) commit transaction Completed 200 OK in 81.1ms (ActiveRecord: 28.9ms) User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32740"]]  (41.3ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d36164"]]  (4.0ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d32740"} Completed 403 Forbidden in 1.9ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d33633"]]  (7.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38848"]]  (10.7ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 41.5ms (ActiveRecord: 0.3ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisations", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3284"]]  (13.2ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisations", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34514"]]  (13.2ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d3284"} User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d3284' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 9  (21.2ms) commit transaction Completed 200 OK in 38.6ms (ActiveRecord: 22.0ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]] Started GET "/" for 127.0.0.1 at 2013-11-04 13:35:36 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 2.2ms (Views: 1.8ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 13:35:36 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 3.0ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 13:35:36 +0000 Started GET "/auth/gds/callback?code=c924c344f013ac3797688378590a04ba1ae9e2535aa518175936391a25c4ac96&state=bf5e8ac85b6f4e19a6220542feed27e0c0f6feaf9ff2d540" for 127.0.0.1 at 2013-11-04 13:35:37 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"c924c344f013ac3797688378590a04ba1ae9e2535aa518175936391a25c4ac96", "state"=>"bf5e8ac85b6f4e19a6220542feed27e0c0f6feaf9ff2d540"} Authenticating with gds_sso strategy User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisations", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["organisations", "--- \n...\n"], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]  (11.9ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (9.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 32.0ms (ActiveRecord: 22.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 13:35:38 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.4ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 13:35:38 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.4ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 13:35:38 +0000 Started GET "/auth/gds/callback?code=5149176e9f78cec19aa81c9ac198ce84cee8d96cfd4998df9b55408636975691&state=eff59d764e0b66133a525e95067b7b1913d40dcadb9c59c6" for 127.0.0.1 at 2013-11-04 13:35:38 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"5149176e9f78cec19aa81c9ac198ce84cee8d96cfd4998df9b55408636975691", "state"=>"eff59d764e0b66133a525e95067b7b1913d40dcadb9c59c6"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "organisations" = '--- ... ', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.3ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 23.6ms (ActiveRecord: 9.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 13:35:38 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.5ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 13:35:38 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 13:35:38 +0000 Started GET "/auth/gds/callback?code=f5cbae037a6fcb5df817ba1efd0149b6b4bb8dcbfa385be7392b63fa1468e5e2&state=28c0e8113f6630b03ba8129a04d9cb967a135143533537d6" for 127.0.0.1 at 2013-11-04 13:35:38 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"f5cbae037a6fcb5df817ba1efd0149b6b4bb8dcbfa385be7392b63fa1468e5e2", "state"=>"28c0e8113f6630b03ba8129a04d9cb967a135143533537d6"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "organisations" = '--- ... ', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (10.5ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (8.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 32.3ms (ActiveRecord: 19.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 13:35:38 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 13:35:39 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.9ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 13:35:39 +0000 Started GET "/auth/gds/callback?code=db845a35036e072dc94380573da97d77ccfc53fcdee56ec85522aafc858fa697&state=5ad21eef2d1fdf156d367783f02edfde0e539cb1b1fd8856" for 127.0.0.1 at 2013-11-04 13:35:39 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"db845a35036e072dc94380573da97d77ccfc53fcdee56ec85522aafc858fa697", "state"=>"5ad21eef2d1fdf156d367783f02edfde0e539cb1b1fd8856"} Authenticating with gds_sso strategy User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.4ms) UPDATE "users" SET "organisations" = '--- ... ', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (15.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (10.3ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 82.1ms (ActiveRecord: 26.8ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 13:35:39 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3.2ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 13:35:39 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 13:35:39 +0000 Started GET "/auth/gds/callback?code=46977a946d0f03f12a04708b5be78f8466e950fb5fbb165746b78419eb3bccd1&state=5cf8b2dacc6ad26554852baf90d6c58bf2bf98f06eba17e3" for 127.0.0.1 at 2013-11-04 13:35:39 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"46977a946d0f03f12a04708b5be78f8466e950fb5fbb165746b78419eb3bccd1", "state"=>"5cf8b2dacc6ad26554852baf90d6c58bf2bf98f06eba17e3"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.3ms) UPDATE "users" SET "organisations" = '--- ... ', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (12.1ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (11.0ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 38.8ms (ActiveRecord: 23.9ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 13:35:39 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 13:35:39 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 13:35:39 +0000 Started GET "/auth/gds/callback?code=5304ce7d9ae885a8717df3df14a9fcde3edd44aa45a86fcf7d1834631b66ec0c&state=b850762192cd08f0e41161d3d74af73b1467fb89e82b3890" for 127.0.0.1 at 2013-11-04 13:35:40 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"5304ce7d9ae885a8717df3df14a9fcde3edd44aa45a86fcf7d1834631b66ec0c", "state"=>"b850762192cd08f0e41161d3d74af73b1467fb89e82b3890"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "organisations" = '--- ... ', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (2.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 21.5ms (ActiveRecord: 7.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 13:35:40 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.4ms (Views: 0.5ms | ActiveRecord: 0.2ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.3ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.5ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-11-04 13:35:40 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 3.5ms (Views: 2.5ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-11-04 13:35:40 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.5ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 13:35:40 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 13:35:40 +0000 Started GET "/auth/gds/callback?code=5100a93cc32eab9e5e894b0e3d13b3f1bcb9c7b44152ae5de207f63bd6e31c01&state=f7adfa7f325a9164b7e6967889c9b8b1ccf465d266980501" for 127.0.0.1 at 2013-11-04 13:35:40 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"5100a93cc32eab9e5e894b0e3d13b3f1bcb9c7b44152ae5de207f63bd6e31c01", "state"=>"f7adfa7f325a9164b7e6967889c9b8b1ccf465d266980501"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "organisations" = '--- ... ', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.8ms) commit transaction  (0.0ms) begin transaction  (0.3ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (2.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 19.6ms (ActiveRecord: 7.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 13:35:40 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 13:35:40 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 13:35:40 +0000 Started GET "/auth/gds/callback?code=ad65be581d1ab8a638a5057bd5f7a70cbc31e7205f9091a35890c32474eb2ff7&state=ccd2d6677c3bcd6f57a37131b6ef0383d6a2d3ef1ab3bfef" for 127.0.0.1 at 2013-11-04 13:35:41 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"ad65be581d1ab8a638a5057bd5f7a70cbc31e7205f9091a35890c32474eb2ff7", "state"=>"ccd2d6677c3bcd6f57a37131b6ef0383d6a2d3ef1ab3bfef"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "organisations" = '--- ... ', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (12.1ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (21.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 49.0ms (ActiveRecord: 34.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 13:35:41 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.6ms (Views: 0.5ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 09:40:41 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-05 09:40:41 +0000 Started GET "/auth/gds/callback?code=905ab228cd06f1d95893d1181cc714485e08ad20487804643a9d0d2b76c0982f&state=df4a40e9724487352946017ef3f2d81ec8f97ef3afa0cf8e" for 127.0.0.1 at 2013-11-05 09:40:41 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"905ab228cd06f1d95893d1181cc714485e08ad20487804643a9d0d2b76c0982f", "state"=>"df4a40e9724487352946017ef3f2d81ec8f97ef3afa0cf8e"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "organisations" = '--- ... ', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.6ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 22.1ms (ActiveRecord: 9.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 09:40:41 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 13:35:41 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 13:35:41 +0000 Started GET "/auth/gds/callback?code=2ae6829fccff7ea7f3bcb1d30ac4a3184e863b28f841574197ce2c6be87ef384&state=aae51d3ec744ed1b721da7e44270017e30deb4470dba4ec5" for 127.0.0.1 at 2013-11-04 13:35:41 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"2ae6829fccff7ea7f3bcb1d30ac4a3184e863b28f841574197ce2c6be87ef384", "state"=>"aae51d3ec744ed1b721da7e44270017e30deb4470dba4ec5"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.5ms) UPDATE "users" SET "organisations" = '--- ... ', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (11.5ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 104.1ms (ActiveRecord: 26.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 13:35:41 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.6ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 09:30:41 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 13:35:41 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 9.5ms Started GET "/restricted" for 127.0.0.1 at 2013-11-04 13:35:42 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "organisations" = '--- ... ', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.3ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.4ms) commit transaction Completed 200 OK in 93.0ms (Views: 0.3ms | ActiveRecord: 8.5ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 13:35:42 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "organisations" = '--- ... ', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.2ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ', "organisations" = '--- [] ' WHERE "users"."id" = 11  (3.0ms) commit transaction Completed 200 OK in 64.6ms (Views: 0.3ms | ActiveRecord: 8.1ms) Connecting to database specified by database.yml  (9.4ms) select sqlite_version(*)  (18.4ms) DROP TABLE "users"  (22.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, "organisation" varchar(255))   (0.1ms) begin transaction SQL (2.0ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d33738"]]  (15.6ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38282"]]  (36.1ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d33738"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.8ms) Completed 403 Forbidden in 6.5ms (Views: 5.8ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37717"]]  (30.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35830"]]  (14.7ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d37717"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d37717' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ', "organisation" = 'justice-league' WHERE "users"."id" = 3  (49.3ms) commit transaction Completed 200 OK in 68.0ms (ActiveRecord: 49.7ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37217"]]  (17.6ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38341"]]  (13.0ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d37217"} Completed 403 Forbidden in 47.2ms (Views: 46.5ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32075"]]  (12.9ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37620"]]  (13.2ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.1ms (ActiveRecord: 0.2ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32086"]]  (19.1ms) commit transaction  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37436"]]  (9.8ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d32086"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d32086' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 9  (11.0ms) commit transaction Completed 200 OK in 38.7ms (ActiveRecord: 11.5ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]] Started GET "/" for 127.0.0.1 at 2013-11-04 14:23:21 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 1.7ms (Views: 1.3ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:23:21 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 2.5ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:23:21 +0000 Started GET "/auth/gds/callback?code=da384a83b3a6568061805b1947fb87be96e8d711b420bc3b3c23b37dacccc0e8&state=8b6cacbd94812266a8bb4f3bb07fdeb88ea5716f6b41632f" for 127.0.0.1 at 2013-11-04 14:23:22 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"da384a83b3a6568061805b1947fb87be96e8d711b420bc3b3c23b37dacccc0e8", "state"=>"8b6cacbd94812266a8bb4f3bb07fdeb88ea5716f6b41632f"} Authenticating with gds_sso strategy User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]  (14.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (32.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 53.4ms (ActiveRecord: 47.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:23:23 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:23:23 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:23:23 +0000 Started GET "/auth/gds/callback?code=247818afb618c42c890acf505dbc83052d563755822ae81615b282b13ed33f4b&state=c31cc2876a5a4a9d57be33616d0e0493868a5f3d62913c5c" for 127.0.0.1 at 2013-11-04 14:23:23 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"247818afb618c42c890acf505dbc83052d563755822ae81615b282b13ed33f4b", "state"=>"c31cc2876a5a4a9d57be33616d0e0493868a5f3d62913c5c"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (20.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (28.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 56.7ms (ActiveRecord: 49.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:23:23 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:23:23 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:23:23 +0000 Started GET "/auth/gds/callback?code=daca9d6df42699141cc6665c2458b028c34abc52a7e2dcae192d0d7cc3158e70&state=88ba47da9f4b0e4465d99f06725693a78355167162261edd" for 127.0.0.1 at 2013-11-04 14:23:24 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"daca9d6df42699141cc6665c2458b028c34abc52a7e2dcae192d0d7cc3158e70", "state"=>"88ba47da9f4b0e4465d99f06725693a78355167162261edd"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (9.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 21.0ms (ActiveRecord: 14.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:23:24 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:23:24 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.6ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:23:24 +0000 Started GET "/auth/gds/callback?code=864332b280784a1ef4ed023971a5c8a1dd779eec99d413c5a9aaf761a84be0d9&state=7ea9cf955c5b3dfc549eb228c874a65d58d8d6d737d3ad7f" for 127.0.0.1 at 2013-11-04 14:23:24 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"864332b280784a1ef4ed023971a5c8a1dd779eec99d413c5a9aaf761a84be0d9", "state"=>"7ea9cf955c5b3dfc549eb228c874a65d58d8d6d737d3ad7f"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (6.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.7ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 18.7ms (ActiveRecord: 11.3ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:23:24 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.7ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:23:24 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:23:24 +0000 Started GET "/auth/gds/callback?code=9951b87914ada58bdd252f5f14a0efbdae3827be977054f5110f4a12445fa3c0&state=6f069f6bbc4e38517ae69ae5bfbe1c4ade501f221ff552b0" for 127.0.0.1 at 2013-11-04 14:23:24 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"9951b87914ada58bdd252f5f14a0efbdae3827be977054f5110f4a12445fa3c0", "state"=>"6f069f6bbc4e38517ae69ae5bfbe1c4ade501f221ff552b0"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.3ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 16.1ms (ActiveRecord: 9.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:23:24 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.6ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:23:24 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.4ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:23:24 +0000 Started GET "/auth/gds/callback?code=210a8e074512d55eee47fea15f4b6c612256fec897b90c1a30ef75dc965baa35&state=8fb1a5502e6fe5c4f6787f234c1d2b0eae7712ed0c0ae778" for 127.0.0.1 at 2013-11-04 14:23:25 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"210a8e074512d55eee47fea15f4b6c612256fec897b90c1a30ef75dc965baa35", "state"=>"8fb1a5502e6fe5c4f6787f234c1d2b0eae7712ed0c0ae778"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (28.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (2.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 39.4ms (ActiveRecord: 31.9ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:23:25 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.4ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:23:25 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 2.6ms (Views: 1.8ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-11-04 14:23:25 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.4ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:23:25 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:23:25 +0000 Started GET "/auth/gds/callback?code=2761bd4479a57e1217615dfd4c28e36cde7aa992997e995c9bda84ada2e6cd6f&state=4a6dd02c3b775097004818347ab9500ff47899d4bb0488a7" for 127.0.0.1 at 2013-11-04 14:23:25 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"2761bd4479a57e1217615dfd4c28e36cde7aa992997e995c9bda84ada2e6cd6f", "state"=>"4a6dd02c3b775097004818347ab9500ff47899d4bb0488a7"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (10.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (9.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 26.8ms (ActiveRecord: 20.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:23:25 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:23:25 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:23:25 +0000 Started GET "/auth/gds/callback?code=21b7e3cae3a2a8b24fdec3280ffc7327db7936ada9cceb3c7e5c4f4822efe121&state=96bfe5894629a149f4e37707ed7375e46ecd945783011233" for 127.0.0.1 at 2013-11-04 14:23:26 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"21b7e3cae3a2a8b24fdec3280ffc7327db7936ada9cceb3c7e5c4f4822efe121", "state"=>"96bfe5894629a149f4e37707ed7375e46ecd945783011233"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.5ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15.5ms (ActiveRecord: 8.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:23:26 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 10:28:26 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-05 10:28:26 +0000 Started GET "/auth/gds/callback?code=b44b70a671e88bd1373c5534014182b88e68f7934ca2c3cda825e0d2d98ba9db&state=6cfd3f8babc973e1d0a71334ab45cf033260745449163083" for 127.0.0.1 at 2013-11-05 10:28:26 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"b44b70a671e88bd1373c5534014182b88e68f7934ca2c3cda825e0d2d98ba9db", "state"=>"6cfd3f8babc973e1d0a71334ab45cf033260745449163083"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.5ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15.6ms (ActiveRecord: 8.9ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 10:28:26 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:23:26 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:23:26 +0000 Started GET "/auth/gds/callback?code=ab5ba2021af36a6305da1ad78d21b1b82d6d2dcfe7eb1379305c6ea87d0b1a01&state=07e9222d213b0674a99b9fcc0fb181e92617cda41884df7b" for 127.0.0.1 at 2013-11-04 14:23:26 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"ab5ba2021af36a6305da1ad78d21b1b82d6d2dcfe7eb1379305c6ea87d0b1a01", "state"=>"07e9222d213b0674a99b9fcc0fb181e92617cda41884df7b"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (12.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (9.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 30.0ms (ActiveRecord: 22.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:23:26 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 10:18:26 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 0.9ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:23:26 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 6.7ms Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:23:26 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.4ms) commit transaction Completed 200 OK in 39.0ms (Views: 0.2ms | ActiveRecord: 9.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:23:27 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (42.8ms) commit transaction Completed 200 OK in 80.4ms (Views: 0.4ms | ActiveRecord: 47.7ms) Connecting to database specified by database.yml  (0.8ms) select sqlite_version(*)  (18.3ms) DROP TABLE "users"  (21.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, "organisation" varchar(255))   (0.1ms) begin transaction SQL (2.0ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39346"]]  (20.3ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37064"]]  (16.2ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d39346"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.8ms) Completed 403 Forbidden in 16.5ms (Views: 15.8ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38640"]]  (17.6ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3740"]]  (38.9ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d38640"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d38640' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ', "organisation" = 'justice-league' WHERE "users"."id" = 3  (21.4ms) commit transaction Completed 200 OK in 29.8ms (ActiveRecord: 21.9ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39093"]]  (49.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34529"]]  (16.8ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d39093"} Completed 403 Forbidden in 1.8ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34274"]]  (19.6ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37696"]]  (11.2ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.1ms (ActiveRecord: 0.2ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3396"]]  (16.4ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32083"]]  (42.6ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d3396"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d3396' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 9  (11.8ms) commit transaction Completed 200 OK in 16.2ms (ActiveRecord: 12.2ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]] Started GET "/" for 127.0.0.1 at 2013-11-04 14:24:12 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 1.7ms (Views: 1.4ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:24:12 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 2.4ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:24:13 +0000 Started GET "/auth/gds/callback?code=219c381b0dd7dcc72d8b94f4953d71fad898e19ae9d90e5301b3c61d00257e61&state=e03254afa893379eba7af9b7067aa707d54f5c724bb3a717" for 127.0.0.1 at 2013-11-04 14:24:14 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"219c381b0dd7dcc72d8b94f4953d71fad898e19ae9d90e5301b3c61d00257e61", "state"=>"e03254afa893379eba7af9b7067aa707d54f5c724bb3a717"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]  (11.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (7.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 25.8ms (ActiveRecord: 19.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:24:14 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:24:14 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.4ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:24:14 +0000 Started GET "/auth/gds/callback?code=fc2a55617dfe4c3206bbd851a6caf1fa38b6ef9cb2827be0443339deb244460d&state=87b5d514f91bf94f732b54325bcfbc28d1b84052467a8b8b" for 127.0.0.1 at 2013-11-04 14:24:14 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"fc2a55617dfe4c3206bbd851a6caf1fa38b6ef9cb2827be0443339deb244460d", "state"=>"87b5d514f91bf94f732b54325bcfbc28d1b84052467a8b8b"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (6.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 18.5ms (ActiveRecord: 11.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:24:14 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:24:14 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:24:14 +0000 Started GET "/auth/gds/callback?code=d595be836241aa90bc659966e950280f6e8eee76a8846175d37f34741495e586&state=f9954eae5503c4ab937f1d633a67d8c09dfefb6f332cb9f9" for 127.0.0.1 at 2013-11-04 14:24:15 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"d595be836241aa90bc659966e950280f6e8eee76a8846175d37f34741495e586", "state"=>"f9954eae5503c4ab937f1d633a67d8c09dfefb6f332cb9f9"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (12.5ms) commit transaction  (0.0ms) begin transaction  (0.3ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.5ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 54.1ms (ActiveRecord: 27.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:24:15 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:24:15 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.6ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:24:15 +0000 Started GET "/auth/gds/callback?code=af11401593acbe2836a7f30ed7091a19ac4c452f16cb5d5af6ba6c14d3908aa2&state=11cc137198feb6cc9164d3398a2ae1b8021ef2f202b4e8bf" for 127.0.0.1 at 2013-11-04 14:24:15 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"af11401593acbe2836a7f30ed7091a19ac4c452f16cb5d5af6ba6c14d3908aa2", "state"=>"11cc137198feb6cc9164d3398a2ae1b8021ef2f202b4e8bf"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (6.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.0ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 18.2ms (ActiveRecord: 10.9ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:24:15 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.6ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:24:15 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:24:15 +0000 Started GET "/auth/gds/callback?code=f8992fda1490a2052aadd3c723f40012ae84b99a4cd05606421b3c02a4f347b2&state=2f4776f9fdd2dd9b81d40782e9bf450b748b84b20de9d522" for 127.0.0.1 at 2013-11-04 14:24:16 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"f8992fda1490a2052aadd3c723f40012ae84b99a4cd05606421b3c02a4f347b2", "state"=>"2f4776f9fdd2dd9b81d40782e9bf450b748b84b20de9d522"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.5ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 16.5ms (ActiveRecord: 9.2ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:24:16 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.7ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:24:16 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:24:16 +0000 Started GET "/auth/gds/callback?code=7689fcb22b3bd01f5de29ec4d599bf80e429ce99dbe5b5456d0d14c42f9a09cd&state=6a5f8bd6163c9a71e94ce109f821ada439a2c203973568bf" for 127.0.0.1 at 2013-11-04 14:24:16 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7689fcb22b3bd01f5de29ec4d599bf80e429ce99dbe5b5456d0d14c42f9a09cd", "state"=>"6a5f8bd6163c9a71e94ce109f821ada439a2c203973568bf"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.2ms (ActiveRecord: 9.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:24:16 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.5ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:24:16 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 3.1ms (Views: 2.0ms | ActiveRecord: 0.2ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-11-04 14:24:16 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.5ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:24:16 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:24:16 +0000 Started GET "/auth/gds/callback?code=8711c02afc7af6dc96b9571a0dc66013be7218a0d04f1d2715284faa2fe22a8a&state=76202f0df8abf11b94352d0a43d8f155f168ec547137df2d" for 127.0.0.1 at 2013-11-04 14:24:16 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"8711c02afc7af6dc96b9571a0dc66013be7218a0d04f1d2715284faa2fe22a8a", "state"=>"76202f0df8abf11b94352d0a43d8f155f168ec547137df2d"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.2ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15.6ms (ActiveRecord: 7.9ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:24:16 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.5ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:24:16 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:24:16 +0000 Started GET "/auth/gds/callback?code=2b6503f62e0d66f9d1f7170db46b11f1108d935438a6d4adf592ec2188219390&state=31502692a82b4a13360950ce8f8dc19d6e92192a5e4963d2" for 127.0.0.1 at 2013-11-04 14:24:17 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"2b6503f62e0d66f9d1f7170db46b11f1108d935438a6d4adf592ec2188219390", "state"=>"31502692a82b4a13360950ce8f8dc19d6e92192a5e4963d2"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (6.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.5ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.9ms (ActiveRecord: 10.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:24:17 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 10:29:17 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-05 10:29:17 +0000 Started GET "/auth/gds/callback?code=984a073012994ba86b45e73b612d34a30ecea3ec2c6dc3e7a308879077190748&state=7439342f1afd76e73924095793c10d514af78213e2a10d21" for 127.0.0.1 at 2013-11-05 10:29:17 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"984a073012994ba86b45e73b612d34a30ecea3ec2c6dc3e7a308879077190748", "state"=>"7439342f1afd76e73924095793c10d514af78213e2a10d21"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 14.1ms (ActiveRecord: 7.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 10:29:17 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:24:17 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:24:17 +0000 Started GET "/auth/gds/callback?code=c4bfb4d4fe26e2ff3df2e8832fc26cbd9608f0dd53d145b81fd2633307d71911&state=1a557cb732e8355c3c458dae7fe83075a6f588cffe583f0a" for 127.0.0.1 at 2013-11-04 14:24:17 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"c4bfb4d4fe26e2ff3df2e8832fc26cbd9608f0dd53d145b81fd2633307d71911", "state"=>"1a557cb732e8355c3c458dae7fe83075a6f588cffe583f0a"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (15.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (11.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 35.2ms (ActiveRecord: 27.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:24:17 +0000 Processing by ExampleController#restricted as HTML User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.6ms (Views: 0.3ms | ActiveRecord: 0.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 10:19:17 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:24:17 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 7.8ms Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:24:17 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (13.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (11.3ms) commit transaction Completed 200 OK in 60.2ms (Views: 0.2ms | ActiveRecord: 25.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:24:18 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (41.2ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (2.6ms) commit transaction Completed 200 OK in 75.8ms (Views: 0.2ms | ActiveRecord: 44.3ms) Connecting to database specified by database.yml  (0.7ms) select sqlite_version(*)  (45.6ms) DROP TABLE "users"  (15.5ms) 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" varchar(255))   (0.1ms) begin transaction SQL (2.1ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d33091"]]  (22.5ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39462"]]  (10.9ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d33091"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.7ms) Completed 403 Forbidden in 6.3ms (Views: 5.6ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34490"]]  (52.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d33757"]]  (30.8ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d34490"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d34490' LIMIT 1  (0.0ms) begin transaction  (0.3ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ', "organisation" = 'justice-league' WHERE "users"."id" = 3  (11.5ms) commit transaction Completed 200 OK in 93.5ms (ActiveRecord: 12.0ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3369"]]  (21.4ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d31828"]]  (13.7ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d3369"} Completed 403 Forbidden in 1.8ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39171"]]  (13.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d31827"]]  (12.5ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.1ms (ActiveRecord: 0.2ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3327"]]  (12.3ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3756"]]  (9.5ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d3327"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d3327' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 9  (37.3ms) commit transaction Completed 200 OK in 41.8ms (ActiveRecord: 37.7ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]] Started GET "/" for 127.0.0.1 at 2013-11-04 14:25:10 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 1.7ms (Views: 1.3ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:25:10 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 2.4ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:25:10 +0000 Started GET "/auth/gds/callback?code=195daa2c352cfb52b5e2363712f46cb744afb25a89bf2d657af3ff306e17abbb&state=d9c168d36fd143c46ec076ad1f4b7ca9e2665ef3a786a337" for 127.0.0.1 at 2013-11-04 14:25:11 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"195daa2c352cfb52b5e2363712f46cb744afb25a89bf2d657af3ff306e17abbb", "state"=>"d9c168d36fd143c46ec076ad1f4b7ca9e2665ef3a786a337"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]  (90.3ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (66.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 164.2ms (ActiveRecord: 157.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:25:11 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:25:12 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:25:12 +0000 Started GET "/auth/gds/callback?code=418a64021bdea90743bbc15f4dbde9e85ab3a481abd22cef768bf2e02db454ad&state=07f1b3019b1b460802eef4bcf44f1085ee4ecab541dd0cb7" for 127.0.0.1 at 2013-11-04 14:25:12 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"418a64021bdea90743bbc15f4dbde9e85ab3a481abd22cef768bf2e02db454ad", "state"=>"07f1b3019b1b460802eef4bcf44f1085ee4ecab541dd0cb7"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (12.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 35.3ms (ActiveRecord: 27.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:25:12 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:25:12 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:25:12 +0000 Started GET "/auth/gds/callback?code=1b6c2e84095fbf1ee2cf4dc1602b0410927ee58b0d527371522946b9551b5676&state=e51c8ee2d9f788920ff81837b5528c8473cd2a478695af9f" for 127.0.0.1 at 2013-11-04 14:25:12 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"1b6c2e84095fbf1ee2cf4dc1602b0410927ee58b0d527371522946b9551b5676", "state"=>"e51c8ee2d9f788920ff81837b5528c8473cd2a478695af9f"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (9.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (10.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 26.7ms (ActiveRecord: 19.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:25:12 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:25:12 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.6ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:25:12 +0000 Started GET "/auth/gds/callback?code=3ee1805861eccebbf41264289d92581823668d617880925a5603ac8bf56b67b2&state=488a7d046b1c964ede5d26bbb75df49eb27d255f5da2151a" for 127.0.0.1 at 2013-11-04 14:25:13 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"3ee1805861eccebbf41264289d92581823668d617880925a5603ac8bf56b67b2", "state"=>"488a7d046b1c964ede5d26bbb75df49eb27d255f5da2151a"} Authenticating with gds_sso strategy User Load (13.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (8.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (2.7ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 32.4ms (ActiveRecord: 25.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:25:13 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.6ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:25:13 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:25:13 +0000 Started GET "/auth/gds/callback?code=7443bac33f0a3d0ac195e532111bce7fe0dba5c155a161cb477ab19d577c1302&state=d7f5341425edae58d9420ac8036c06eeac54debe414665e1" for 127.0.0.1 at 2013-11-04 14:25:13 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7443bac33f0a3d0ac195e532111bce7fe0dba5c155a161cb477ab19d577c1302", "state"=>"d7f5341425edae58d9420ac8036c06eeac54debe414665e1"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (21.8ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 33.4ms (ActiveRecord: 26.5ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:25:13 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.7ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:25:13 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:25:13 +0000 Started GET "/auth/gds/callback?code=5b7bc32cc87b781101e06881b833ebf9af55a8ef017be9f0b5abbd763b690fe5&state=4a3d5484b0d9e338c299d20dc972e7ade3d2ad6ae6f84b5b" for 127.0.0.1 at 2013-11-04 14:25:13 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"5b7bc32cc87b781101e06881b833ebf9af55a8ef017be9f0b5abbd763b690fe5", "state"=>"4a3d5484b0d9e338c299d20dc972e7ade3d2ad6ae6f84b5b"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (26.7ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (10.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 46.2ms (ActiveRecord: 38.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:25:14 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (10.0ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:25:14 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 2.7ms (Views: 1.9ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-11-04 14:25:14 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.4ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:25:14 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:25:14 +0000 Started GET "/auth/gds/callback?code=324df068451e6d2c448759a59b92b39c5f65f48c77e694214d86e867b3cf4659&state=9425790bb76ea873961afb695285d44280f1a1d082a4e0d8" for 127.0.0.1 at 2013-11-04 14:25:14 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"324df068451e6d2c448759a59b92b39c5f65f48c77e694214d86e867b3cf4659", "state"=>"9425790bb76ea873961afb695285d44280f1a1d082a4e0d8"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.2ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (7.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 28.9ms (ActiveRecord: 21.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:25:14 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:25:14 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:25:14 +0000 Started GET "/auth/gds/callback?code=ab614bba8928fb33c709a64dbd786af4cbb82c9f0297fdadbfcaf35fb19d6cce&state=b2451a53b894bcac260ca119c19bb213e803a4d50d498216" for 127.0.0.1 at 2013-11-04 14:25:14 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"ab614bba8928fb33c709a64dbd786af4cbb82c9f0297fdadbfcaf35fb19d6cce", "state"=>"b2451a53b894bcac260ca119c19bb213e803a4d50d498216"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (16.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (13.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 38.3ms (ActiveRecord: 30.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:25:15 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 10:30:15 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-05 10:30:15 +0000 Started GET "/auth/gds/callback?code=7f6f4e8b7a424b719314c333f47355b079d19dd961c2075ebd14ffad3589b697&state=cb4fd205ee3c9793db3faa693e9401de0650eaf7b5eafb2c" for 127.0.0.1 at 2013-11-05 10:30:15 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7f6f4e8b7a424b719314c333f47355b079d19dd961c2075ebd14ffad3589b697", "state"=>"cb4fd205ee3c9793db3faa693e9401de0650eaf7b5eafb2c"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (25.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (10.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 43.5ms (ActiveRecord: 36.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 10:30:15 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:25:15 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:25:15 +0000 Started GET "/auth/gds/callback?code=5daab3185d524d158668bdda6867cba393f7b0c013fb446985a9137e5eb67e92&state=d05cc105225eabc67158e6d525b91c45530f3ebecb4ab7e2" for 127.0.0.1 at 2013-11-04 14:25:15 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"5daab3185d524d158668bdda6867cba393f7b0c013fb446985a9137e5eb67e92", "state"=>"d05cc105225eabc67158e6d525b91c45530f3ebecb4ab7e2"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.5ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.1ms (ActiveRecord: 9.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:25:15 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 10:20:15 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 0.9ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:25:15 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 6.5ms Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:25:15 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (9.1ms) commit transaction Completed 200 OK in 73.9ms (Views: 0.2ms | ActiveRecord: 24.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:25:16 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (13.3ms) commit transaction Completed 200 OK in 91.9ms (Views: 0.2ms | ActiveRecord: 28.7ms) Connecting to database specified by database.yml  (1.0ms) select sqlite_version(*)  (16.6ms) DROP TABLE "users"  (13.5ms) 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" varchar(255))   (0.1ms) begin transaction SQL (1.9ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d36499"]]  (49.4ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d31029"]]  (17.1ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d36499"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.8ms) Completed 403 Forbidden in 7.5ms (Views: 6.8ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3895"]]  (18.4ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d33240"]]  (13.9ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d3895"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d3895' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ', "organisation" = 'justice-league' WHERE "users"."id" = 3  (12.5ms) commit transaction Completed 200 OK in 25.9ms (ActiveRecord: 12.9ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3188"]]  (21.9ms) commit transaction  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35121"]]  (44.9ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d3188"} Completed 403 Forbidden in 1.7ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39205"]]  (15.4ms) commit transaction  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35990"]]  (16.9ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.1ms (ActiveRecord: 0.2ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3203"]]  (21.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d31661"]]  (31.3ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d3203"} User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d3203' LIMIT 1  (0.1ms) begin transaction  (0.3ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 9  (15.1ms) commit transaction Completed 200 OK in 31.9ms (ActiveRecord: 15.8ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]] Started GET "/" for 127.0.0.1 at 2013-11-04 14:53:14 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 1.9ms (Views: 1.5ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:53:14 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 2.6ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:53:14 +0000 Started GET "/auth/gds/callback?code=06726d4a0bc07792dccc837b0f84f328d9ada346e0fa7047ea7e936464c1fb6a&state=c0d66efb0e433e29d3c83da3d1ea09a48733d8600216406c" for 127.0.0.1 at 2013-11-04 14:53:15 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"06726d4a0bc07792dccc837b0f84f328d9ada346e0fa7047ea7e936464c1fb6a", "state"=>"c0d66efb0e433e29d3c83da3d1ea09a48733d8600216406c"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]  (14.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (12.5ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 34.1ms (ActiveRecord: 27.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:53:16 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:53:16 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:53:16 +0000 Started GET "/auth/gds/callback?code=f148b65d7bdda006a9a6373f45924020b5c06b6168341b95d49fd41db6732687&state=8c560bb3107cdfec52a8ec9de907b26ffb8516e90b1c61a1" for 127.0.0.1 at 2013-11-04 14:53:16 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"f148b65d7bdda006a9a6373f45924020b5c06b6168341b95d49fd41db6732687", "state"=>"8c560bb3107cdfec52a8ec9de907b26ffb8516e90b1c61a1"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.5ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 18.5ms (ActiveRecord: 10.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:53:16 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:53:16 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:53:16 +0000 Started GET "/auth/gds/callback?code=fbaeeaad7852416e960a0f8c41e71d00bd57f90db3ec4af5cb35018b20b593d1&state=845d7304f00743be31a1af26a2844f67d241e75b661d7b0e" for 127.0.0.1 at 2013-11-04 14:53:16 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"fbaeeaad7852416e960a0f8c41e71d00bd57f90db3ec4af5cb35018b20b593d1", "state"=>"845d7304f00743be31a1af26a2844f67d241e75b661d7b0e"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.4ms (ActiveRecord: 10.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:53:17 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:53:17 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.6ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:53:17 +0000 Started GET "/auth/gds/callback?code=9f5486bee554a2ad173289d4f9e4a2ddaeb214099e96ddfdb9c8438461610abd&state=08d34c341460a4e1d61e7a9b16b9f17f9ef6729ae2decd92" for 127.0.0.1 at 2013-11-04 14:53:17 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"9f5486bee554a2ad173289d4f9e4a2ddaeb214099e96ddfdb9c8438461610abd", "state"=>"08d34c341460a4e1d61e7a9b16b9f17f9ef6729ae2decd92"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (7.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.2ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 21.0ms (ActiveRecord: 13.3ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:53:17 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.8ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:53:17 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:53:17 +0000 Started GET "/auth/gds/callback?code=b720026a318f8e82780bea827ee9e4a9e1d0d89bc817bfa5af576225c5cc9efa&state=1623f52829d3d70cac12dcefc2f8634a2a1a1cd041c7cbb1" for 127.0.0.1 at 2013-11-04 14:53:17 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"b720026a318f8e82780bea827ee9e4a9e1d0d89bc817bfa5af576225c5cc9efa", "state"=>"1623f52829d3d70cac12dcefc2f8634a2a1a1cd041c7cbb1"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (6.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (32.2ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 46.5ms (ActiveRecord: 38.9ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:53:17 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.8ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:53:17 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:53:17 +0000 Started GET "/auth/gds/callback?code=05a06a48cab9ea38f6d93ec9880743b7d00dacba1fbf076c2600abd5cd7ad87b&state=8bcbb55b93c32a724c26b534ec01a8e0c8dab0e365b46b1e" for 127.0.0.1 at 2013-11-04 14:53:18 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"05a06a48cab9ea38f6d93ec9880743b7d00dacba1fbf076c2600abd5cd7ad87b", "state"=>"8bcbb55b93c32a724c26b534ec01a8e0c8dab0e365b46b1e"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (16.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (15.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 40.0ms (ActiveRecord: 32.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:53:18 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.6ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:53:18 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 2.7ms (Views: 1.9ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-11-04 14:53:18 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.5ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:53:18 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:53:18 +0000 Started GET "/auth/gds/callback?code=c45cce8ffe57ffea85f13c6048d7ddc7f96c7bf0f535260b7078a5f82faf67cf&state=126877e1589904c7c219dc66edbc88c12a7237599e116fef" for 127.0.0.1 at 2013-11-04 14:53:18 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"c45cce8ffe57ffea85f13c6048d7ddc7f96c7bf0f535260b7078a5f82faf67cf", "state"=>"126877e1589904c7c219dc66edbc88c12a7237599e116fef"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (38.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (10.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 56.1ms (ActiveRecord: 49.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:53:18 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:53:18 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:53:18 +0000 Started GET "/auth/gds/callback?code=9860037820951412f75aeb7aca06a4eafb1c311234565e384d07882407b67ffa&state=1401a7586ab3dbf27d58f9c74b5b83032985ea4cf1e9cc8e" for 127.0.0.1 at 2013-11-04 14:53:19 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"9860037820951412f75aeb7aca06a4eafb1c311234565e384d07882407b67ffa", "state"=>"1401a7586ab3dbf27d58f9c74b5b83032985ea4cf1e9cc8e"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (12.4ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (22.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 43.0ms (ActiveRecord: 35.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:53:19 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 10:58:19 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-05 10:58:19 +0000 Started GET "/auth/gds/callback?code=8feddcb054934cfbf8d2164c43a9320029aaef7dc4763573e41e43cf1f9a6758&state=43b29c93f0f71b31e80bd19fdb4227b1d1927ad5bde1b167" for 127.0.0.1 at 2013-11-05 10:58:19 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"8feddcb054934cfbf8d2164c43a9320029aaef7dc4763573e41e43cf1f9a6758", "state"=>"43b29c93f0f71b31e80bd19fdb4227b1d1927ad5bde1b167"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (29.2ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 40.8ms (ActiveRecord: 33.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 10:58:19 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:53:19 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:53:19 +0000 Started GET "/auth/gds/callback?code=fe26dae9665c2fee5f2729804bdbc2d118f00fd97d66a965b3522d52e76dbcd7&state=ff4cec5214be14b0250709cd3cd649308285a6c0c136b49e" for 127.0.0.1 at 2013-11-04 14:53:19 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"fe26dae9665c2fee5f2729804bdbc2d118f00fd97d66a965b3522d52e76dbcd7", "state"=>"ff4cec5214be14b0250709cd3cd649308285a6c0c136b49e"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (12.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (36.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 57.8ms (ActiveRecord: 49.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:53:19 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.3ms (Views: 0.6ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 10:48:19 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 0.9ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:53:20 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 7.1ms Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:53:20 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (13.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (26.4ms) commit transaction Completed 200 OK in 79.9ms (Views: 0.5ms | ActiveRecord: 40.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:53:20 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (12.6ms) commit transaction Completed 200 OK in 71.1ms (Views: 0.3ms | ActiveRecord: 27.4ms) Connecting to database specified by database.yml  (0.8ms) select sqlite_version(*)  (27.3ms) DROP TABLE "users"  (14.7ms) 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" varchar(255))   (0.1ms) begin transaction SQL (2.0ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3950"]]  (18.4ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39071"]]  (15.0ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d3950"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (12.2ms) Completed 403 Forbidden in 17.9ms (Views: 17.2ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3848"]]  (37.1ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3682"]]  (26.2ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d3848"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d3848' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ', "organisation" = 'justice-league' WHERE "users"."id" = 3  (18.4ms) commit transaction Completed 200 OK in 27.3ms (ActiveRecord: 18.8ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38622"]]  (23.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34018"]]  (59.8ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d38622"} Completed 403 Forbidden in 1.7ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35732"]]  (22.1ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39986"]]  (14.7ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.0ms (ActiveRecord: 0.2ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32902"]]  (24.5ms) commit transaction  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38871"]]  (16.5ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d32902"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d32902' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 9  (63.3ms) commit transaction Completed 200 OK in 67.7ms (ActiveRecord: 63.6ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]] Started GET "/" for 127.0.0.1 at 2013-11-04 14:57:18 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 1.9ms (Views: 1.5ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:57:18 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 2.6ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:57:18 +0000 Started GET "/auth/gds/callback?code=6523e9eefc06b21b57524f2e6b00fd0f7380afa648c50a84c2639fa023d41da7&state=f08907b2174d5f997abd1830f9956c56b78bcc0d17fef96a" for 127.0.0.1 at 2013-11-04 14:57:19 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"6523e9eefc06b21b57524f2e6b00fd0f7380afa648c50a84c2639fa023d41da7", "state"=>"f08907b2174d5f997abd1830f9956c56b78bcc0d17fef96a"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]  (14.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (22.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 44.3ms (ActiveRecord: 37.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:57:19 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:57:19 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:57:19 +0000 Started GET "/auth/gds/callback?code=15ad67d3f290a61f7b518c78100143d6f232f6193ef47b7f088767bec062d434&state=e7562a405a239f21f3c322c931ea07082b5e5c5c0aa02da5" for 127.0.0.1 at 2013-11-04 14:57:20 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"15ad67d3f290a61f7b518c78100143d6f232f6193ef47b7f088767bec062d434", "state"=>"e7562a405a239f21f3c322c931ea07082b5e5c5c0aa02da5"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.0ms (ActiveRecord: 8.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:57:20 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:57:20 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:57:20 +0000 Started GET "/auth/gds/callback?code=543d3d1694e849a4e64634965ba893817ac02ece0f6d03ac100aad63ba83f0ac&state=f9ff9dc9e4a3227bce79cf5b2c4c5bdebc48fcfafc1fa26f" for 127.0.0.1 at 2013-11-04 14:57:20 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"543d3d1694e849a4e64634965ba893817ac02ece0f6d03ac100aad63ba83f0ac", "state"=>"f9ff9dc9e4a3227bce79cf5b2c4c5bdebc48fcfafc1fa26f"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (27.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 39.1ms (ActiveRecord: 31.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:57:20 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:57:20 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.7ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:57:20 +0000 Started GET "/auth/gds/callback?code=d3b327860a52c4e8f42c523bd20ebe0f7ac1f93d6a53a269b9dc7398b2be259d&state=b7de822d6a291141397f4b6ce10a0dd798c18a2c78cb3927" for 127.0.0.1 at 2013-11-04 14:57:20 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"d3b327860a52c4e8f42c523bd20ebe0f7ac1f93d6a53a269b9dc7398b2be259d", "state"=>"b7de822d6a291141397f4b6ce10a0dd798c18a2c78cb3927"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.5ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 18.2ms (ActiveRecord: 10.4ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:57:20 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.9ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:57:20 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:57:20 +0000 Started GET "/auth/gds/callback?code=0ef1b000ae067c654134ab31c03c27f7858e910cb347e9dfe7f8713585070b92&state=348b4cabd989365e379ed96f0f868e9f42c52f7c2493e3a7" for 127.0.0.1 at 2013-11-04 14:57:21 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"0ef1b000ae067c654134ab31c03c27f7858e910cb347e9dfe7f8713585070b92", "state"=>"348b4cabd989365e379ed96f0f868e9f42c52f7c2493e3a7"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (17.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (9.7ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 35.1ms (ActiveRecord: 27.6ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:57:21 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.8ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:57:21 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:57:21 +0000 Started GET "/auth/gds/callback?code=8125dcd72f186b7feb785978f6538585aae7987948453c8a3f4f7b32cb5529db&state=108ff3f3ae3e28e9046bee2786378e60cb7dea1585a7b2c8" for 127.0.0.1 at 2013-11-04 14:57:21 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"8125dcd72f186b7feb785978f6538585aae7987948453c8a3f4f7b32cb5529db", "state"=>"108ff3f3ae3e28e9046bee2786378e60cb7dea1585a7b2c8"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (23.4ms) commit transaction  (0.1ms) begin transaction  (0.3ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (6.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 41.5ms (ActiveRecord: 30.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:57:21 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.2ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:57:21 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 2.9ms (Views: 1.9ms | ActiveRecord: 0.2ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-11-04 14:57:21 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.4ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:57:21 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:57:21 +0000 Started GET "/auth/gds/callback?code=e821b1b9ff9d08d9d77ef4aa29bc7c1186f4e11b4f9690c57fde46c2b2e6ac5c&state=5652b193a12f3c7141c8fcaef91ee803e9c4721cc643f8de" for 127.0.0.1 at 2013-11-04 14:57:22 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"e821b1b9ff9d08d9d77ef4aa29bc7c1186f4e11b4f9690c57fde46c2b2e6ac5c", "state"=>"5652b193a12f3c7141c8fcaef91ee803e9c4721cc643f8de"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (6.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 19.5ms (ActiveRecord: 12.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:57:22 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:57:22 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:57:22 +0000 Started GET "/auth/gds/callback?code=dab7f1966109f9030abc4c9f014283301612f8a61c846d763efa72b9d1949c83&state=3c265d92341a04132a51bcc3ca9b23e3f1e51da07fb18177" for 127.0.0.1 at 2013-11-04 14:57:22 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"dab7f1966109f9030abc4c9f014283301612f8a61c846d763efa72b9d1949c83", "state"=>"3c265d92341a04132a51bcc3ca9b23e3f1e51da07fb18177"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (13.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 36.3ms (ActiveRecord: 28.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:57:22 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 11:02:22 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-05 11:02:22 +0000 Started GET "/auth/gds/callback?code=6bc1a6226923682ce79faecd0c7b605279c693cac4c8f7c8dc4eb8ee9a636562&state=61b08f4472418cbf0f04aa3961aa1a943de5e102639269b5" for 127.0.0.1 at 2013-11-05 11:02:22 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"6bc1a6226923682ce79faecd0c7b605279c693cac4c8f7c8dc4eb8ee9a636562", "state"=>"61b08f4472418cbf0f04aa3961aa1a943de5e102639269b5"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (8.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 29.8ms (ActiveRecord: 22.9ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 11:02:22 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:57:22 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-04 14:57:22 +0000 Started GET "/auth/gds/callback?code=8644d4f33da02d60b3d6c01951d5aeadcd05a07f779f2332fee3bd4e9cae50e3&state=8dee45f043f6f8685fb6a7fe85791a702b8907d6ded9e63e" for 127.0.0.1 at 2013-11-04 14:57:23 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"8644d4f33da02d60b3d6c01951d5aeadcd05a07f779f2332fee3bd4e9cae50e3", "state"=>"8dee45f043f6f8685fb6a7fe85791a702b8907d6ded9e63e"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (10.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (21.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 40.7ms (ActiveRecord: 32.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:57:23 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-05 10:52:23 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 0.9ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:57:23 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 7.1ms Started GET "/restricted" for 127.0.0.1 at 2013-11-04 14:57:23 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (12.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (13.9ms) commit transaction Completed 200 OK in 64.2ms (Views: 0.2ms | ActiveRecord: 27.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-04 14:57:23 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (17.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.5ms) commit transaction Completed 200 OK in 87.8ms (Views: 0.2ms | ActiveRecord: 32.6ms) Connecting to database specified by database.yml  (0.8ms) select sqlite_version(*)  (43.1ms) DROP TABLE "users"  (21.7ms) 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" varchar(255))   (0.1ms) begin transaction SQL (2.1ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d326"]]  (18.1ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39034"]]  (16.4ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d326"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.7ms) Completed 403 Forbidden in 6.8ms (Views: 6.1ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d33800"]]  (51.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32959"]]  (17.9ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d33800"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d33800' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ', "organisation" = 'justice-league' WHERE "users"."id" = 3  (18.2ms) commit transaction Completed 200 OK in 37.2ms (ActiveRecord: 18.6ms) User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d31577"]]  (14.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3392"]]  (49.9ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d31577"} Completed 403 Forbidden in 1.7ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3170"]]  (19.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35949"]]  (13.0ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.1ms (ActiveRecord: 0.2ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32504"]]  (14.1ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37684"]]  (13.0ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d32504"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d32504' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 9  (45.1ms) commit transaction Completed 200 OK in 49.5ms (ActiveRecord: 45.5ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]] Started GET "/" for 127.0.0.1 at 2013-11-06 17:46:49 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 1.8ms (Views: 1.4ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-06 17:46:49 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 2.4ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-06 17:46:49 +0000 Started GET "/auth/gds/callback?code=3144d74f111bf5981034b9dcee0d94a02c0bc2277cff644bb406b54269756ce5&state=73210209439dff30038aff64ff67f25436d70222cef4c708" for 127.0.0.1 at 2013-11-06 17:46:50 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"3144d74f111bf5981034b9dcee0d94a02c0bc2277cff644bb406b54269756ce5", "state"=>"73210209439dff30038aff64ff67f25436d70222cef4c708"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]  (14.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (45.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 66.8ms (ActiveRecord: 60.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-06 17:46:50 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-06 17:46:50 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-06 17:46:50 +0000 Started GET "/auth/gds/callback?code=8e626979c90717068751e717ccc11ed0cd8213c352eb170428da39093e5ca20e&state=e54880e1e22c7b5f4879466f9faff35dbcb0633b0f11046d" for 127.0.0.1 at 2013-11-06 17:46:50 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"8e626979c90717068751e717ccc11ed0cd8213c352eb170428da39093e5ca20e", "state"=>"e54880e1e22c7b5f4879466f9faff35dbcb0633b0f11046d"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (10.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 33.2ms (ActiveRecord: 25.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-06 17:46:51 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-06 17:46:51 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-06 17:46:51 +0000 Started GET "/auth/gds/callback?code=7f75c9678822704190a50305fde10a70e4d5dbe11a25c3231f824934ad04f8d7&state=e1c14be217db6e4cb1dcc3c48ecc37ab80738a93d2b42a49" for 127.0.0.1 at 2013-11-06 17:46:51 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7f75c9678822704190a50305fde10a70e4d5dbe11a25c3231f824934ad04f8d7", "state"=>"e1c14be217db6e4cb1dcc3c48ecc37ab80738a93d2b42a49"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (6.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (6.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 20.7ms (ActiveRecord: 13.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-06 17:46:51 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-06 17:46:51 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.6ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-06 17:46:51 +0000 Started GET "/auth/gds/callback?code=ea7453d36c93aaec69cbe4599ae38f683f907868597e4d42e9a5f3f15b50b38a&state=07e30914377ae326f26b557b9590e4d3b6e5020dcff5a572" for 127.0.0.1 at 2013-11-06 17:46:51 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"ea7453d36c93aaec69cbe4599ae38f683f907868597e4d42e9a5f3f15b50b38a", "state"=>"07e30914377ae326f26b557b9590e4d3b6e5020dcff5a572"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (13.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (12.4ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 34.2ms (ActiveRecord: 26.7ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-06 17:46:51 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.7ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-06 17:46:51 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-06 17:46:51 +0000 Started GET "/auth/gds/callback?code=4ebe2eb5d129b66775e23cb0944e5e9ce9b4f7a5b6858759da2c4cd2686bf057&state=f5aeef45797ecca1a7a68b11b483768c958ad05fc2be8834" for 127.0.0.1 at 2013-11-06 17:46:52 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"4ebe2eb5d129b66775e23cb0944e5e9ce9b4f7a5b6858759da2c4cd2686bf057", "state"=>"f5aeef45797ecca1a7a68b11b483768c958ad05fc2be8834"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (8.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.5ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 20.7ms (ActiveRecord: 13.3ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-06 17:46:52 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.7ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-06 17:46:52 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-06 17:46:52 +0000 Started GET "/auth/gds/callback?code=a9e0cb8429ed2b5c8fc20593ae2b8d9b42356023cdbf30a6da3c72ab500c14b6&state=6ccac22d2bbadd5703d1fc0a28f353bba79a92bf3e9ea365" for 127.0.0.1 at 2013-11-06 17:46:52 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"a9e0cb8429ed2b5c8fc20593ae2b8d9b42356023cdbf30a6da3c72ab500c14b6", "state"=>"6ccac22d2bbadd5703d1fc0a28f353bba79a92bf3e9ea365"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (6.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 19.3ms (ActiveRecord: 11.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-06 17:46:52 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.2ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (6.1ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-11-06 17:46:52 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 2.7ms (Views: 1.8ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-11-06 17:46:52 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.4ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-06 17:46:52 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.4ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-06 17:46:52 +0000 Started GET "/auth/gds/callback?code=e10e68bda70950d8d26d21522e273add9ba549a6b0d8a0fd19bb24046653cad6&state=e7dfadafe9c96cfc6367850ca7d66d1c03d5d781b0b7d238" for 127.0.0.1 at 2013-11-06 17:46:52 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"e10e68bda70950d8d26d21522e273add9ba549a6b0d8a0fd19bb24046653cad6", "state"=>"e7dfadafe9c96cfc6367850ca7d66d1c03d5d781b0b7d238"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (10.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (10.9ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 29.0ms (ActiveRecord: 22.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-06 17:46:52 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-06 17:46:53 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-06 17:46:53 +0000 Started GET "/auth/gds/callback?code=f1b1f695738669cc168af6829dc2776cd08a3f092c62c879fb108d67f570f60a&state=9a39df313afe7e12ff5ff7598b3bf1d1e49975ba2bd185ae" for 127.0.0.1 at 2013-11-06 17:46:53 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"f1b1f695738669cc168af6829dc2776cd08a3f092c62c879fb108d67f570f60a", "state"=>"9a39df313afe7e12ff5ff7598b3bf1d1e49975ba2bd185ae"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (16.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (9.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 34.1ms (ActiveRecord: 26.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-06 17:46:53 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-07 13:51:53 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-07 13:51:53 +0000 Started GET "/auth/gds/callback?code=35222d3a35cd2ccfa17bcbadc4f961ebef52ec7149ce0ced6d3332ea755f2396&state=d71d6c22a479ada2d30b3ae490fd8ca6c5e478d34d3bd644" for 127.0.0.1 at 2013-11-07 13:51:53 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"35222d3a35cd2ccfa17bcbadc4f961ebef52ec7149ce0ced6d3332ea755f2396", "state"=>"d71d6c22a479ada2d30b3ae490fd8ca6c5e478d34d3bd644"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (10.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (8.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 25.6ms (ActiveRecord: 18.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-07 13:51:53 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-06 17:46:53 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-06 17:46:53 +0000 Started GET "/auth/gds/callback?code=7ac79b2d6c71cd05d1f4e0fc6660144c64c988a0a69464fa6d27ebe750a32b4c&state=5015a361126ec3f15aa0d59deb2fddd53529a5fb78ce2d61" for 127.0.0.1 at 2013-11-06 17:46:54 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7ac79b2d6c71cd05d1f4e0fc6660144c64c988a0a69464fa6d27ebe750a32b4c", "state"=>"5015a361126ec3f15aa0d59deb2fddd53529a5fb78ce2d61"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (42.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 64.8ms (ActiveRecord: 56.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-06 17:46:54 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-07 13:41:54 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 0.9ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-06 17:46:54 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 6.9ms Started GET "/restricted" for 127.0.0.1 at 2013-11-06 17:46:54 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (7.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (17.3ms) commit transaction Completed 200 OK in 58.6ms (Views: 0.4ms | ActiveRecord: 25.4ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-06 17:46:54 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (16.2ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (11.2ms) commit transaction Completed 200 OK in 82.6ms (Views: 0.3ms | ActiveRecord: 27.9ms) Connecting to database specified by database.yml  (0.8ms) select sqlite_version(*)  (23.5ms) DROP TABLE "users"  (13.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "uid" varchar(255) NOT NULL, "email" varchar(255) NOT NULL, "remotely_signed_out" boolean, "permissions" text, "organisation" varchar(255))   (0.1ms) begin transaction SQL (2.0ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38230"]]  (26.1ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35602"]]  (27.9ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d38230"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (13.1ms) Completed 403 Forbidden in 18.9ms (Views: 18.2ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3328"]]  (52.1ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37283"]]  (16.2ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d3328"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d3328' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ', "organisation" = 'justice-league' WHERE "users"."id" = 3  (22.5ms) commit transaction Completed 200 OK in 31.1ms (ActiveRecord: 22.9ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37431"]]  (19.6ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37412"]]  (12.5ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d37431"} Completed 403 Forbidden in 1.8ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d36141"]]  (15.6ms) commit transaction  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35540"]]  (47.5ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.1ms (ActiveRecord: 0.2ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d357"]]  (15.2ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d3580"]]  (15.6ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d357"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d357' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 9  (53.0ms) commit transaction Completed 200 OK in 57.4ms (ActiveRecord: 53.4ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]] Started GET "/" for 127.0.0.1 at 2013-11-08 14:47:06 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 1.8ms (Views: 1.4ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 14:47:06 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 2.6ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 14:47:06 +0000 Started GET "/auth/gds/callback?code=d4511e53b9abd965f3595a247e507d54dd3fce55a984a9355b4d26cef31b2712&state=78c429951376e527b6978caf44ca97e17fa2fa55ec1abc77" for 127.0.0.1 at 2013-11-08 14:47:07 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"d4511e53b9abd965f3595a247e507d54dd3fce55a984a9355b4d26cef31b2712", "state"=>"78c429951376e527b6978caf44ca97e17fa2fa55ec1abc77"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["organisation", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]  (35.9ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 57.3ms (ActiveRecord: 50.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 14:47:07 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 14:47:08 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 14:47:08 +0000 Started GET "/auth/gds/callback?code=4b7ad14e0455c3da5f408120116b640e94d72c31ffe68e646f5ce8cc7d6405e6&state=393752b84fc58af21ac2d5db1d9c47faa072269d499669c2" for 127.0.0.1 at 2013-11-08 14:47:08 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"4b7ad14e0455c3da5f408120116b640e94d72c31ffe68e646f5ce8cc7d6405e6", "state"=>"393752b84fc58af21ac2d5db1d9c47faa072269d499669c2"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.2ms (ActiveRecord: 9.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 14:47:08 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 14:47:08 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 14:47:08 +0000 Started GET "/auth/gds/callback?code=614cf71fa0731ff14d8845afb80207c5fb1853a7bb56da15e455d3aedcac4d6e&state=1cd84871ecc06fbe00682977252c39e94ab7c9dbe895f1a7" for 127.0.0.1 at 2013-11-08 14:47:08 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"614cf71fa0731ff14d8845afb80207c5fb1853a7bb56da15e455d3aedcac4d6e", "state"=>"1cd84871ecc06fbe00682977252c39e94ab7c9dbe895f1a7"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (17.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 30.2ms (ActiveRecord: 23.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 14:47:08 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-08 14:47:08 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.6ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 14:47:08 +0000 Started GET "/auth/gds/callback?code=36e9b0e5ad83d2031b66453db2162340df11709faab16b9f42a0e0314aa17a0a&state=41c80f6e0b9cd6e9390bdc0247f58f3f728823353810bd4b" for 127.0.0.1 at 2013-11-08 14:47:09 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"36e9b0e5ad83d2031b66453db2162340df11709faab16b9f42a0e0314aa17a0a", "state"=>"41c80f6e0b9cd6e9390bdc0247f58f3f728823353810bd4b"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.4ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 17.4ms (ActiveRecord: 9.7ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-08 14:47:09 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.7ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-08 14:47:09 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 14:47:09 +0000 Started GET "/auth/gds/callback?code=610ccfeebb25e1eb50e0d050ac1d89b798760d53134366fa47db76517a039a28&state=71fad6c7a516a79a2323ccddd9a7ee5a2299127171a88f45" for 127.0.0.1 at 2013-11-08 14:47:09 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"610ccfeebb25e1eb50e0d050ac1d89b798760d53134366fa47db76517a039a28", "state"=>"71fad6c7a516a79a2323ccddd9a7ee5a2299127171a88f45"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (15.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.0ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 37.7ms (ActiveRecord: 30.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-08 14:47:09 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3.0ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 14:47:09 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 14:47:09 +0000 Started GET "/auth/gds/callback?code=3018b9c29dff911c3391b72a9440202c5ca28fe734633364ecda51e74d467c50&state=24539d85d63c7ca7bcc64fce3769779a247fc031a4ae6a04" for 127.0.0.1 at 2013-11-08 14:47:09 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"3018b9c29dff911c3391b72a9440202c5ca28fe734633364ecda51e74d467c50", "state"=>"24539d85d63c7ca7bcc64fce3769779a247fc031a4ae6a04"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (16.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (10.5ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 34.9ms (ActiveRecord: 27.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 14:47:09 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.3ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.6ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-11-08 14:47:10 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 2.8ms (Views: 1.9ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-11-08 14:47:10 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.5ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 14:47:10 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 14:47:10 +0000 Started GET "/auth/gds/callback?code=11262864dac7b5748763fa7bfa1bb3392a6559dcf4c48621d633f7af27530df4&state=162f3bb99bb82007f86536f4091ffdd10251dc74bb98a854" for 127.0.0.1 at 2013-11-08 14:47:10 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"11262864dac7b5748763fa7bfa1bb3392a6559dcf4c48621d633f7af27530df4", "state"=>"162f3bb99bb82007f86536f4091ffdd10251dc74bb98a854"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (13.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (11.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 31.8ms (ActiveRecord: 24.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 14:47:10 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 14:47:10 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 14:47:10 +0000 Started GET "/auth/gds/callback?code=dddeddc33498f17d2535d8503c383a85d60647e80d1a7d16a4e2dc157224d545&state=5c9346b3cec8b8ab243afa4cf46ef6f300cbbfc733e8c7c8" for 127.0.0.1 at 2013-11-08 14:47:10 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"dddeddc33498f17d2535d8503c383a85d60647e80d1a7d16a4e2dc157224d545", "state"=>"5c9346b3cec8b8ab243afa4cf46ef6f300cbbfc733e8c7c8"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (10.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (13.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 31.5ms (ActiveRecord: 23.9ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 14:47:10 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-09 10:52:10 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-09 10:52:10 +0000 Started GET "/auth/gds/callback?code=7777f0245ed85c93eeaec2239c0f7d4269f3a51c686702455796e59a31e08bee&state=47c5e7bd7aef3fe9dc1310974b8e05f14c6e37474f2d0ad4" for 127.0.0.1 at 2013-11-09 10:52:10 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7777f0245ed85c93eeaec2239c0f7d4269f3a51c686702455796e59a31e08bee", "state"=>"47c5e7bd7aef3fe9dc1310974b8e05f14c6e37474f2d0ad4"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (31.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (9.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 48.5ms (ActiveRecord: 41.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-09 10:52:11 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 14:47:11 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 14:47:11 +0000 Started GET "/auth/gds/callback?code=937ba0d676e1d64a2ab8917afbf21668c6ba8609eae1119285f8bec3bfdb0bf5&state=eb2dff280e8ce23260562a506ae04af5d22164b0ccc01b12" for 127.0.0.1 at 2013-11-08 14:47:11 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"937ba0d676e1d64a2ab8917afbf21668c6ba8609eae1119285f8bec3bfdb0bf5", "state"=>"eb2dff280e8ce23260562a506ae04af5d22164b0ccc01b12"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (11.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (11.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 32.3ms (ActiveRecord: 24.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 14:47:11 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-09 10:42:11 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 14:47:11 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 11.6ms Started GET "/restricted" for 127.0.0.1 at 2013-11-08 14:47:11 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (11.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (6.5ms) commit transaction Completed 200 OK in 55.5ms (Views: 0.2ms | ActiveRecord: 18.5ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-08 14:47:11 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.1ms) commit transaction Completed 200 OK in 63.0ms (Views: 0.2ms | ActiveRecord: 10.4ms) Connecting to database specified by database.yml  (0.9ms) select sqlite_version(*)  (17.3ms) DROP TABLE "users"  (14.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "uid" varchar(255) NOT NULL, "email" varchar(255) NOT NULL, "remotely_signed_out" boolean, "permissions" text, "organisation_slug" varchar(255))   (0.1ms) begin transaction SQL (2.1ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38035"]]  (47.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d31250"]]  (10.0ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d38035"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.8ms) Completed 403 Forbidden in 9.0ms (Views: 8.3ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32362"]]  (36.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37496"]]  (13.0ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d32362"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d32362' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ', "organisation_slug" = 'justice-league' WHERE "users"."id" = 3  (14.2ms) commit transaction Completed 200 OK in 22.7ms (ActiveRecord: 14.6ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35967"]]  (60.1ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38552"]]  (18.4ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d35967"} Completed 403 Forbidden in 1.7ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38024"]]  (19.5ms) commit transaction  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37858"]]  (14.7ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.2ms (ActiveRecord: 0.2ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d317"]]  (48.3ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d31792"]]  (27.9ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d317"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d317' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 9  (16.7ms) commit transaction Completed 200 OK in 21.7ms (ActiveRecord: 17.2ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]] Started GET "/" for 127.0.0.1 at 2013-11-08 15:01:21 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 1.7ms (Views: 1.4ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:01:21 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 2.5ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:01:21 +0000 Started GET "/auth/gds/callback?code=bef86a39b09b0998ac8c8b2d31bea4c7a9830c5e2009a9b7cb801ac19436f7c6&state=d6b1f002da22f88aa0f51e25c2995705f2a2aad3629e156c" for 127.0.0.1 at 2013-11-08 15:01:22 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"bef86a39b09b0998ac8c8b2d31bea4c7a9830c5e2009a9b7cb801ac19436f7c6", "state"=>"d6b1f002da22f88aa0f51e25c2995705f2a2aad3629e156c"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]  (47.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (9.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 63.6ms (ActiveRecord: 57.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:01:22 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:01:23 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:01:23 +0000 Started GET "/auth/gds/callback?code=30478aca56e02750ac6b743c0afc7761734800c512f1416dc39b66a39677df9f&state=d98d9fc90c7029ebcfe3b03834fea279721136dec30cc065" for 127.0.0.1 at 2013-11-08 15:01:23 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"30478aca56e02750ac6b743c0afc7761734800c512f1416dc39b66a39677df9f", "state"=>"d98d9fc90c7029ebcfe3b03834fea279721136dec30cc065"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (9.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 33.6ms (ActiveRecord: 25.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:01:23 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:01:23 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:01:23 +0000 Started GET "/auth/gds/callback?code=dbb6952b4512dc6d678e15e6bf41d64bb6f17d57c7289d1e36b95933ee8f4057&state=87509ffa738bd65b1f823372e8f2ebe7a4980eb69bcc375d" for 127.0.0.1 at 2013-11-08 15:01:23 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"dbb6952b4512dc6d678e15e6bf41d64bb6f17d57c7289d1e36b95933ee8f4057", "state"=>"87509ffa738bd65b1f823372e8f2ebe7a4980eb69bcc375d"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.4ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.3ms (ActiveRecord: 9.3ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:01:23 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-08 15:01:23 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.6ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:01:23 +0000 Started GET "/auth/gds/callback?code=d99b30e79b5feab446bdeb3d52da096b24598dd7f1f36082c85f9408458771af&state=440b860600ba1872fd19bd1e61e262fc12219f4e9d16963f" for 127.0.0.1 at 2013-11-08 15:01:24 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"d99b30e79b5feab446bdeb3d52da096b24598dd7f1f36082c85f9408458771af", "state"=>"440b860600ba1872fd19bd1e61e262fc12219f4e9d16963f"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.1ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 16.1ms (ActiveRecord: 8.6ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-08 15:01:24 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-08 15:01:24 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:01:24 +0000 Started GET "/auth/gds/callback?code=ad0e4943dcb83533de6bd7ce753eadb5e8541fb8f0b3feaac339204bb180f557&state=c1fb6e74a4e5e3ff96833cd091d44691a021a5d5ae878d8f" for 127.0.0.1 at 2013-11-08 15:01:24 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"ad0e4943dcb83533de6bd7ce753eadb5e8541fb8f0b3feaac339204bb180f557", "state"=>"c1fb6e74a4e5e3ff96833cd091d44691a021a5d5ae878d8f"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (8.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (6.0ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 21.6ms (ActiveRecord: 14.6ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-08 15:01:24 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.7ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:01:24 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:01:24 +0000 Started GET "/auth/gds/callback?code=d2c5c2a6aacd0a736b2248e9355f4455b664f884911fd07fd3acf8b75e3c446c&state=1b546fb384dc7f0bd4eb7be1b17ee0c83842bc852f46fd31" for 127.0.0.1 at 2013-11-08 15:01:24 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"d2c5c2a6aacd0a736b2248e9355f4455b664f884911fd07fd3acf8b75e3c446c", "state"=>"1b546fb384dc7f0bd4eb7be1b17ee0c83842bc852f46fd31"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (6.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (6.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 21.5ms (ActiveRecord: 13.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:01:24 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.2ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:01:24 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 2.7ms (Views: 1.9ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-11-08 15:01:24 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.4ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:01:25 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:01:25 +0000 Started GET "/auth/gds/callback?code=94f0057c367d3c242c67eb40f67770f23b18de3f9ae8782023ffbf527802db8e&state=278080b1b7100342f586e07f2211323b2059a3e3073ded42" for 127.0.0.1 at 2013-11-08 15:01:25 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"94f0057c367d3c242c67eb40f67770f23b18de3f9ae8782023ffbf527802db8e", "state"=>"278080b1b7100342f586e07f2211323b2059a3e3073ded42"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (11.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (29.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 47.8ms (ActiveRecord: 40.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:01:25 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:01:25 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:01:25 +0000 Started GET "/auth/gds/callback?code=6bd96c038b7a4b3da7de36dc97fabcf73811277e7ffb2ba71b9361a065e56806&state=2aa83e648b56336a9951a2b3d7f381987bfe4925c98ee94f" for 127.0.0.1 at 2013-11-08 15:01:25 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"6bd96c038b7a4b3da7de36dc97fabcf73811277e7ffb2ba71b9361a065e56806", "state"=>"2aa83e648b56336a9951a2b3d7f381987bfe4925c98ee94f"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (49.4ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (10.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 68.8ms (ActiveRecord: 60.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:01:25 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-09 11:06:25 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-09 11:06:25 +0000 Started GET "/auth/gds/callback?code=ea4fd4e60ce54b9f456a11a5d209618c58e2800eb4d1dead071923188819bbd4&state=905f434431c0548a3f6b9913de56ab9ec0852fe32d82d2dc" for 127.0.0.1 at 2013-11-09 11:06:25 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"ea4fd4e60ce54b9f456a11a5d209618c58e2800eb4d1dead071923188819bbd4", "state"=>"905f434431c0548a3f6b9913de56ab9ec0852fe32d82d2dc"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (9.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (9.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 25.9ms (ActiveRecord: 19.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-09 11:06:25 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:01:26 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:01:26 +0000 Started GET "/auth/gds/callback?code=40276fb1d0d0ef231f866bbcbc79bdc8204fe9134ed182d8041586413eb461e3&state=b0aecdac0e4b9475f8f682eae7a8964810bb38fc5a127a37" for 127.0.0.1 at 2013-11-08 15:01:26 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"40276fb1d0d0ef231f866bbcbc79bdc8204fe9134ed182d8041586413eb461e3", "state"=>"b0aecdac0e4b9475f8f682eae7a8964810bb38fc5a127a37"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.6ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.1ms (ActiveRecord: 9.5ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:01:26 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-09 10:56:26 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.0ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:01:26 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 6.9ms Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:01:26 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.0ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (11.4ms) commit transaction Completed 200 OK in 70.0ms (Views: 0.2ms | ActiveRecord: 25.9ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-08 15:01:26 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (10.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (10.8ms) commit transaction Completed 200 OK in 61.1ms (Views: 0.2ms | ActiveRecord: 22.2ms) Connecting to database specified by database.yml  (0.8ms) select sqlite_version(*)  (37.7ms) DROP TABLE "users"  (16.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "uid" varchar(255) NOT NULL, "email" varchar(255) NOT NULL, "remotely_signed_out" boolean, "permissions" text, "organisation_slug" varchar(255))   (0.1ms) begin transaction SQL (2.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d31283"]]  (17.1ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34722"]]  (10.9ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d31283"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.7ms) Completed 403 Forbidden in 6.3ms (Views: 5.6ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39153"]]  (37.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35638"]]  (17.6ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d39153"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d39153' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ', "organisation_slug" = 'justice-league' WHERE "users"."id" = 3  (18.9ms) commit transaction Completed 200 OK in 47.8ms (ActiveRecord: 19.3ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d34567"]]  (17.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35651"]]  (32.1ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d34567"} Completed 403 Forbidden in 1.7ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d36922"]]  (20.4ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32073"]]  (42.1ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.1ms (ActiveRecord: 0.2ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35898"]]  (16.3ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d33825"]]  (11.3ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d35898"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d35898' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 9  (8.3ms) commit transaction Completed 200 OK in 12.6ms (ActiveRecord: 8.7ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]] Started GET "/" for 127.0.0.1 at 2013-11-08 15:02:41 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 1.7ms (Views: 1.4ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:02:41 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 2.6ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:02:41 +0000 Started GET "/auth/gds/callback?code=1f15bab7459e5266f1631dd56cb797d19ffb7f39fb208d6e5fc307e82d73da02&state=051c120b8039dc740b5e8362c6971514ab9faec4ef97d765" for 127.0.0.1 at 2013-11-08 15:02:42 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"1f15bab7459e5266f1631dd56cb797d19ffb7f39fb208d6e5fc307e82d73da02", "state"=>"051c120b8039dc740b5e8362c6971514ab9faec4ef97d765"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]  (14.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (32.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 54.5ms (ActiveRecord: 48.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:02:42 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:02:43 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:02:43 +0000 Started GET "/auth/gds/callback?code=dd3db402e9ab7ae7815822077965e419c0fdf62a954acf781c4b8643b7f9eabe&state=e9deeedfb741a7c17c158ad118d9cda95b4110b2ce266cb6" for 127.0.0.1 at 2013-11-08 15:02:43 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"dd3db402e9ab7ae7815822077965e419c0fdf62a954acf781c4b8643b7f9eabe", "state"=>"e9deeedfb741a7c17c158ad118d9cda95b4110b2ce266cb6"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (31.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (13.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 53.0ms (ActiveRecord: 45.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:02:43 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:02:43 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:02:43 +0000 Started GET "/auth/gds/callback?code=327eaa7790a9b208216bf2519d85c13f42dc71305402f0a13fc2be2e09e8d56c&state=4714a2b35f3b1481cc7274fbdd5ac5d73a4c5b85e0133d22" for 127.0.0.1 at 2013-11-08 15:02:43 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"327eaa7790a9b208216bf2519d85c13f42dc71305402f0a13fc2be2e09e8d56c", "state"=>"4714a2b35f3b1481cc7274fbdd5ac5d73a4c5b85e0133d22"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (9.2ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.1ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 21.7ms (ActiveRecord: 13.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:02:43 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-08 15:02:43 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.6ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:02:43 +0000 Started GET "/auth/gds/callback?code=404da1bf910fa7c838547c386139a7c25281491089bd87fbca64729e4a95f54a&state=e9602bc6256396e03cf5afb38bb3849ef728407de2890a2e" for 127.0.0.1 at 2013-11-08 15:02:44 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"404da1bf910fa7c838547c386139a7c25281491089bd87fbca64729e4a95f54a", "state"=>"e9602bc6256396e03cf5afb38bb3849ef728407de2890a2e"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (20.5ms) commit transaction  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (13.2ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 41.7ms (ActiveRecord: 34.2ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-08 15:02:44 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.9ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-08 15:02:44 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:02:44 +0000 Started GET "/auth/gds/callback?code=2b710235af52d25f3967040ab08c3f3ccb3f4762b444a0b99d2ec46fd874271b&state=a95408ed3e33f548280066d979ef8c0f23781dcb6459fd62" for 127.0.0.1 at 2013-11-08 15:02:44 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"2b710235af52d25f3967040ab08c3f3ccb3f4762b444a0b99d2ec46fd874271b", "state"=>"a95408ed3e33f548280066d979ef8c0f23781dcb6459fd62"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (9.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (7.5ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 24.7ms (ActiveRecord: 17.3ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-08 15:02:44 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.8ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:02:44 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:02:44 +0000 Started GET "/auth/gds/callback?code=4e80b394e7d82a0f0eb6c73d7094fc61d0f47e2359720f81ad3f66eb39b7b7f8&state=2aea5dad89f223eec5195924a904865d4fa5150140660a74" for 127.0.0.1 at 2013-11-08 15:02:44 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"4e80b394e7d82a0f0eb6c73d7094fc61d0f47e2359720f81ad3f66eb39b7b7f8", "state"=>"2aea5dad89f223eec5195924a904865d4fa5150140660a74"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (23.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (13.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 44.1ms (ActiveRecord: 36.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:02:45 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.4ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (12.3ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:02:45 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 2.6ms (Views: 1.8ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-11-08 15:02:45 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.4ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:02:45 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:02:45 +0000 Started GET "/auth/gds/callback?code=1a57cb546ccdad7aa04689a6bb3a6de966d3efa64f37bcbe778dbc6f5fcb0734&state=e6ded0e740602f55d1873db2db40e81074c6e3f91ead341a" for 127.0.0.1 at 2013-11-08 15:02:45 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"1a57cb546ccdad7aa04689a6bb3a6de966d3efa64f37bcbe778dbc6f5fcb0734", "state"=>"e6ded0e740602f55d1873db2db40e81074c6e3f91ead341a"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (11.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 33.8ms (ActiveRecord: 26.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:02:45 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:02:45 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:02:45 +0000 Started GET "/auth/gds/callback?code=b625d658705eecd075b56afec46f5590656138db8a381a9bd846bed189ad8ad2&state=87203e24e342df13610bafdb56805b97f7d4486eb0430fdd" for 127.0.0.1 at 2013-11-08 15:02:45 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"b625d658705eecd075b56afec46f5590656138db8a381a9bd846bed189ad8ad2", "state"=>"87203e24e342df13610bafdb56805b97f7d4486eb0430fdd"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (66.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (56.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 131.6ms (ActiveRecord: 123.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:02:46 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-09 11:07:46 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-09 11:07:46 +0000 Started GET "/auth/gds/callback?code=f05a46d8c299f4ef3805ced576f6a99f7a299840a3e05969fd04097439cc0fe4&state=001047c5812986e315961437d22b6cf2bbc43b0211873952" for 127.0.0.1 at 2013-11-09 11:07:46 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"f05a46d8c299f4ef3805ced576f6a99f7a299840a3e05969fd04097439cc0fe4", "state"=>"001047c5812986e315961437d22b6cf2bbc43b0211873952"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (58.7ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (51.5ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 117.8ms (ActiveRecord: 110.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-09 11:07:46 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:02:46 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-08 15:02:46 +0000 Started GET "/auth/gds/callback?code=d5c34ecf9181c70ec56312dddd27ea0734989b8dcde8304f3dfb4803a29f4b78&state=e37813311ff3b59220be09b94b63436c9ca508bb00b5f241" for 127.0.0.1 at 2013-11-08 15:02:47 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"d5c34ecf9181c70ec56312dddd27ea0734989b8dcde8304f3dfb4803a29f4b78", "state"=>"e37813311ff3b59220be09b94b63436c9ca508bb00b5f241"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (20.2ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (14.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 42.8ms (ActiveRecord: 34.7ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:02:47 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-09 10:57:47 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 0.9ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:02:47 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 6.8ms Started GET "/restricted" for 127.0.0.1 at 2013-11-08 15:02:47 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (8.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (7.7ms) commit transaction Completed 200 OK in 51.7ms (Views: 0.2ms | ActiveRecord: 16.8ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-08 15:02:47 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (8.5ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.4ms) commit transaction Completed 200 OK in 59.7ms (Views: 0.2ms | ActiveRecord: 14.3ms) Connecting to database specified by database.yml  (0.8ms) select sqlite_version(*)  (9.1ms) DROP TABLE "users"  (3.7ms) 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))   (0.1ms) begin transaction SQL (2.0ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d30"]]  (4.3ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d33399"]]  (3.3ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d30"} Rendered /home/jenkins/workspace/govuk_gds_sso/app/views/authorisations/unauthorised.html.erb within layouts/unauthorised (0.8ms) Completed 403 Forbidden in 7.3ms (Views: 6.7ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d38521"]]  (3.7ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35691"]]  (5.6ms) commit transaction Processing by Api::UserController#update as HTML Parameters: {"uid"=>"a1s2d38521"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d38521' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "email" = 'user@domain.com', "name" = 'Joshua Marshall', "permissions" = '--- - signin - new permission ', "organisation_slug" = 'justice-league' WHERE "users"."id" = 3  (5.1ms) commit transaction Completed 200 OK in 13.7ms (ActiveRecord: 5.6ms) User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 3]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d33671"]]  (4.9ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d32493"]]  (3.7ms) commit transaction WARNING: Can't mass-assign protected attributes: uid, name, permissions Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d33671"} Completed 403 Forbidden in 1.6ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35466"]]  (4.0ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d35920"]]  (3.8ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"nonexistent-user"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'nonexistent-user' LIMIT 1 Completed 200 OK in 1.0ms (ActiveRecord: 0.2ms)  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "old@domain.com"], ["name", "Moshua Jarshall"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "a1s2d37861"]]  (3.2ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "ssopushuser@legit.com"], ["name", "SSO Push user"], ["organisation_slug", nil], ["permissions", "---\n- signin\n- user_update_permission\n"], ["remotely_signed_out", nil], ["uid", "a1s2d39982"]]  (3.7ms) commit transaction Processing by Api::UserController#reauth as HTML Parameters: {"uid"=>"a1s2d37861"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'a1s2d37861' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 9  (2.8ms) commit transaction Completed 200 OK in 7.0ms (ActiveRecord: 3.2ms) User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 9]] Started GET "/" for 127.0.0.1 at 2013-11-20 14:30:54 +0000 Processing by ExampleController#index as HTML Completed 200 OK in 2.0ms (Views: 1.6ms | ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-20 14:30:54 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 2.5ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-20 14:30:54 +0000 Started GET "/auth/gds/callback?code=94b49da83ee8c04736957844427d13597b8d95e4467a2f62c1cca8b7b3e2d958&state=d50fb63941cae6102dcca09f21637cf363b2a7d34691668f" for 127.0.0.1 at 2013-11-20 14:30:55 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"94b49da83ee8c04736957844427d13597b8d95e4467a2f62c1cca8b7b3e2d958", "state"=>"d50fb63941cae6102dcca09f21637cf363b2a7d34691668f"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" ("email", "name", "organisation_slug", "permissions", "remotely_signed_out", "uid") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@example-client.com"], ["name", "Test User"], ["organisation_slug", nil], ["permissions", "---\n- signin\n"], ["remotely_signed_out", nil], ["uid", "integration-uid"]]  (8.3ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.6ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 52.7ms (ActiveRecord: 13.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-20 14:30:55 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-20 14:30:55 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.3ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-20 14:30:55 +0000 Started GET "/auth/gds/callback?code=f2b470e4474e0181a0d85640e7828557f309da794e20e0d6abc192506752b00e&state=c689f6cf3ec2f43f3a049b488355be3040c299fb675218e8" for 127.0.0.1 at 2013-11-20 14:30:55 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"f2b470e4474e0181a0d85640e7828557f309da794e20e0d6abc192506752b00e", "state"=>"c689f6cf3ec2f43f3a049b488355be3040c299fb675218e8"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.2ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.5ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 18.5ms (ActiveRecord: 11.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-20 14:30:55 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.2ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-20 14:30:55 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.1ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-20 14:30:55 +0000 Started GET "/auth/gds/callback?code=a195d299fe7d3e4025a61bf323f93fa58883c1630541fe5809a467b273cbad8c&state=0d3fe1d91f57fe9c22ff7171434307e4f7e1d147510abd35" for 127.0.0.1 at 2013-11-20 14:30:56 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"a195d299fe7d3e4025a61bf323f93fa58883c1630541fe5809a467b273cbad8c", "state"=>"0d3fe1d91f57fe9c22ff7171434307e4f7e1d147510abd35"} Authenticating with gds_sso strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.3ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 15.9ms (ActiveRecord: 8.8ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-20 14:30:56 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-20 14:30:56 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.6ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-20 14:30:56 +0000 Started GET "/auth/gds/callback?code=d58c2e091aa4ec965597c72cbeceede0f1af55e812553a504d38a0835ad0265f&state=1bd40a98ca256e04b18b341bdc66136aaa4da75ae9d67239" for 127.0.0.1 at 2013-11-20 14:30:56 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"d58c2e091aa4ec965597c72cbeceede0f1af55e812553a504d38a0835ad0265f", "state"=>"1bd40a98ca256e04b18b341bdc66136aaa4da75ae9d67239"} Authenticating with gds_sso strategy User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.0ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.9ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 16.4ms (ActiveRecord: 8.5ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-20 14:30:56 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 3.0ms (Views: 0.4ms | ActiveRecord: 0.1ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-20 14:30:56 +0000 Processing by ExampleController#this_requires_signin_permission as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-20 14:30:56 +0000 Started GET "/auth/gds/callback?code=b342dd186aa423d41e9879699f944a60e8300db31c4f233636fbccc67c1f43c6&state=12b16eac46d26a58dc292961bf8cc5da00393bc2f6f9a158" for 127.0.0.1 at 2013-11-20 14:30:56 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"b342dd186aa423d41e9879699f944a60e8300db31c4f233636fbccc67c1f43c6", "state"=>"12b16eac46d26a58dc292961bf8cc5da00393bc2f6f9a158"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.3ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.4ms) commit transaction Redirected to http://www.example-client.com/this_requires_signin_permission Completed 302 Found in 15.2ms (ActiveRecord: 8.2ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-20 14:30:56 +0000 Processing by ExampleController#this_requires_signin_permission as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 2.6ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-20 14:30:56 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-20 14:30:56 +0000 Started GET "/auth/gds/callback?code=e5757e3e1de4fb1bd706b7c8fe06dfea4ce87e71439ec2cc07187ca2d26510c8&state=ab2367a1ec78cbda089f19d9e838ce40effc7d861db5270e" for 127.0.0.1 at 2013-11-20 14:30:57 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"e5757e3e1de4fb1bd706b7c8fe06dfea4ce87e71439ec2cc07187ca2d26510c8", "state"=>"ab2367a1ec78cbda089f19d9e838ce40effc7d861db5270e"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (2.8ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 14.5ms (ActiveRecord: 7.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-20 14:30:57 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "remotely_signed_out" = 't', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (2.8ms) commit transaction Started GET "/restricted" for 127.0.0.1 at 2013-11-20 14:30:57 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Filter chain halted as :authenticate_user! rendered or redirected Completed 403 Forbidden in 2.6ms (Views: 1.8ms | ActiveRecord: 0.1ms) Started GET "/auth/gds/sign_out" for 127.0.0.1 at 2013-11-20 14:30:57 +0000 Processing by AuthenticationsController#sign_out as HTML Redirected to http://localhost:4567/users/sign_out Completed 302 Found in 0.4ms (ActiveRecord: 0.0ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-20 14:30:57 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-20 14:30:57 +0000 Started GET "/auth/gds/callback?code=7d342ff8a9c155f28d5e0055b72e5b56a7b63719a844a4d1fa5b58c54862500f&state=7b3cb1f8e1ae130e198767fed75b4931fc33c9e892c400c1" for 127.0.0.1 at 2013-11-20 14:30:57 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"7d342ff8a9c155f28d5e0055b72e5b56a7b63719a844a4d1fa5b58c54862500f", "state"=>"7b3cb1f8e1ae130e198767fed75b4931fc33c9e892c400c1"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (5.5ms) commit transaction  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "remotely_signed_out" = 'f', "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.2ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 17.0ms (ActiveRecord: 9.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-20 14:30:57 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.3ms (Views: 0.4ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-20 14:30:57 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-20 14:30:57 +0000 Started GET "/auth/gds/callback?code=d203fea4883f3cc90956568ba3f44e28c92f6640a534de4f98275457a5d2611b&state=9d4ba4ac0610ae4fdda47787dd1c0ae695600e37ac8f2838" for 127.0.0.1 at 2013-11-20 14:30:57 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"d203fea4883f3cc90956568ba3f44e28c92f6640a534de4f98275457a5d2611b", "state"=>"9d4ba4ac0610ae4fdda47787dd1c0ae695600e37ac8f2838"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.1ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.7ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.1ms (ActiveRecord: 8.4ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-20 14:30:57 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-21 10:35:57 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-21 10:35:57 +0000 Started GET "/auth/gds/callback?code=5d74961a5fcc8c4db4c1b8edb21df757906519f007d6d62a34aa4632f27a3fdc&state=559a10b186a8b7176ce23ce560574add41b0edc44f8bf837" for 127.0.0.1 at 2013-11-21 10:35:57 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"5d74961a5fcc8c4db4c1b8edb21df757906519f007d6d62a34aa4632f27a3fdc", "state"=>"559a10b186a8b7176ce23ce560574add41b0edc44f8bf837"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.4ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 14.2ms (ActiveRecord: 7.6ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-21 10:35:57 +0000 Processing by ExampleController#restricted as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-20 14:30:57 +0000 Processing by ExampleController#restricted as HTML Authenticating with gds_sso strategy Completed in 0.2ms Started GET "/auth/gds" for 127.0.0.1 at 2013-11-20 14:30:57 +0000 Started GET "/auth/gds/callback?code=8ac161ec2542dfe691ea22b445915eb149a3921d25b988acdca09eaa4f2e9031&state=22e4d483aa076cdf22ea178d8c1b94e761671d2f0ad0c16c" for 127.0.0.1 at 2013-11-20 14:30:58 +0000 Processing by AuthenticationsController#callback as HTML Parameters: {"code"=>"8ac161ec2542dfe691ea22b445915eb149a3921d25b988acdca09eaa4f2e9031", "state"=>"22e4d483aa076cdf22ea178d8c1b94e761671d2f0ad0c16c"} Authenticating with gds_sso strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.1ms) begin transaction  (0.2ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.7ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.0ms) commit transaction Redirected to http://www.example-client.com/restricted Completed 302 Found in 16.0ms (ActiveRecord: 8.2ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-20 14:30:58 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 1.1ms (Views: 0.3ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-21 10:25:58 +0000 Processing by ExampleController#restricted as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1 Completed 200 OK in 0.9ms (Views: 0.1ms | ActiveRecord: 0.1ms) Started GET "/restricted" for 127.0.0.1 at 2013-11-20 14:30:58 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy Completed in 7.0ms Started GET "/restricted" for 127.0.0.1 at 2013-11-20 14:30:58 +0000 Processing by ExampleController#restricted as JSON Authenticating with gds_bearer_token strategy User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.8ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (3.7ms) commit transaction Completed 200 OK in 35.4ms (Views: 0.2ms | ActiveRecord: 8.0ms) Started GET "/this_requires_signin_permission" for 127.0.0.1 at 2013-11-20 14:30:58 +0000 Processing by ExampleController#this_requires_signin_permission as JSON Authenticating with gds_bearer_token strategy User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."uid" = 'integration-uid' LIMIT 1  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) UPDATE "users" SET "permissions" = '--- - signin ' WHERE "users"."id" = 11  (4.2ms) commit transaction Completed 200 OK in 40.8ms (Views: 0.2ms | ActiveRecord: 9.3ms)