rails-identity 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 49e043fc9b928b2429efe5e3d6ba38dfc4f20749
4
- data.tar.gz: 182ac29e92d3817e3e8b3336ddfb8ef8ad139f3c
3
+ metadata.gz: 39d7077ce571f63569186cfc2af109121bd34e6d
4
+ data.tar.gz: 5c256def494ba2abee5104fa7732c9de18291bef
5
5
  SHA512:
6
- metadata.gz: adefb7a0fb1afcfc7e335e8756c5516ff83c07e7edd77966375eaac4a5cfe16477c5651c87e0bd57ec28931d012d187dc89145bbb9f31a4e29f4f0fd4dfd54dd
7
- data.tar.gz: ee2c1cdf026af3d4394f13d4101bcb283f36181c710be76dcc82ee477df458d98fe633505c5bc29add3e49be240c37b745649dc31e3b27e04a7f9456bb2e1130
6
+ metadata.gz: 79f372d1b478e8d465c0293aaee7babaa88181033c4dbfb0a020c36dd201203bec68f6d3929df3cdfb06d60713359c3c4350d32e94e59c2435dd8043a72ed2ad
7
+ data.tar.gz: 3e5fbb9808e40c00d7ff9ef333a9c2e3c7591b0c1105036d5cd18cff87c32fec95d39bcab19c9cfd55b506c2cda92fb8fd85610a3226720460d533f008ae3a30
@@ -1,3 +1,3 @@
1
1
  module RailsIdentity
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
Binary file
@@ -353006,3 +353006,3551 @@ Attempting to get RailsIdentity::User 999
353006
353006
  404 - RailsIdentity::User 999 cannot be found
353007
353007
  Completed 404 Not Found in 4ms (Views: 0.2ms | ActiveRecord: 0.1ms)
353008
353008
   (0.1ms) rollback transaction
353009
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
353010
+  (0.1ms) begin transaction
353011
+ Fixture Delete (0.2ms) DELETE FROM "rails_identity_sessions"
353012
+ Fixture Insert (0.1ms) INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('1', '1', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o', 'secret', '2016-04-23 05:09:48', '2016-04-23 05:09:48')
353013
+ Fixture Insert (0.0ms) INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('2', '2', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIyIiwidXNlcl91dWlkIjoiMiIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.FM5DbYMazFJkAkwSxRMXD_TZztzDHmta3Uoa6WdzE9U', 'secret', '2016-04-23 05:09:48', '2016-04-23 05:09:48')
353014
+ Fixture Insert (0.0ms) INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('session_admin_one', 'admin_one', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM4NTg4fQ.cjfoGbBwhcEa7az_eHXKNQdlcWcW--t5tj4WuH6ukMo', 'secret', '2016-04-23 05:09:48', '2016-04-23 05:09:48')
353015
+ Fixture Delete (0.1ms) DELETE FROM "rails_identity_users"
353016
+ Fixture Insert (0.2ms) INSERT INTO "rails_identity_users" ("uuid", "username", "password_digest", "role", "verified", "created_at", "updated_at") VALUES ('1', 'one@example.com', '$2a$10$a50IZLx4lAHgXGYlKu2g3.GwIaUkMqgtC3P.4GGc0uxTP57GS1Azu', 10, 't', '2016-04-23 05:09:48', '2016-04-23 05:09:48')
353017
+ Fixture Insert (0.1ms) INSERT INTO "rails_identity_users" ("uuid", "username", "password_digest", "role", "verified", "created_at", "updated_at") VALUES ('2', 'two@example.com', '$2a$10$3yZv2H99b8YNb8HQqM4f9OStHus15Ey0Oj0jv6oOfD3wNbd8.0x1W', 10, 't', '2016-04-23 05:09:48', '2016-04-23 05:09:48')
353018
+ Fixture Insert (0.1ms) INSERT INTO "rails_identity_users" ("uuid", "username", "password_digest", "role", "verified", "created_at", "updated_at") VALUES ('admin_one', 'admin_one@example.com', '$2a$10$74fQ9SzicqfCVWhDGyrYNOO4iZ97b1EDxv9mxnjXV/8LimUzwClCu', 100, 't', '2016-04-23 05:09:48', '2016-04-23 05:09:48')
353019
+  (1.0ms) commit transaction
353020
+  (0.1ms) begin transaction
353021
+ -----------------------------
353022
+ RailsIdentityTest: test_truth
353023
+ -----------------------------
353024
+  (0.1ms) rollback transaction
353025
+  (0.0ms) begin transaction
353026
+ -----------------------------------------------------------------------
353027
+ RailsIdentity::SessionsControllerTest: test_public_cannot_list_sessions
353028
+ -----------------------------------------------------------------------
353029
+ RailsIdentity::Session Load (0.2ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353030
+ Processing by RailsIdentity::SessionsController#index as HTML
353031
+ Requires a token
353032
+ Token decode error: Nil JSON web token
353033
+ 401 - Invalid token:
353034
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
353035
+  (0.1ms) rollback transaction
353036
+  (0.0ms) begin transaction
353037
+ ---------------------------------------------------------------------------------------------------
353038
+ RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions_using_user_id_in_routing
353039
+ ---------------------------------------------------------------------------------------------------
353040
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353041
+ RailsIdentity::User Load (0.2ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353042
+ Processing by RailsIdentity::SessionsController#index as HTML
353043
+ Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o"}
353044
+ Requires a token
353045
+ Token well formatted for user 1,
353046
+ session 1
353047
+ Cache miss. Try database.
353048
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353049
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353050
+ Token well formatted and verified. Set cache.
353051
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353052
+ Attempting to get user 1
353053
+ Attempting to get RailsIdentity::User 1
353054
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353055
+ Checking to see if authorized to access object
353056
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
353057
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [cdf4be72-5f9a-4256-92ce-701962a4d6f7] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
353058
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [cdf4be72-5f9a-4256-92ce-701962a4d6f7] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 3.47ms
353059
+ [ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: cdf4be72-5f9a-4256-92ce-701962a4d6f7) to Inline(default)
353060
+ Completed 200 OK in 29ms (Views: 1.0ms | ActiveRecord: 0.4ms)
353061
+ RailsIdentity::Session Load (0.2ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
353062
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353063
+  (0.0ms) rollback transaction
353064
+  (0.0ms) begin transaction
353065
+ ----------------------------------------------------------------------------
353066
+ RailsIdentity::SessionsControllerTest: test_admin_can_delete_other's_session
353067
+ ----------------------------------------------------------------------------
353068
+ RailsIdentity::Session Load (0.2ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353069
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
353070
+ Processing by RailsIdentity::SessionsController#destroy as HTML
353071
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM4NTg4fQ.cjfoGbBwhcEa7az_eHXKNQdlcWcW--t5tj4WuH6ukMo", "id"=>"1"}
353072
+ Requires a token
353073
+ Token well formatted for user admin_one,
353074
+ session session_admin_one
353075
+ Cache miss. Try database.
353076
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
353077
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
353078
+ Token well formatted and verified. Set cache.
353079
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
353080
+ Attempting to get RailsIdentity::Session 1
353081
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353082
+ Checking to see if authorized to access object
353083
+  (0.1ms) SAVEPOINT active_record_1
353084
+ SQL (0.1ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
353085
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353086
+ Rendered text template (0.0ms)
353087
+ Completed 204 No Content in 11ms (Views: 6.4ms | ActiveRecord: 0.4ms)
353088
+  (0.4ms) rollback transaction
353089
+  (0.0ms) begin transaction
353090
+ ------------------------------------------------------------
353091
+ RailsIdentity::SessionsControllerTest: test_create_a_session
353092
+ ------------------------------------------------------------
353093
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353094
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353095
+ Processing by RailsIdentity::SessionsController#create as HTML
353096
+ Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
353097
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
353098
+  (0.1ms) SAVEPOINT active_record_1
353099
+ SQL (0.3ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "9a4e4fc0-0911-11e6-8c04-6c4008a6fa2a"], ["secret", "1452cfbc-520d-464f-84d8-7ee715fedd5a"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWE0ZTRmYzAtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE4OCwiZXhwIjoxNDYyNTk3Nzg4fQ.vffu8HyN6q3NYqv9gZan2SF4pp36xsHhBLSsdcp6xEo"], ["created_at", "2016-04-23 05:09:48.943519"], ["updated_at", "2016-04-23 05:09:48.943519"]]
353100
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353101
+ Completed 201 Created in 82ms (Views: 0.5ms | ActiveRecord: 0.6ms)
353102
+  (0.3ms) rollback transaction
353103
+  (0.1ms) begin transaction
353104
+ -------------------------------------------------------------------------
353105
+ RailsIdentity::SessionsControllerTest: test_public_cannot_create_sessions
353106
+ -------------------------------------------------------------------------
353107
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353108
+ Processing by RailsIdentity::SessionsController#index as HTML
353109
+ Requires a token
353110
+ Token decode error: Nil JSON web token
353111
+ 401 - Invalid token:
353112
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
353113
+  (0.1ms) rollback transaction
353114
+  (0.0ms) begin transaction
353115
+ ----------------------------------------------------------------------------
353116
+ RailsIdentity::SessionsControllerTest: test_user_cannot_list_expired_session
353117
+ ----------------------------------------------------------------------------
353118
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353119
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353120
+  (0.0ms) SAVEPOINT active_record_1
353121
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "9a522262-0911-11e6-8c04-6c4008a6fa2a"], ["secret", "870ef38f-dac6-4a0b-b18d-9177cfabf91b"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWE1MjIyNjItMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE4OCwiZXhwIjoxNDYxMzg4MTg3fQ.hgBXwlRj7QV3xF4qSL-ufTaSdYd-WBU_mgsQpLU1QaA"], ["created_at", "2016-04-23 05:09:48.955404"], ["updated_at", "2016-04-23 05:09:48.955404"]]
353122
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353123
+ Processing by RailsIdentity::SessionsController#index as HTML
353124
+ Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o"}
353125
+ Requires a token
353126
+ Token well formatted for user 1,
353127
+ session 1
353128
+ Cache miss. Try database.
353129
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353130
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353131
+ Token well formatted and verified. Set cache.
353132
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353133
+ Attempting to get user 1
353134
+ Attempting to get RailsIdentity::User 1
353135
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353136
+ Checking to see if authorized to access object
353137
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
353138
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [fe17e782-3ea5-406b-bcef-fca8ce846fad] Performing RailsIdentity::SessionsCleanupJob from Inline(default) with arguments: "9a522262-0911-11e6-8c04-6c4008a6fa2a"
353139
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [fe17e782-3ea5-406b-bcef-fca8ce846fad] RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "9a522262-0911-11e6-8c04-6c4008a6fa2a"]]
353140
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [fe17e782-3ea5-406b-bcef-fca8ce846fad]  (0.1ms) SAVEPOINT active_record_1
353141
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [fe17e782-3ea5-406b-bcef-fca8ce846fad] SQL (0.2ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "9a522262-0911-11e6-8c04-6c4008a6fa2a"]]
353142
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [fe17e782-3ea5-406b-bcef-fca8ce846fad]  (0.0ms) RELEASE SAVEPOINT active_record_1
353143
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [fe17e782-3ea5-406b-bcef-fca8ce846fad] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 1.94ms
353144
+ [ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: fe17e782-3ea5-406b-bcef-fca8ce846fad) to Inline(default) with arguments: "9a522262-0911-11e6-8c04-6c4008a6fa2a"
353145
+ Completed 200 OK in 51ms (Views: 40.9ms | ActiveRecord: 0.7ms)
353146
+  (0.7ms) rollback transaction
353147
+  (0.0ms) begin transaction
353148
+ ----------------------------------------------------------------------------------------------
353149
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_non-existent_username
353150
+ ----------------------------------------------------------------------------------------------
353151
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353152
+ Processing by RailsIdentity::SessionsController#create as HTML
353153
+ Parameters: {"username"=>"idontexist", "password"=>"[FILTERED]"}
353154
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "idontexist"]]
353155
+ Attempting to get user
353156
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
353157
+  (0.1ms) rollback transaction
353158
+  (0.0ms) begin transaction
353159
+ ------------------------------------------------------------
353160
+ RailsIdentity::SessionsControllerTest: test_delete_a_session
353161
+ ------------------------------------------------------------
353162
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353163
+ Processing by RailsIdentity::SessionsController#destroy as HTML
353164
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"1"}
353165
+ Requires a token
353166
+ Token well formatted for user 1,
353167
+ session 1
353168
+ Cache miss. Try database.
353169
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353170
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353171
+ Token well formatted and verified. Set cache.
353172
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353173
+ Attempting to get RailsIdentity::Session 1
353174
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353175
+ Checking to see if authorized to access object
353176
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353177
+  (0.1ms) SAVEPOINT active_record_1
353178
+ SQL (0.1ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
353179
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353180
+ Rendered text template (0.0ms)
353181
+ Completed 204 No Content in 6ms (Views: 0.3ms | ActiveRecord: 0.4ms)
353182
+  (0.3ms) rollback transaction
353183
+  (0.0ms) begin transaction
353184
+ --------------------------------------------------------------------------------
353185
+ RailsIdentity::SessionsControllerTest: test_cannot_delete_a_non-existent_session
353186
+ --------------------------------------------------------------------------------
353187
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353188
+ Processing by RailsIdentity::SessionsController#destroy as HTML
353189
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"999"}
353190
+ Requires a token
353191
+ Token well formatted for user 1,
353192
+ session 1
353193
+ Cache miss. Try database.
353194
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353195
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353196
+ Token well formatted and verified. Set cache.
353197
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353198
+ Attempting to get RailsIdentity::Session 999
353199
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "999"]]
353200
+ 404 - RailsIdentity::Session 999 cannot be found
353201
+ Completed 404 Not Found in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
353202
+  (0.1ms) rollback transaction
353203
+  (0.0ms) begin transaction
353204
+ --------------------------------------------------------------------
353205
+ RailsIdentity::SessionsControllerTest: test_delete_a_current_session
353206
+ --------------------------------------------------------------------
353207
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353208
+ Processing by RailsIdentity::SessionsController#destroy as HTML
353209
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"current"}
353210
+ Requires a token
353211
+ Token well formatted for user 1,
353212
+ session 1
353213
+ Cache miss. Try database.
353214
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353215
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353216
+ Token well formatted and verified. Set cache.
353217
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353218
+ Attempting to get RailsIdentity::Session 1
353219
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353220
+ Checking to see if authorized to access object
353221
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353222
+  (0.1ms) SAVEPOINT active_record_1
353223
+ SQL (0.1ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
353224
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353225
+ Rendered text template (0.0ms)
353226
+ Completed 204 No Content in 6ms (Views: 0.4ms | ActiveRecord: 0.5ms)
353227
+  (0.4ms) rollback transaction
353228
+  (0.0ms) begin transaction
353229
+ -----------------------------------------------------------------------
353230
+ RailsIdentity::SessionsControllerTest: test_cannot_show_other's_session
353231
+ -----------------------------------------------------------------------
353232
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353233
+ Processing by RailsIdentity::SessionsController#show as HTML
353234
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"2"}
353235
+ Requires a token
353236
+ Token well formatted for user 1,
353237
+ session 1
353238
+ Cache miss. Try database.
353239
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353240
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353241
+ Token well formatted and verified. Set cache.
353242
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353243
+ Attempting to get RailsIdentity::Session 2
353244
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2"]]
353245
+ Checking to see if authorized to access object
353246
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
353247
+ 401 - Repia::Errors::Unauthorized
353248
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.3ms)
353249
+  (0.1ms) rollback transaction
353250
+  (0.0ms) begin transaction
353251
+ -----------------------------------------------------------------------------------------
353252
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_a_wrong_password
353253
+ -----------------------------------------------------------------------------------------
353254
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353255
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353256
+ Processing by RailsIdentity::SessionsController#create as HTML
353257
+ Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
353258
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
353259
+ Attempting to get user
353260
+ Completed 401 Unauthorized in 66ms (Views: 0.3ms | ActiveRecord: 0.1ms)
353261
+  (0.1ms) rollback transaction
353262
+  (0.0ms) begin transaction
353263
+ ----------------------------------------------------------------------
353264
+ RailsIdentity::SessionsControllerTest: test_public_cannot_show_session
353265
+ ----------------------------------------------------------------------
353266
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353267
+ Processing by RailsIdentity::SessionsController#show as HTML
353268
+ Parameters: {"id"=>"1"}
353269
+ Requires a token
353270
+ Token decode error: Nil JSON web token
353271
+ 401 - Invalid token:
353272
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
353273
+  (0.1ms) rollback transaction
353274
+  (0.0ms) begin transaction
353275
+ ------------------------------------------------------------------
353276
+ RailsIdentity::SessionsControllerTest: test_public_can_see_options
353277
+ ------------------------------------------------------------------
353278
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353279
+ Processing by RailsIdentity::SessionsController#options as HTML
353280
+ Rendered text template (0.0ms)
353281
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
353282
+  (0.1ms) rollback transaction
353283
+  (0.0ms) begin transaction
353284
+ --------------------------------------------------------------------------
353285
+ RailsIdentity::SessionsControllerTest: test_admin_can_show_other's_session
353286
+ --------------------------------------------------------------------------
353287
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353288
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
353289
+ Processing by RailsIdentity::SessionsController#show as HTML
353290
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM4NTg4fQ.cjfoGbBwhcEa7az_eHXKNQdlcWcW--t5tj4WuH6ukMo", "id"=>"1"}
353291
+ Requires a token
353292
+ Token well formatted for user admin_one,
353293
+ session session_admin_one
353294
+ Cache miss. Try database.
353295
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
353296
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
353297
+ Token well formatted and verified. Set cache.
353298
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
353299
+ Attempting to get RailsIdentity::Session 1
353300
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353301
+ Checking to see if authorized to access object
353302
+ Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.2ms)
353303
+  (0.1ms) rollback transaction
353304
+  (0.0ms) begin transaction
353305
+ --------------------------------------------------------------------------
353306
+ RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions
353307
+ --------------------------------------------------------------------------
353308
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353309
+ Processing by RailsIdentity::SessionsController#index as HTML
353310
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o"}
353311
+ Requires a token
353312
+ Token well formatted for user 1,
353313
+ session 1
353314
+ Cache miss. Try database.
353315
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353316
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353317
+ Token well formatted and verified. Set cache.
353318
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353319
+ Attempting to get user
353320
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
353321
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [c8af35a6-ad02-4119-9a51-c507efa47766] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
353322
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [c8af35a6-ad02-4119-9a51-c507efa47766] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 0.06ms
353323
+ [ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: c8af35a6-ad02-4119-9a51-c507efa47766) to Inline(default)
353324
+ Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 0.2ms)
353325
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353326
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
353327
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353328
+  (0.1ms) rollback transaction
353329
+  (0.0ms) begin transaction
353330
+ ------------------------------------------------------------------------------------
353331
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_username
353332
+ ------------------------------------------------------------------------------------
353333
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353334
+ Processing by RailsIdentity::SessionsController#create as HTML
353335
+ Parameters: {"password"=>"[FILTERED]"}
353336
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" IS NULL LIMIT 1
353337
+ Attempting to get user
353338
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
353339
+  (0.1ms) rollback transaction
353340
+  (0.0ms) begin transaction
353341
+ ------------------------------------------------------------------
353342
+ RailsIdentity::SessionsControllerTest: test_show_a_current_session
353343
+ ------------------------------------------------------------------
353344
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353345
+ Processing by RailsIdentity::SessionsController#show as HTML
353346
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"current"}
353347
+ Requires a token
353348
+ Token well formatted for user 1,
353349
+ session 1
353350
+ Cache miss. Try database.
353351
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353352
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353353
+ Token well formatted and verified. Set cache.
353354
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353355
+ Attempting to get RailsIdentity::Session 1
353356
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353357
+ Checking to see if authorized to access object
353358
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353359
+ Completed 200 OK in 6ms (Views: 0.6ms | ActiveRecord: 0.2ms)
353360
+  (0.1ms) rollback transaction
353361
+  (0.1ms) begin transaction
353362
+ -----------------------------------------------------------------------------------
353363
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_if_not_verified
353364
+ -----------------------------------------------------------------------------------
353365
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353366
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353367
+  (0.0ms) SAVEPOINT active_record_1
353368
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
353369
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "verified" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verified", "f"], ["updated_at", "2016-04-23 05:09:49.179739"], ["uuid", "1"]]
353370
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353371
+ Processing by RailsIdentity::SessionsController#create as HTML
353372
+ Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
353373
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
353374
+ 401 - Repia::Errors::Unauthorized
353375
+ Completed 401 Unauthorized in 65ms (Views: 0.2ms | ActiveRecord: 0.0ms)
353376
+  (0.4ms) rollback transaction
353377
+  (0.0ms) begin transaction
353378
+ -------------------------------------------------------------------------
353379
+ RailsIdentity::SessionsControllerTest: test_cannot_delete_other's_session
353380
+ -------------------------------------------------------------------------
353381
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353382
+ Processing by RailsIdentity::SessionsController#destroy as HTML
353383
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"2"}
353384
+ Requires a token
353385
+ Token well formatted for user 1,
353386
+ session 1
353387
+ Cache miss. Try database.
353388
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353389
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353390
+ Token well formatted and verified. Set cache.
353391
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353392
+ Attempting to get RailsIdentity::Session 2
353393
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2"]]
353394
+ Checking to see if authorized to access object
353395
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
353396
+ 401 - Repia::Errors::Unauthorized
353397
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
353398
+  (0.1ms) rollback transaction
353399
+  (0.1ms) begin transaction
353400
+ -----------------------------------------------------------------------------
353401
+ RailsIdentity::SessionsControllerTest: test_cannot_show_a_nonexisting_session
353402
+ -----------------------------------------------------------------------------
353403
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353404
+ Processing by RailsIdentity::SessionsController#show as HTML
353405
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"999"}
353406
+ Requires a token
353407
+ Token well formatted for user 1,
353408
+ session 1
353409
+ Cache miss. Try database.
353410
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353411
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353412
+ Token well formatted and verified. Set cache.
353413
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353414
+ Attempting to get RailsIdentity::Session 999
353415
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "999"]]
353416
+ 404 - RailsIdentity::Session 999 cannot be found
353417
+ Completed 404 Not Found in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
353418
+  (0.1ms) rollback transaction
353419
+  (0.0ms) begin transaction
353420
+ --------------------------------------------------------------------------------------
353421
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_a_password
353422
+ --------------------------------------------------------------------------------------
353423
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353424
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353425
+ Processing by RailsIdentity::SessionsController#create as HTML
353426
+ Parameters: {"username"=>"one@example.com"}
353427
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
353428
+ Attempting to get user
353429
+ Completed 401 Unauthorized in 65ms (Views: 0.3ms | ActiveRecord: 0.1ms)
353430
+  (0.1ms) rollback transaction
353431
+  (0.0ms) begin transaction
353432
+ ----------------------------------------------------------
353433
+ RailsIdentity::SessionsControllerTest: test_show_a_session
353434
+ ----------------------------------------------------------
353435
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353436
+ Processing by RailsIdentity::SessionsController#show as HTML
353437
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"1"}
353438
+ Requires a token
353439
+ Token well formatted for user 1,
353440
+ session 1
353441
+ Cache miss. Try database.
353442
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353443
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353444
+ Token well formatted and verified. Set cache.
353445
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353446
+ Attempting to get RailsIdentity::Session 1
353447
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353448
+ Checking to see if authorized to access object
353449
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353450
+ Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms)
353451
+  (0.1ms) rollback transaction
353452
+  (0.0ms) begin transaction
353453
+ -----------------------------------------------------------------------
353454
+ RailsIdentity::SessionsControllerTest: test_cannot_show_expired_session
353455
+ -----------------------------------------------------------------------
353456
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353457
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353458
+  (0.0ms) SAVEPOINT active_record_1
353459
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "9a8e819e-0911-11e6-8c04-6c4008a6fa2a"], ["secret", "474038fd-1e0c-4de5-97b7-b314b1ef1814"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWE4ZTgxOWUtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE4OSwiZXhwIjoxNDYxMzg4MTg4fQ.SWBJIWBgZRC1EmVmCNAb6tLTEXnoW5s-cHBtOmjC5lQ"], ["created_at", "2016-04-23 05:09:49.351032"], ["updated_at", "2016-04-23 05:09:49.351032"]]
353460
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353461
+ Processing by RailsIdentity::SessionsController#show as HTML
353462
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"9a8e819e-0911-11e6-8c04-6c4008a6fa2a"}
353463
+ Requires a token
353464
+ Token well formatted for user 1,
353465
+ session 1
353466
+ Cache miss. Try database.
353467
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353468
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353469
+ Token well formatted and verified. Set cache.
353470
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353471
+ Attempting to get RailsIdentity::Session 9a8e819e-0911-11e6-8c04-6c4008a6fa2a
353472
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "9a8e819e-0911-11e6-8c04-6c4008a6fa2a"]]
353473
+ Checking to see if authorized to access object
353474
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353475
+  (0.1ms) SAVEPOINT active_record_1
353476
+ SQL (0.2ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "9a8e819e-0911-11e6-8c04-6c4008a6fa2a"]]
353477
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353478
+ 404 - Repia::Errors::NotFound
353479
+ Completed 404 Not Found in 6ms (Views: 0.2ms | ActiveRecord: 0.5ms)
353480
+  (0.6ms) rollback transaction
353481
+  (0.0ms) begin transaction
353482
+ -----------------------------------------------------------------------------
353483
+ RailsIdentity::SessionsControllerTest: test_user_cannot_list_other's_sessions
353484
+ -----------------------------------------------------------------------------
353485
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353486
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
353487
+ Processing by RailsIdentity::SessionsController#index as HTML
353488
+ Parameters: {"user_id"=>"2", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o"}
353489
+ Requires a token
353490
+ Token well formatted for user 1,
353491
+ session 1
353492
+ Cache miss. Try database.
353493
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353494
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353495
+ Token well formatted and verified. Set cache.
353496
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353497
+ Attempting to get user 2
353498
+ Attempting to get RailsIdentity::User 2
353499
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
353500
+ Checking to see if authorized to access object
353501
+ 401 - Not authorized to access user 2
353502
+ Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
353503
+  (0.1ms) rollback transaction
353504
+  (0.0ms) begin transaction
353505
+ ---------------------------------------------------------------------------
353506
+ RailsIdentity::UserTest: test_user_is_not_valid_if_username_is_malformatted
353507
+ ---------------------------------------------------------------------------
353508
+  (0.0ms) SAVEPOINT active_record_1
353509
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
353510
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
353511
+  (0.1ms) rollback transaction
353512
+  (0.0ms) begin transaction
353513
+ ---------------------------------------------------------------
353514
+ RailsIdentity::UserTest: test_user_has_a_role_of_100_by_default
353515
+ ---------------------------------------------------------------
353516
+  (0.0ms) SAVEPOINT active_record_1
353517
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'new@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
353518
+ SQL (0.3ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "new@example.com"], ["password_digest", "$2a$04$87VaHJ47Tb4/muazJkGbpOPFfGRt.DWkjo3dJfUi2PMEOdP5tp4I."], ["role", 10], ["created_at", "2016-04-23 05:09:49.378442"], ["updated_at", "2016-04-23 05:09:49.378442"], ["uuid", "9a92d5b4-0911-11e6-8c04-6c4008a6fa2a"]]
353519
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353520
+  (0.4ms) rollback transaction
353521
+  (0.0ms) begin transaction
353522
+ -----------------------------------------------------------------
353523
+ RailsIdentity::UserTest: test_user_can_issue_a_verification_token
353524
+ -----------------------------------------------------------------
353525
+  (0.0ms) SAVEPOINT active_record_1
353526
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
353527
+ SQL (0.1ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$Fhvro.lhQAagAHkXA4AoPeMm6Thv9iBSjHrzcqGzcqRieyw3mpKf6"], ["role", 10], ["created_at", "2016-04-23 05:09:49.382925"], ["updated_at", "2016-04-23 05:09:49.382925"], ["uuid", "9a937ece-0911-11e6-8c04-6c4008a6fa2a"]]
353528
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353529
+  (0.0ms) SAVEPOINT active_record_1
353530
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "9a937ece-0911-11e6-8c04-6c4008a6fa2a"], ["uuid", "9a93a67e-0911-11e6-8c04-6c4008a6fa2a"], ["secret", "9b60e9a7-07de-4b65-b8cb-3d0a484c2ed8"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YTkzN2VjZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YTkzYTY3ZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4MTg5LCJleHAiOjE0NjEzOTE3ODl9.dktf4o49Yb2fC1_FfV-VNMzKi4Gux4Z6naSRhSf3bIg"], ["created_at", "2016-04-23 05:09:49.384699"], ["updated_at", "2016-04-23 05:09:49.384699"]]
353531
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353532
+  (0.3ms) rollback transaction
353533
+  (0.0ms) begin transaction
353534
+ ------------------------------------------------------------------
353535
+ RailsIdentity::UserTest: test_user_is_not_valid_without_a_password
353536
+ ------------------------------------------------------------------
353537
+  (0.0ms) SAVEPOINT active_record_1
353538
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
353539
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
353540
+  (0.0ms) rollback transaction
353541
+  (0.0ms) begin transaction
353542
+ ------------------------------------------------------------------
353543
+ RailsIdentity::UserTest: test_user_is_not_valid_without_a_username
353544
+ ------------------------------------------------------------------
353545
+  (0.0ms) SAVEPOINT active_record_1
353546
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" IS NULL AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
353547
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
353548
+  (0.0ms) rollback transaction
353549
+  (0.0ms) begin transaction
353550
+ --------------------------------------------------------------------------
353551
+ RailsIdentity::UserTest: test_user_is_not_valid_if_username_already_exists
353552
+ --------------------------------------------------------------------------
353553
+  (0.1ms) SAVEPOINT active_record_1
353554
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
353555
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
353556
+  (0.1ms) rollback transaction
353557
+  (0.0ms) begin transaction
353558
+ ----------------------------------------------------------
353559
+ RailsIdentity::UserTest: test_user_can_issue_a_reset_token
353560
+ ----------------------------------------------------------
353561
+  (0.0ms) SAVEPOINT active_record_1
353562
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
353563
+ SQL (0.2ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$WWWQBjN6FkzxHUFh1oMdluJ07u3SKzyp6Afn1ckXa/lcFJsoOm9eC"], ["role", 10], ["created_at", "2016-04-23 05:09:49.398763"], ["updated_at", "2016-04-23 05:09:49.398763"], ["uuid", "9a95ea38-0911-11e6-8c04-6c4008a6fa2a"]]
353564
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353565
+  (0.0ms) SAVEPOINT active_record_1
353566
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "9a95ea38-0911-11e6-8c04-6c4008a6fa2a"], ["uuid", "9a961634-0911-11e6-8c04-6c4008a6fa2a"], ["secret", "6cbfd51a-6c1a-4127-b4b9-2d3d613bea26"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YTk1ZWEzOC0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YTk2MTYzNC0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4MTg5LCJleHAiOjE0NjEzOTE3ODl9.Jn76v_6Bwy4kqrYc3qGUzeNcGSnv9cmwCnNm-lcCLRQ"], ["created_at", "2016-04-23 05:09:49.400635"], ["updated_at", "2016-04-23 05:09:49.400635"]]
353567
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353568
+  (0.4ms) rollback transaction
353569
+  (0.0ms) begin transaction
353570
+ ----------------------------------------------------------------------
353571
+ RailsIdentity::UserTest: test_user_is_valid_with_username_and_password
353572
+ ----------------------------------------------------------------------
353573
+  (0.0ms) SAVEPOINT active_record_1
353574
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
353575
+ SQL (0.2ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$E6zxkU270DetJxv/f5CfMeBvi9gCdqtRGQV4eW4ZOGX2QQzeaNM22"], ["role", 10], ["created_at", "2016-04-23 05:09:49.404886"], ["updated_at", "2016-04-23 05:09:49.404886"], ["uuid", "9a96d95c-0911-11e6-8c04-6c4008a6fa2a"]]
353576
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353577
+  (0.4ms) rollback transaction
353578
+  (0.0ms) begin transaction
353579
+ -----------------------------------------------------------------------
353580
+ RailsIdentity::UsersControllerTest: test_admin_can_create_an_admin_user
353581
+ -----------------------------------------------------------------------
353582
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353583
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
353584
+ Processing by RailsIdentity::UsersController#create as HTML
353585
+ Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM4NTg4fQ.cjfoGbBwhcEa7az_eHXKNQdlcWcW--t5tj4WuH6ukMo"}
353586
+ Accepts a token
353587
+ Token well formatted for user admin_one,
353588
+ session session_admin_one
353589
+ Cache miss. Try database.
353590
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
353591
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
353592
+ Token well formatted and verified. Set cache.
353593
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
353594
+ Create new user
353595
+ Unpermitted parameter: token
353596
+  (0.1ms) SAVEPOINT active_record_1
353597
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
353598
+ SQL (0.2ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$lP1k5KB3eABoJJerqMAhb.hN6h27LPKGCng4XzhFTJ48S4Qio9LUa"], ["role", 100], ["created_at", "2016-04-23 05:09:49.425125"], ["updated_at", "2016-04-23 05:09:49.425125"], ["uuid", "9a99f16e-0911-11e6-8c04-6c4008a6fa2a"]]
353599
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353600
+  (0.0ms) SAVEPOINT active_record_1
353601
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "9a99f16e-0911-11e6-8c04-6c4008a6fa2a"], ["uuid", "9a9a3160-0911-11e6-8c04-6c4008a6fa2a"], ["secret", "e71c462c-c4b5-4456-8f07-2bbe38815258"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YTk5ZjE2ZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YTlhMzE2MC0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4ODE4OSwiZXhwIjoxNDYxMzkxNzg5fQ.rXwvc2apfSa20HB4gDqztUXbf53aIIk8bLX8a9wONV4"], ["created_at", "2016-04-23 05:09:49.427598"], ["updated_at", "2016-04-23 05:09:49.427598"]]
353602
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353603
+  (0.0ms) SAVEPOINT active_record_1
353604
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '9a99f16e-0911-11e6-8c04-6c4008a6fa2a') LIMIT 1
353605
+ SQL (0.3ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YTk5ZjE2ZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YTlhMzE2MC0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4ODE4OSwiZXhwIjoxNDYxMzkxNzg5fQ.rXwvc2apfSa20HB4gDqztUXbf53aIIk8bLX8a9wONV4"], ["updated_at", "2016-04-23 05:09:49.429312"], ["uuid", "9a99f16e-0911-11e6-8c04-6c4008a6fa2a"]]
353606
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353607
+ [ActiveJob] RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "9a99f16e-0911-11e6-8c04-6c4008a6fa2a"]]
353608
+ [ActiveJob] [ActionMailer::DeliveryJob] [ac9663da-a7d0-413b-9b7d-3eedd88f32c1] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/9a99f16e-0911-11e6-8c04-6c4008a6fa2a
353609
+ [ActiveJob] [ActionMailer::DeliveryJob] [ac9663da-a7d0-413b-9b7d-3eedd88f32c1] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (1.5ms)
353610
+ [ActiveJob] [ActionMailer::DeliveryJob] [ac9663da-a7d0-413b-9b7d-3eedd88f32c1] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.3ms)
353611
+ [ActiveJob] [ActionMailer::DeliveryJob] [ac9663da-a7d0-413b-9b7d-3eedd88f32c1]
353612
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 180.7ms
353613
+ [ActiveJob] [ActionMailer::DeliveryJob] [ac9663da-a7d0-413b-9b7d-3eedd88f32c1]
353614
+ Sent mail to foo@example.com (9.1ms)
353615
+ [ActiveJob] [ActionMailer::DeliveryJob] [ac9663da-a7d0-413b-9b7d-3eedd88f32c1] Date: Sat, 23 Apr 2016 00:09:49 -0500
353616
+ From: no-reply@rails-identity.com
353617
+ To: foo@example.com
353618
+ Message-ID: <571b039da2a4a_85b83ff45185246c89544@galt.local.mail>
353619
+ Subject: [rails-identity] Email Confirmation
353620
+ Mime-Version: 1.0
353621
+ Content-Type: multipart/alternative;
353622
+ boundary="--==_mimepart_571b039da1062_85b83ff45185246c8948d";
353623
+ charset=UTF-8
353624
+ Content-Transfer-Encoding: 7bit
353625
+
353626
+
353627
+ ----==_mimepart_571b039da1062_85b83ff45185246c8948d
353628
+ Content-Type: text/plain;
353629
+ charset=UTF-8
353630
+ Content-Transfer-Encoding: 7bit
353631
+
353632
+ Dear foo@example.com,
353633
+
353634
+ Please confirm your account with rails-identity by making a PATCH request
353635
+ on the current user with a provided verification token. For example,
353636
+
353637
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YTk5ZjE2ZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YTlhMzE2MC0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4ODE4OSwiZXhwIjoxNDYxMzkxNzg5fQ.rXwvc2apfSa20HB4gDqztUXbf53aIIk8bLX8a9wONV4 verified=true
353638
+
353639
+ will confirm the account. Here is the verification token:
353640
+
353641
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YTk5ZjE2ZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YTlhMzE2MC0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4ODE4OSwiZXhwIjoxNDYxMzkxNzg5fQ.rXwvc2apfSa20HB4gDqztUXbf53aIIk8bLX8a9wONV4
353642
+
353643
+ Thank you for using rails-identity,
353644
+ rails-identity
353645
+
353646
+
353647
+ ----==_mimepart_571b039da1062_85b83ff45185246c8948d
353648
+ Content-Type: text/html;
353649
+ charset=UTF-8
353650
+ Content-Transfer-Encoding: 7bit
353651
+
353652
+ <html>
353653
+ <body>
353654
+ <p>Dear foo@example.com,</p>
353655
+
353656
+ <p>Please confirm your account with rails-identity by making a PATCH request
353657
+ on the current user with a provided verification token. For example,
353658
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YTk5ZjE2ZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YTlhMzE2MC0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4ODE4OSwiZXhwIjoxNDYxMzkxNzg5fQ.rXwvc2apfSa20HB4gDqztUXbf53aIIk8bLX8a9wONV4
353659
+ verified=true</pre> will confirm the account. Here is the verification
353660
+ token:</p>
353661
+
353662
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YTk5ZjE2ZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YTlhMzE2MC0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4ODE4OSwiZXhwIjoxNDYxMzkxNzg5fQ.rXwvc2apfSa20HB4gDqztUXbf53aIIk8bLX8a9wONV4</pre>
353663
+
353664
+ <p>Thank you for using rails-identity</p>
353665
+ <p><b>rails-identity</b></p>
353666
+
353667
+ </body>
353668
+ </html>
353669
+
353670
+ ----==_mimepart_571b039da1062_85b83ff45185246c8948d--
353671
+
353672
+ [ActiveJob] [ActionMailer::DeliveryJob] [ac9663da-a7d0-413b-9b7d-3eedd88f32c1] Performed ActionMailer::DeliveryJob from Inline(mailers) in 190.65ms
353673
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: ac9663da-a7d0-413b-9b7d-3eedd88f32c1) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/9a99f16e-0911-11e6-8c04-6c4008a6fa2a
353674
+ Completed 201 Created in 253ms (Views: 0.4ms | ActiveRecord: 1.1ms)
353675
+  (0.6ms) rollback transaction
353676
+  (0.0ms) begin transaction
353677
+ ------------------------------------------------------------------
353678
+ RailsIdentity::UsersControllerTest: test_public_cannot_show_a_user
353679
+ ------------------------------------------------------------------
353680
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353681
+ Processing by RailsIdentity::UsersController#show as HTML
353682
+ Parameters: {"id"=>"1"}
353683
+ Requires a token
353684
+ Token decode error: Nil JSON web token
353685
+ 401 - Invalid token:
353686
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
353687
+  (0.1ms) rollback transaction
353688
+  (0.0ms) begin transaction
353689
+ --------------------------------------------------------------------------------
353690
+ RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_a_password
353691
+ --------------------------------------------------------------------------------
353692
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353693
+ Processing by RailsIdentity::UsersController#create as HTML
353694
+ Parameters: {"username"=>"foo@example.com"}
353695
+ Accepts a token
353696
+ Token decode error: Nil JSON web token
353697
+ Suppressing error: Invalid token:
353698
+ Create new user
353699
+  (0.0ms) SAVEPOINT active_record_1
353700
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
353701
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
353702
+ Completed 400 Bad Request in 3ms (Views: 0.2ms | ActiveRecord: 0.2ms)
353703
+  (0.0ms) rollback transaction
353704
+  (0.0ms) begin transaction
353705
+ ------------------------------------------------------------------------------------------------------------
353706
+ RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_reset_token_without_username
353707
+ ------------------------------------------------------------------------------------------------------------
353708
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353709
+ Processing by RailsIdentity::UsersController#update as HTML
353710
+ Parameters: {"issue_verification_token"=>true, "id"=>"current"}
353711
+ Accepts a token
353712
+ Token decode error: Nil JSON web token
353713
+ Suppressing error: Invalid token:
353714
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" IS NULL LIMIT 1
353715
+ 404 - Repia::Errors::NotFound
353716
+ Completed 404 Not Found in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)
353717
+  (0.0ms) rollback transaction
353718
+  (0.0ms) begin transaction
353719
+ -------------------------------------------------------------------------
353720
+ RailsIdentity::UsersControllerTest: test_user_cannot_create_an_admin_user
353721
+ -------------------------------------------------------------------------
353722
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353723
+ Processing by RailsIdentity::UsersController#create as HTML
353724
+ Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100"}
353725
+ Accepts a token
353726
+ Token decode error: Nil JSON web token
353727
+ Suppressing error: Invalid token:
353728
+ Create new user
353729
+ Unpermitted parameter: role
353730
+  (0.0ms) SAVEPOINT active_record_1
353731
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
353732
+ SQL (0.2ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$y0Xl8IRvYPXAxf3ZgjYJS.uxKDwhYtucnxLkxbbCuzWCb5kj14OSW"], ["role", 10], ["created_at", "2016-04-23 05:09:49.693743"], ["updated_at", "2016-04-23 05:09:49.693743"], ["uuid", "9ac2ed30-0911-11e6-8c04-6c4008a6fa2a"]]
353733
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353734
+  (0.0ms) SAVEPOINT active_record_1
353735
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "9ac2ed30-0911-11e6-8c04-6c4008a6fa2a"], ["uuid", "9ac32c1e-0911-11e6-8c04-6c4008a6fa2a"], ["secret", "d1b36a4c-3487-469e-94aa-6d906a0cb5df"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YWMyZWQzMC0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YWMzMmMxZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4MTg5LCJleHAiOjE0NjEzOTE3ODl9.W6ilyEbycBt14WLaJcqE1u3Uf8LjoIqmA9Es27OkbwU"], ["created_at", "2016-04-23 05:09:49.696135"], ["updated_at", "2016-04-23 05:09:49.696135"]]
353736
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353737
+  (0.0ms) SAVEPOINT active_record_1
353738
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '9ac2ed30-0911-11e6-8c04-6c4008a6fa2a') LIMIT 1
353739
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YWMyZWQzMC0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YWMzMmMxZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4MTg5LCJleHAiOjE0NjEzOTE3ODl9.W6ilyEbycBt14WLaJcqE1u3Uf8LjoIqmA9Es27OkbwU"], ["updated_at", "2016-04-23 05:09:49.697623"], ["uuid", "9ac2ed30-0911-11e6-8c04-6c4008a6fa2a"]]
353740
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353741
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "9ac2ed30-0911-11e6-8c04-6c4008a6fa2a"]]
353742
+ [ActiveJob] [ActionMailer::DeliveryJob] [b7c36392-6e35-4395-9e2b-a0d4c08139dd] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/9ac2ed30-0911-11e6-8c04-6c4008a6fa2a
353743
+ [ActiveJob] [ActionMailer::DeliveryJob] [b7c36392-6e35-4395-9e2b-a0d4c08139dd] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
353744
+ [ActiveJob] [ActionMailer::DeliveryJob] [b7c36392-6e35-4395-9e2b-a0d4c08139dd] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
353745
+ [ActiveJob] [ActionMailer::DeliveryJob] [b7c36392-6e35-4395-9e2b-a0d4c08139dd]
353746
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.5ms
353747
+ [ActiveJob] [ActionMailer::DeliveryJob] [b7c36392-6e35-4395-9e2b-a0d4c08139dd]
353748
+ Sent mail to foo@example.com (3.9ms)
353749
+ [ActiveJob] [ActionMailer::DeliveryJob] [b7c36392-6e35-4395-9e2b-a0d4c08139dd] Date: Sat, 23 Apr 2016 00:09:49 -0500
353750
+ From: no-reply@rails-identity.com
353751
+ To: foo@example.com
353752
+ Message-ID: <571b039dac074_85b83ff45185246c89736@galt.local.mail>
353753
+ Subject: [rails-identity] Email Confirmation
353754
+ Mime-Version: 1.0
353755
+ Content-Type: multipart/alternative;
353756
+ boundary="--==_mimepart_571b039dab6fc_85b83ff45185246c89670";
353757
+ charset=UTF-8
353758
+ Content-Transfer-Encoding: 7bit
353759
+
353760
+
353761
+ ----==_mimepart_571b039dab6fc_85b83ff45185246c89670
353762
+ Content-Type: text/plain;
353763
+ charset=UTF-8
353764
+ Content-Transfer-Encoding: 7bit
353765
+
353766
+ Dear foo@example.com,
353767
+
353768
+ Please confirm your account with rails-identity by making a PATCH request
353769
+ on the current user with a provided verification token. For example,
353770
+
353771
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YWMyZWQzMC0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YWMzMmMxZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4MTg5LCJleHAiOjE0NjEzOTE3ODl9.W6ilyEbycBt14WLaJcqE1u3Uf8LjoIqmA9Es27OkbwU verified=true
353772
+
353773
+ will confirm the account. Here is the verification token:
353774
+
353775
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YWMyZWQzMC0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YWMzMmMxZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4MTg5LCJleHAiOjE0NjEzOTE3ODl9.W6ilyEbycBt14WLaJcqE1u3Uf8LjoIqmA9Es27OkbwU
353776
+
353777
+ Thank you for using rails-identity,
353778
+ rails-identity
353779
+
353780
+
353781
+ ----==_mimepart_571b039dab6fc_85b83ff45185246c89670
353782
+ Content-Type: text/html;
353783
+ charset=UTF-8
353784
+ Content-Transfer-Encoding: 7bit
353785
+
353786
+ <html>
353787
+ <body>
353788
+ <p>Dear foo@example.com,</p>
353789
+
353790
+ <p>Please confirm your account with rails-identity by making a PATCH request
353791
+ on the current user with a provided verification token. For example,
353792
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YWMyZWQzMC0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YWMzMmMxZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4MTg5LCJleHAiOjE0NjEzOTE3ODl9.W6ilyEbycBt14WLaJcqE1u3Uf8LjoIqmA9Es27OkbwU
353793
+ verified=true</pre> will confirm the account. Here is the verification
353794
+ token:</p>
353795
+
353796
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YWMyZWQzMC0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YWMzMmMxZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4MTg5LCJleHAiOjE0NjEzOTE3ODl9.W6ilyEbycBt14WLaJcqE1u3Uf8LjoIqmA9Es27OkbwU</pre>
353797
+
353798
+ <p>Thank you for using rails-identity</p>
353799
+ <p><b>rails-identity</b></p>
353800
+
353801
+ </body>
353802
+ </html>
353803
+
353804
+ ----==_mimepart_571b039dab6fc_85b83ff45185246c89670--
353805
+
353806
+ [ActiveJob] [ActionMailer::DeliveryJob] [b7c36392-6e35-4395-9e2b-a0d4c08139dd] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.89ms
353807
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: b7c36392-6e35-4395-9e2b-a0d4c08139dd) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/9ac2ed30-0911-11e6-8c04-6c4008a6fa2a
353808
+ Completed 201 Created in 17ms (Views: 0.3ms | ActiveRecord: 0.8ms)
353809
+  (0.7ms) rollback transaction
353810
+  (0.1ms) begin transaction
353811
+ --------------------------------------------------------------------------
353812
+ RailsIdentity::UsersControllerTest: test_update_password_using_reset_token
353813
+ --------------------------------------------------------------------------
353814
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353815
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353816
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353817
+ Processing by RailsIdentity::UsersController#update as HTML
353818
+ Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
353819
+ Accepts a token
353820
+ Token decode error: Nil JSON web token
353821
+ Suppressing error: Invalid token:
353822
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
353823
+  (0.1ms) SAVEPOINT active_record_1
353824
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "9ac66730-0911-11e6-8c04-6c4008a6fa2a"], ["secret", "6699b52e-46e3-46fa-904b-6fd80127f940"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWFjNjY3MzAtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE4OSwiZXhwIjoxNDYxMzkxNzg5fQ.zLmA6FSg1crDDvdP1JAEr44WDA-ygeJKRVi5Fzgk3KE"], ["created_at", "2016-04-23 05:09:49.717459"], ["updated_at", "2016-04-23 05:09:49.717459"]]
353825
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353826
+  (0.1ms) SAVEPOINT active_record_1
353827
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
353828
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWFjNjY3MzAtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE4OSwiZXhwIjoxNDYxMzkxNzg5fQ.zLmA6FSg1crDDvdP1JAEr44WDA-ygeJKRVi5Fzgk3KE"], ["updated_at", "2016-04-23 05:09:49.719938"], ["uuid", "1"]]
353829
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353830
+ [ActiveJob] RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353831
+ [ActiveJob] [ActionMailer::DeliveryJob] [ff534ea9-cf57-4bb4-88f7-025d59d40271] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
353832
+ [ActiveJob] [ActionMailer::DeliveryJob] [ff534ea9-cf57-4bb4-88f7-025d59d40271] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (0.6ms)
353833
+ [ActiveJob] [ActionMailer::DeliveryJob] [ff534ea9-cf57-4bb4-88f7-025d59d40271] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (0.4ms)
353834
+ [ActiveJob] [ActionMailer::DeliveryJob] [ff534ea9-cf57-4bb4-88f7-025d59d40271]
353835
+ RailsIdentity::UserMailer#password_reset: processed outbound mail in 10.2ms
353836
+ [ActiveJob] [ActionMailer::DeliveryJob] [ff534ea9-cf57-4bb4-88f7-025d59d40271]
353837
+ Sent mail to one@example.com (4.6ms)
353838
+ [ActiveJob] [ActionMailer::DeliveryJob] [ff534ea9-cf57-4bb4-88f7-025d59d40271] Date: Sat, 23 Apr 2016 00:09:49 -0500
353839
+ From: no-reply@rails-identity.com
353840
+ To: one@example.com
353841
+ Message-ID: <571b039db3acd_85b83ff45185246c89985@galt.local.mail>
353842
+ Subject: [rails-identity] Password Reset
353843
+ Mime-Version: 1.0
353844
+ Content-Type: multipart/alternative;
353845
+ boundary="--==_mimepart_571b039db2d95_85b83ff45185246c89882";
353846
+ charset=UTF-8
353847
+ Content-Transfer-Encoding: 7bit
353848
+
353849
+
353850
+ ----==_mimepart_571b039db2d95_85b83ff45185246c89882
353851
+ Content-Type: text/plain;
353852
+ charset=UTF-8
353853
+ Content-Transfer-Encoding: 7bit
353854
+
353855
+ Dear one@example.com,
353856
+
353857
+ You have requested to reset your password. Here are the user UUID and reset
353858
+ token. Make a PATCH request on the UUID with the reset token to set a new
353859
+ password. For instance,
353860
+
353861
+ http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
353862
+
353863
+ will set the password to "reallysecret" (without quotes) for the user to
353864
+ whom the reset token was issued.
353865
+
353866
+ Here is the reset token: @user.reset_token
353867
+
353868
+ Good luck! :)
353869
+ rails-identity
353870
+
353871
+
353872
+ ----==_mimepart_571b039db2d95_85b83ff45185246c89882
353873
+ Content-Type: text/html;
353874
+ charset=UTF-8
353875
+ Content-Transfer-Encoding: 7bit
353876
+
353877
+ <html>
353878
+ <body>
353879
+ <p>Dear one@example.com,</p>
353880
+
353881
+ <p>You have requested to reset your password. Here are the user UUID and
353882
+ reset token. Make a PATCH request on the UUID with the reset token to set a
353883
+ new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWFjNjY3MzAtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE4OSwiZXhwIjoxNDYxMzkxNzg5fQ.zLmA6FSg1crDDvdP1JAEr44WDA-ygeJKRVi5Fzgk3KE password=reallysecret
353884
+ password_confirmation=reallysecret</pre> will set the password to
353885
+ <pre>reallysecret</pre> for the user to whom the reset token was issued.
353886
+ Here is the reset token:</p>
353887
+
353888
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWFjNjY3MzAtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE4OSwiZXhwIjoxNDYxMzkxNzg5fQ.zLmA6FSg1crDDvdP1JAEr44WDA-ygeJKRVi5Fzgk3KE</pre>
353889
+
353890
+ <p>Good luck! :)</p>
353891
+ <p><b>rails-identity</b></p>
353892
+
353893
+ </body>
353894
+ </html>
353895
+
353896
+ ----==_mimepart_571b039db2d95_85b83ff45185246c89882--
353897
+
353898
+ [ActiveJob] [ActionMailer::DeliveryJob] [ff534ea9-cf57-4bb4-88f7-025d59d40271] Performed ActionMailer::DeliveryJob from Inline(mailers) in 15.38ms
353899
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: ff534ea9-cf57-4bb4-88f7-025d59d40271) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
353900
+ Rendered text template (0.0ms)
353901
+ Completed 204 No Content in 25ms (Views: 1.5ms | ActiveRecord: 0.7ms)
353902
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353903
+ Processing by RailsIdentity::UsersController#update as HTML
353904
+ Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWFjNjY3MzAtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE4OSwiZXhwIjoxNDYxMzkxNzg5fQ.zLmA6FSg1crDDvdP1JAEr44WDA-ygeJKRVi5Fzgk3KE", "id"=>"1"}
353905
+ Accepts a token
353906
+ Token well formatted for user 1,
353907
+ session 9ac66730-0911-11e6-8c04-6c4008a6fa2a
353908
+ Cache miss. Try database.
353909
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353910
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "9ac66730-0911-11e6-8c04-6c4008a6fa2a"]]
353911
+ Token well formatted and verified. Set cache.
353912
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353913
+ Attempting to get RailsIdentity::User 1
353914
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353915
+ Checking to see if authorized to access object
353916
+ Unpermitted parameters: token, id
353917
+  (0.1ms) SAVEPOINT active_record_1
353918
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
353919
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["password_digest", "$2a$04$G2rz/I8xYp6I5FoElaEYjuHiet1jRNM0M3prAahZVOLdKzh5Aojau"], ["updated_at", "2016-04-23 05:09:49.748934"], ["uuid", "1"]]
353920
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353921
+ Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 1.2ms)
353922
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353923
+  (0.8ms) rollback transaction
353924
+  (0.0ms) begin transaction
353925
+ ---------------------------------------------------------------------------
353926
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_no_token_payload
353927
+ ---------------------------------------------------------------------------
353928
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353929
+ Processing by RailsIdentity::UsersController#show as HTML
353930
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.bYG28Q3er79dBhxxkx_bMyv-bAVKw_AzP18D1P6Pdcw", "id"=>"1"}
353931
+ Requires a token
353932
+ User UUID or session UUID is nil
353933
+ 401 - Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.bYG28Q3er79dBhxxkx_bMyv-bAVKw_AzP18D1P6Pdcw
353934
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
353935
+  (0.1ms) rollback transaction
353936
+  (0.0ms) begin transaction
353937
+ ---------------------------------------------------------------
353938
+ RailsIdentity::UsersControllerTest: test_cannot_show_other_user
353939
+ ---------------------------------------------------------------
353940
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353941
+ Processing by RailsIdentity::UsersController#show as HTML
353942
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"2"}
353943
+ Requires a token
353944
+ Token well formatted for user 1,
353945
+ session 1
353946
+ Cache miss. Try database.
353947
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353948
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353949
+ Token well formatted and verified. Set cache.
353950
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353951
+ Attempting to get RailsIdentity::User 2
353952
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
353953
+ Checking to see if authorized to access object
353954
+ 401 - Repia::Errors::Unauthorized
353955
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
353956
+  (0.1ms) rollback transaction
353957
+  (0.0ms) begin transaction
353958
+ ------------------------------------------------------------
353959
+ RailsIdentity::UsersControllerTest: test_update_current_user
353960
+ ------------------------------------------------------------
353961
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353962
+ Processing by RailsIdentity::UsersController#update as HTML
353963
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"current"}
353964
+ Accepts a token
353965
+ Token well formatted for user 1,
353966
+ session 1
353967
+ Cache miss. Try database.
353968
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353969
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353970
+ Token well formatted and verified. Set cache.
353971
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353972
+ Attempting to get RailsIdentity::User 1
353973
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353974
+ Checking to see if authorized to access object
353975
+ Unpermitted parameters: token, id
353976
+  (0.0ms) SAVEPOINT active_record_1
353977
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
353978
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-23 05:09:49.777377"], ["uuid", "1"]]
353979
+  (0.0ms) RELEASE SAVEPOINT active_record_1
353980
+ Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 0.5ms)
353981
+  (0.3ms) rollback transaction
353982
+  (0.0ms) begin transaction
353983
+ ---------------------------------------------------------------------------------------------
353984
+ RailsIdentity::UsersControllerTest: test_update_a_user_with_a_new_password_using_old_password
353985
+ ---------------------------------------------------------------------------------------------
353986
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353987
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353988
+ Processing by RailsIdentity::UsersController#update as HTML
353989
+ Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"1"}
353990
+ Accepts a token
353991
+ Token well formatted for user 1,
353992
+ session 1
353993
+ Cache miss. Try database.
353994
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353995
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353996
+ Token well formatted and verified. Set cache.
353997
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
353998
+ Attempting to get RailsIdentity::User 1
353999
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354000
+ Checking to see if authorized to access object
354001
+ Unpermitted parameters: old_password, token, id
354002
+  (0.1ms) SAVEPOINT active_record_1
354003
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
354004
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["password_digest", "$2a$04$WLu2P7wYrlXD6Qfp8/5u0uJqmEEun4uMDH7gFJp2qMb6lOJ/YMwba"], ["updated_at", "2016-04-23 05:09:49.859590"], ["uuid", "1"]]
354005
+  (0.0ms) RELEASE SAVEPOINT active_record_1
354006
+ Completed 200 OK in 77ms (Views: 0.4ms | ActiveRecord: 0.7ms)
354007
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354008
+  (0.4ms) rollback transaction
354009
+  (0.1ms) begin transaction
354010
+ -------------------------------------------------------------------------------------------------
354011
+ RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_without_username
354012
+ -------------------------------------------------------------------------------------------------
354013
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354014
+ Processing by RailsIdentity::UsersController#update as HTML
354015
+ Parameters: {"issue_reset_token"=>true, "id"=>"current"}
354016
+ Accepts a token
354017
+ Token decode error: Nil JSON web token
354018
+ Suppressing error: Invalid token:
354019
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" IS NULL LIMIT 1
354020
+ 404 - Repia::Errors::NotFound
354021
+ Completed 404 Not Found in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
354022
+  (0.1ms) rollback transaction
354023
+  (0.1ms) begin transaction
354024
+ ------------------------------------------------------
354025
+ RailsIdentity::UsersControllerTest: test_delete_a_user
354026
+ ------------------------------------------------------
354027
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354028
+ Processing by RailsIdentity::UsersController#destroy as HTML
354029
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"1"}
354030
+ Requires a token
354031
+ Token well formatted for user 1,
354032
+ session 1
354033
+ Cache miss. Try database.
354034
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354035
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354036
+ Token well formatted and verified. Set cache.
354037
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354038
+ Attempting to get RailsIdentity::User 1
354039
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354040
+ Checking to see if authorized to access object
354041
+  (0.0ms) SAVEPOINT active_record_1
354042
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "deleted_at" = '2016-04-23 05:09:49.877925' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
354043
+  (0.0ms) RELEASE SAVEPOINT active_record_1
354044
+ Rendered text template (0.0ms)
354045
+ Completed 204 No Content in 6ms (Views: 0.3ms | ActiveRecord: 0.4ms)
354046
+  (0.4ms) rollback transaction
354047
+  (0.0ms) begin transaction
354048
+ ------------------------------------------------------------------
354049
+ RailsIdentity::UsersControllerTest: test_admin_can_show_other_user
354050
+ ------------------------------------------------------------------
354051
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354052
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
354053
+ Processing by RailsIdentity::UsersController#show as HTML
354054
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM4NTg4fQ.cjfoGbBwhcEa7az_eHXKNQdlcWcW--t5tj4WuH6ukMo", "id"=>"1"}
354055
+ Requires a token
354056
+ Token well formatted for user admin_one,
354057
+ session session_admin_one
354058
+ Cache miss. Try database.
354059
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
354060
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
354061
+ Token well formatted and verified. Set cache.
354062
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
354063
+ Attempting to get RailsIdentity::User 1
354064
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354065
+ Checking to see if authorized to access object
354066
+ Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms)
354067
+  (0.1ms) rollback transaction
354068
+  (0.0ms) begin transaction
354069
+ --------------------------------------------------------------------
354070
+ RailsIdentity::UsersControllerTest: test_admin_can_delete_other_user
354071
+ --------------------------------------------------------------------
354072
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354073
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
354074
+ Processing by RailsIdentity::UsersController#destroy as HTML
354075
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM4NTg4fQ.cjfoGbBwhcEa7az_eHXKNQdlcWcW--t5tj4WuH6ukMo", "id"=>"1"}
354076
+ Requires a token
354077
+ Token well formatted for user admin_one,
354078
+ session session_admin_one
354079
+ Cache miss. Try database.
354080
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
354081
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
354082
+ Token well formatted and verified. Set cache.
354083
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
354084
+ Attempting to get RailsIdentity::User 1
354085
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354086
+ Checking to see if authorized to access object
354087
+  (0.0ms) SAVEPOINT active_record_1
354088
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "deleted_at" = '2016-04-23 05:09:49.897004' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
354089
+  (0.0ms) RELEASE SAVEPOINT active_record_1
354090
+ Rendered text template (0.0ms)
354091
+ Completed 204 No Content in 5ms (Views: 0.4ms | ActiveRecord: 0.4ms)
354092
+  (0.4ms) rollback transaction
354093
+  (0.0ms) begin transaction
354094
+ ------------------------------------------------------
354095
+ RailsIdentity::UsersControllerTest: test_create_a_user
354096
+ ------------------------------------------------------
354097
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354098
+ Processing by RailsIdentity::UsersController#create as HTML
354099
+ Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
354100
+ Accepts a token
354101
+ Token decode error: Nil JSON web token
354102
+ Suppressing error: Invalid token:
354103
+ Create new user
354104
+  (0.1ms) SAVEPOINT active_record_1
354105
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
354106
+ SQL (0.2ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$iuiD5FDT0MLYLZ1GSW7fhunJC7NajPyvYhkurF273N41e9fnnYBkm"], ["role", 10], ["created_at", "2016-04-23 05:09:49.906871"], ["updated_at", "2016-04-23 05:09:49.906871"], ["uuid", "9ae372ee-0911-11e6-8c04-6c4008a6fa2a"]]
354107
+  (0.0ms) RELEASE SAVEPOINT active_record_1
354108
+  (0.0ms) SAVEPOINT active_record_1
354109
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "9ae372ee-0911-11e6-8c04-6c4008a6fa2a"], ["uuid", "9ae3b8bc-0911-11e6-8c04-6c4008a6fa2a"], ["secret", "77aea047-85e2-42bf-9bb1-adf40041d8ed"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YWUzNzJlZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YWUzYjhiYy0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4MTg5LCJleHAiOjE0NjEzOTE3ODl9.LGUYYtMFxdlFn_j2afY4zeBd5DylkA4ahgGt426igzo"], ["created_at", "2016-04-23 05:09:49.909508"], ["updated_at", "2016-04-23 05:09:49.909508"]]
354110
+  (0.0ms) RELEASE SAVEPOINT active_record_1
354111
+  (0.0ms) SAVEPOINT active_record_1
354112
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '9ae372ee-0911-11e6-8c04-6c4008a6fa2a') LIMIT 1
354113
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YWUzNzJlZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YWUzYjhiYy0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4MTg5LCJleHAiOjE0NjEzOTE3ODl9.LGUYYtMFxdlFn_j2afY4zeBd5DylkA4ahgGt426igzo"], ["updated_at", "2016-04-23 05:09:49.910996"], ["uuid", "9ae372ee-0911-11e6-8c04-6c4008a6fa2a"]]
354114
+  (0.0ms) RELEASE SAVEPOINT active_record_1
354115
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "9ae372ee-0911-11e6-8c04-6c4008a6fa2a"]]
354116
+ [ActiveJob] [ActionMailer::DeliveryJob] [ecf92bf3-dda2-4f2a-8fc3-3db2d1a8fd96] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/9ae372ee-0911-11e6-8c04-6c4008a6fa2a
354117
+ [ActiveJob] [ActionMailer::DeliveryJob] [ecf92bf3-dda2-4f2a-8fc3-3db2d1a8fd96] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
354118
+ [ActiveJob] [ActionMailer::DeliveryJob] [ecf92bf3-dda2-4f2a-8fc3-3db2d1a8fd96] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
354119
+ [ActiveJob] [ActionMailer::DeliveryJob] [ecf92bf3-dda2-4f2a-8fc3-3db2d1a8fd96]
354120
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.5ms
354121
+ [ActiveJob] [ActionMailer::DeliveryJob] [ecf92bf3-dda2-4f2a-8fc3-3db2d1a8fd96]
354122
+ Sent mail to foo@example.com (3.8ms)
354123
+ [ActiveJob] [ActionMailer::DeliveryJob] [ecf92bf3-dda2-4f2a-8fc3-3db2d1a8fd96] Date: Sat, 23 Apr 2016 00:09:49 -0500
354124
+ From: no-reply@rails-identity.com
354125
+ To: foo@example.com
354126
+ Message-ID: <571b039de0132_85b83ff45185246c901e0@galt.local.mail>
354127
+ Subject: [rails-identity] Email Confirmation
354128
+ Mime-Version: 1.0
354129
+ Content-Type: multipart/alternative;
354130
+ boundary="--==_mimepart_571b039ddf7ce_85b83ff45185246c9008";
354131
+ charset=UTF-8
354132
+ Content-Transfer-Encoding: 7bit
354133
+
354134
+
354135
+ ----==_mimepart_571b039ddf7ce_85b83ff45185246c9008
354136
+ Content-Type: text/plain;
354137
+ charset=UTF-8
354138
+ Content-Transfer-Encoding: 7bit
354139
+
354140
+ Dear foo@example.com,
354141
+
354142
+ Please confirm your account with rails-identity by making a PATCH request
354143
+ on the current user with a provided verification token. For example,
354144
+
354145
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YWUzNzJlZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YWUzYjhiYy0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4MTg5LCJleHAiOjE0NjEzOTE3ODl9.LGUYYtMFxdlFn_j2afY4zeBd5DylkA4ahgGt426igzo verified=true
354146
+
354147
+ will confirm the account. Here is the verification token:
354148
+
354149
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YWUzNzJlZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YWUzYjhiYy0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4MTg5LCJleHAiOjE0NjEzOTE3ODl9.LGUYYtMFxdlFn_j2afY4zeBd5DylkA4ahgGt426igzo
354150
+
354151
+ Thank you for using rails-identity,
354152
+ rails-identity
354153
+
354154
+
354155
+ ----==_mimepart_571b039ddf7ce_85b83ff45185246c9008
354156
+ Content-Type: text/html;
354157
+ charset=UTF-8
354158
+ Content-Transfer-Encoding: 7bit
354159
+
354160
+ <html>
354161
+ <body>
354162
+ <p>Dear foo@example.com,</p>
354163
+
354164
+ <p>Please confirm your account with rails-identity by making a PATCH request
354165
+ on the current user with a provided verification token. For example,
354166
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YWUzNzJlZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YWUzYjhiYy0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4MTg5LCJleHAiOjE0NjEzOTE3ODl9.LGUYYtMFxdlFn_j2afY4zeBd5DylkA4ahgGt426igzo
354167
+ verified=true</pre> will confirm the account. Here is the verification
354168
+ token:</p>
354169
+
354170
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI5YWUzNzJlZS0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI5YWUzYjhiYy0wOTExLTExZTYtOGMwNC02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4MTg5LCJleHAiOjE0NjEzOTE3ODl9.LGUYYtMFxdlFn_j2afY4zeBd5DylkA4ahgGt426igzo</pre>
354171
+
354172
+ <p>Thank you for using rails-identity</p>
354173
+ <p><b>rails-identity</b></p>
354174
+
354175
+ </body>
354176
+ </html>
354177
+
354178
+ ----==_mimepart_571b039ddf7ce_85b83ff45185246c9008--
354179
+
354180
+ [ActiveJob] [ActionMailer::DeliveryJob] [ecf92bf3-dda2-4f2a-8fc3-3db2d1a8fd96] Performed ActionMailer::DeliveryJob from Inline(mailers) in 7.07ms
354181
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: ecf92bf3-dda2-4f2a-8fc3-3db2d1a8fd96) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/9ae372ee-0911-11e6-8c04-6c4008a6fa2a
354182
+ Completed 201 Created in 18ms (Views: 0.4ms | ActiveRecord: 0.8ms)
354183
+  (0.7ms) rollback transaction
354184
+  (0.0ms) begin transaction
354185
+ -----------------------------------------------------------------
354186
+ RailsIdentity::UsersControllerTest: test_admin_can_list_all_users
354187
+ -----------------------------------------------------------------
354188
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354189
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
354190
+ Processing by RailsIdentity::UsersController#index as HTML
354191
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM4NTg4fQ.cjfoGbBwhcEa7az_eHXKNQdlcWcW--t5tj4WuH6ukMo"}
354192
+ Requires an admin token
354193
+ Token well formatted for user admin_one,
354194
+ session session_admin_one
354195
+ Cache miss. Try database.
354196
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
354197
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
354198
+ Token well formatted and verified. Set cache.
354199
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
354200
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL
354201
+ Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 0.2ms)
354202
+  (0.0ms) SELECT COUNT(*) FROM "rails_identity_sessions"
354203
+  (0.0ms) rollback transaction
354204
+  (0.0ms) begin transaction
354205
+ -------------------------------------------------------------------
354206
+ RailsIdentity::UsersControllerTest: test_cannot_delete_another_user
354207
+ -------------------------------------------------------------------
354208
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354209
+ Processing by RailsIdentity::UsersController#destroy as HTML
354210
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"2"}
354211
+ Requires a token
354212
+ Token well formatted for user 1,
354213
+ session 1
354214
+ Cache miss. Try database.
354215
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354216
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354217
+ Token well formatted and verified. Set cache.
354218
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354219
+ Attempting to get RailsIdentity::User 2
354220
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
354221
+ Checking to see if authorized to access object
354222
+ 401 - Repia::Errors::Unauthorized
354223
+ Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.1ms)
354224
+  (0.0ms) rollback transaction
354225
+  (0.0ms) begin transaction
354226
+ --------------------------------------------------------------------
354227
+ RailsIdentity::UsersControllerTest: test_cannot_update_invalid_email
354228
+ --------------------------------------------------------------------
354229
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354230
+ Processing by RailsIdentity::UsersController#update as HTML
354231
+ Parameters: {"username"=>"foobar", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"1"}
354232
+ Accepts a token
354233
+ Token well formatted for user 1,
354234
+ session 1
354235
+ Cache miss. Try database.
354236
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354237
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354238
+ Token well formatted and verified. Set cache.
354239
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354240
+ Attempting to get RailsIdentity::User 1
354241
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354242
+ Checking to see if authorized to access object
354243
+ Unpermitted parameters: token, id
354244
+  (0.0ms) SAVEPOINT active_record_1
354245
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foobar' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
354246
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
354247
+ Completed 400 Bad Request in 6ms (Views: 0.2ms | ActiveRecord: 0.3ms)
354248
+  (0.0ms) rollback transaction
354249
+  (0.0ms) begin transaction
354250
+ ---------------------------------------------------------------------
354251
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_ill-formed
354252
+ ---------------------------------------------------------------------
354253
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354254
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354255
+ Processing by RailsIdentity::UsersController#show as HTML
354256
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE4OSwiZXhwIjoxNDYxMzg4MjQ5fQ.uhh9JDX-bz7bL6FzUZdtMMQxJKUuSCNNAdFSSoVSNrY", "id"=>"1"}
354257
+ Requires a token
354258
+ User UUID or session UUID is nil
354259
+ 401 - Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE4OSwiZXhwIjoxNDYxMzg4MjQ5fQ.uhh9JDX-bz7bL6FzUZdtMMQxJKUuSCNNAdFSSoVSNrY
354260
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
354261
+  (0.1ms) rollback transaction
354262
+  (0.0ms) begin transaction
354263
+ ------------------------------------------------------------
354264
+ RailsIdentity::UsersControllerTest: test_show_a_current_user
354265
+ ------------------------------------------------------------
354266
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354267
+ Processing by RailsIdentity::UsersController#show as HTML
354268
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"current"}
354269
+ Requires a token
354270
+ Token well formatted for user 1,
354271
+ session 1
354272
+ Cache miss. Try database.
354273
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354274
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354275
+ Token well formatted and verified. Set cache.
354276
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354277
+ Attempting to get RailsIdentity::User 1
354278
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354279
+ Checking to see if authorized to access object
354280
+ Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 0.2ms)
354281
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354282
+  (0.1ms) rollback transaction
354283
+  (0.0ms) begin transaction
354284
+ ----------------------------------------------------
354285
+ RailsIdentity::UsersControllerTest: test_show_a_user
354286
+ ----------------------------------------------------
354287
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354288
+ Processing by RailsIdentity::UsersController#show as HTML
354289
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"1"}
354290
+ Requires a token
354291
+ Token well formatted for user 1,
354292
+ session 1
354293
+ Cache miss. Try database.
354294
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354295
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354296
+ Token well formatted and verified. Set cache.
354297
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354298
+ Attempting to get RailsIdentity::User 1
354299
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354300
+ Checking to see if authorized to access object
354301
+ Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 0.2ms)
354302
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354303
+  (0.1ms) rollback transaction
354304
+  (0.0ms) begin transaction
354305
+ -------------------------------------------------------------------
354306
+ RailsIdentity::UsersControllerTest: test_cannot_update_another_user
354307
+ -------------------------------------------------------------------
354308
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354309
+ Processing by RailsIdentity::UsersController#update as HTML
354310
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"2"}
354311
+ Accepts a token
354312
+ Token well formatted for user 1,
354313
+ session 1
354314
+ Cache miss. Try database.
354315
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354316
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354317
+ Token well formatted and verified. Set cache.
354318
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354319
+ Attempting to get RailsIdentity::User 2
354320
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
354321
+ Checking to see if authorized to access object
354322
+ 401 - Repia::Errors::Unauthorized
354323
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
354324
+  (0.1ms) rollback transaction
354325
+  (0.0ms) begin transaction
354326
+ -----------------------------------------------------------------------------------------------------------
354327
+ RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_token_with_invalid_username
354328
+ -----------------------------------------------------------------------------------------------------------
354329
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354330
+ Processing by RailsIdentity::UsersController#update as HTML
354331
+ Parameters: {"issue_verification_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
354332
+ Accepts a token
354333
+ Token decode error: Nil JSON web token
354334
+ Suppressing error: Invalid token:
354335
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "doesnotexist@example.com"]]
354336
+ 404 - Repia::Errors::NotFound
354337
+ Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
354338
+  (0.1ms) rollback transaction
354339
+  (0.0ms) begin transaction
354340
+ ------------------------------------------------------------------------------------------------------
354341
+ RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_with_invalid_username
354342
+ ------------------------------------------------------------------------------------------------------
354343
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354344
+ Processing by RailsIdentity::UsersController#update as HTML
354345
+ Parameters: {"issue_reset_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
354346
+ Accepts a token
354347
+ Token decode error: Nil JSON web token
354348
+ Suppressing error: Invalid token:
354349
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "doesnotexist@example.com"]]
354350
+ 404 - Repia::Errors::NotFound
354351
+ Completed 404 Not Found in 1ms (Views: 0.1ms | ActiveRecord: 0.0ms)
354352
+  (0.1ms) rollback transaction
354353
+  (0.0ms) begin transaction
354354
+ ------------------------------------------------------------------------------
354355
+ RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_username
354356
+ ------------------------------------------------------------------------------
354357
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354358
+ Processing by RailsIdentity::UsersController#create as HTML
354359
+ Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
354360
+ Accepts a token
354361
+ Token decode error: Nil JSON web token
354362
+ Suppressing error: Invalid token:
354363
+ Create new user
354364
+  (0.1ms) SAVEPOINT active_record_1
354365
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" IS NULL AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
354366
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
354367
+ Completed 400 Bad Request in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
354368
+  (0.0ms) rollback transaction
354369
+  (0.0ms) begin transaction
354370
+ ----------------------------------------------------------------------------------------
354371
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_bogus_payload
354372
+ ----------------------------------------------------------------------------------------
354373
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354374
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354375
+ Processing by RailsIdentity::UsersController#show as HTML
354376
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE5MCwiZXhwIjoxNDYxMzg4MjUwfQ.Xpv46cfoncoJUhNsiIKiukoNKo3Flu9sQhFO5dreFy8", "id"=>"1"}
354377
+ Requires a token
354378
+ Token well formatted for user 1,
354379
+ session doesnotexist
354380
+ Cache miss. Try database.
354381
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354382
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "doesnotexist"]]
354383
+ 401 - Well-formed but invalid session token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE5MCwiZXhwIjoxNDYxMzg4MjUwfQ.Xpv46cfoncoJUhNsiIKiukoNKo3Flu9sQhFO5dreFy8
354384
+ Completed 401 Unauthorized in 2ms (Views: 0.1ms | ActiveRecord: 0.1ms)
354385
+  (0.1ms) rollback transaction
354386
+  (0.0ms) begin transaction
354387
+ ---------------------------------------------------------------
354388
+ RailsIdentity::UsersControllerTest: test_public_can_see_options
354389
+ ---------------------------------------------------------------
354390
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354391
+ Processing by RailsIdentity::UsersController#options as HTML
354392
+ Rendered text template (0.0ms)
354393
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
354394
+  (0.1ms) rollback transaction
354395
+  (0.0ms) begin transaction
354396
+ ------------------------------------------------------------------------------
354397
+ RailsIdentity::UsersControllerTest: test_update_(reissue)_a_verification_token
354398
+ ------------------------------------------------------------------------------
354399
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354400
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354401
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = '1' LIMIT 1
354402
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354403
+ Processing by RailsIdentity::UsersController#update as HTML
354404
+ Parameters: {"issue_verification_token"=>true, "username"=>"one@example.com", "id"=>"current"}
354405
+ Accepts a token
354406
+ Token decode error: Nil JSON web token
354407
+ Suppressing error: Invalid token:
354408
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
354409
+  (0.0ms) SAVEPOINT active_record_1
354410
+ SQL (0.3ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "9afa890c-0911-11e6-8c04-6c4008a6fa2a"], ["secret", "7891fe17-fa88-4553-bef7-c4c305efd187"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWFmYTg5MGMtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE5MCwiZXhwIjoxNDYxMzkxNzkwfQ.jH3rOaLL0HEqdbEr1pLQtqs_tE22Jp5XsstmkWpWHV4"], ["created_at", "2016-04-23 05:09:50.059073"], ["updated_at", "2016-04-23 05:09:50.059073"]]
354411
+  (0.1ms) RELEASE SAVEPOINT active_record_1
354412
+  (0.0ms) SAVEPOINT active_record_1
354413
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
354414
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWFmYTg5MGMtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE5MCwiZXhwIjoxNDYxMzkxNzkwfQ.jH3rOaLL0HEqdbEr1pLQtqs_tE22Jp5XsstmkWpWHV4"], ["updated_at", "2016-04-23 05:09:50.061916"], ["uuid", "1"]]
354415
+  (0.0ms) RELEASE SAVEPOINT active_record_1
354416
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354417
+ [ActiveJob] [ActionMailer::DeliveryJob] [f0949d8f-e959-4c8c-9e35-e342bd3f2cd6] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
354418
+ [ActiveJob] [ActionMailer::DeliveryJob] [f0949d8f-e959-4c8c-9e35-e342bd3f2cd6] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
354419
+ [ActiveJob] [ActionMailer::DeliveryJob] [f0949d8f-e959-4c8c-9e35-e342bd3f2cd6] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
354420
+ [ActiveJob] [ActionMailer::DeliveryJob] [f0949d8f-e959-4c8c-9e35-e342bd3f2cd6]
354421
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.5ms
354422
+ [ActiveJob] [ActionMailer::DeliveryJob] [f0949d8f-e959-4c8c-9e35-e342bd3f2cd6]
354423
+ Sent mail to one@example.com (3.7ms)
354424
+ [ActiveJob] [ActionMailer::DeliveryJob] [f0949d8f-e959-4c8c-9e35-e342bd3f2cd6] Date: Sat, 23 Apr 2016 00:09:50 -0500
354425
+ From: no-reply@rails-identity.com
354426
+ To: one@example.com
354427
+ Message-ID: <571b039e10d37_85b83ff45185246c9039f@galt.local.mail>
354428
+ Subject: [rails-identity] Email Confirmation
354429
+ Mime-Version: 1.0
354430
+ Content-Type: multipart/alternative;
354431
+ boundary="--==_mimepart_571b039e103e0_85b83ff45185246c9027a";
354432
+ charset=UTF-8
354433
+ Content-Transfer-Encoding: 7bit
354434
+
354435
+
354436
+ ----==_mimepart_571b039e103e0_85b83ff45185246c9027a
354437
+ Content-Type: text/plain;
354438
+ charset=UTF-8
354439
+ Content-Transfer-Encoding: 7bit
354440
+
354441
+ Dear one@example.com,
354442
+
354443
+ Please confirm your account with rails-identity by making a PATCH request
354444
+ on the current user with a provided verification token. For example,
354445
+
354446
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWFmYTg5MGMtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE5MCwiZXhwIjoxNDYxMzkxNzkwfQ.jH3rOaLL0HEqdbEr1pLQtqs_tE22Jp5XsstmkWpWHV4 verified=true
354447
+
354448
+ will confirm the account. Here is the verification token:
354449
+
354450
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWFmYTg5MGMtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE5MCwiZXhwIjoxNDYxMzkxNzkwfQ.jH3rOaLL0HEqdbEr1pLQtqs_tE22Jp5XsstmkWpWHV4
354451
+
354452
+ Thank you for using rails-identity,
354453
+ rails-identity
354454
+
354455
+
354456
+ ----==_mimepart_571b039e103e0_85b83ff45185246c9027a
354457
+ Content-Type: text/html;
354458
+ charset=UTF-8
354459
+ Content-Transfer-Encoding: 7bit
354460
+
354461
+ <html>
354462
+ <body>
354463
+ <p>Dear one@example.com,</p>
354464
+
354465
+ <p>Please confirm your account with rails-identity by making a PATCH request
354466
+ on the current user with a provided verification token. For example,
354467
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWFmYTg5MGMtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE5MCwiZXhwIjoxNDYxMzkxNzkwfQ.jH3rOaLL0HEqdbEr1pLQtqs_tE22Jp5XsstmkWpWHV4
354468
+ verified=true</pre> will confirm the account. Here is the verification
354469
+ token:</p>
354470
+
354471
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWFmYTg5MGMtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE5MCwiZXhwIjoxNDYxMzkxNzkwfQ.jH3rOaLL0HEqdbEr1pLQtqs_tE22Jp5XsstmkWpWHV4</pre>
354472
+
354473
+ <p>Thank you for using rails-identity</p>
354474
+ <p><b>rails-identity</b></p>
354475
+
354476
+ </body>
354477
+ </html>
354478
+
354479
+ ----==_mimepart_571b039e103e0_85b83ff45185246c9027a--
354480
+
354481
+ [ActiveJob] [ActionMailer::DeliveryJob] [f0949d8f-e959-4c8c-9e35-e342bd3f2cd6] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.64ms
354482
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: f0949d8f-e959-4c8c-9e35-e342bd3f2cd6) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
354483
+ Rendered text template (0.0ms)
354484
+ Completed 204 No Content in 15ms (Views: 0.3ms | ActiveRecord: 0.7ms)
354485
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = '1' LIMIT 1
354486
+ Processing by RailsIdentity::UsersController#update as HTML
354487
+ Parameters: {"verified"=>true, "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWFmYTg5MGMtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE5MCwiZXhwIjoxNDYxMzkxNzkwfQ.jH3rOaLL0HEqdbEr1pLQtqs_tE22Jp5XsstmkWpWHV4", "id"=>"current"}
354488
+ Accepts a token
354489
+ Token well formatted for user 1,
354490
+ session 9afa890c-0911-11e6-8c04-6c4008a6fa2a
354491
+ Cache miss. Try database.
354492
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354493
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "9afa890c-0911-11e6-8c04-6c4008a6fa2a"]]
354494
+ Token well formatted and verified. Set cache.
354495
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354496
+ Attempting to get RailsIdentity::User 1
354497
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354498
+ Checking to see if authorized to access object
354499
+ Unpermitted parameters: token, id
354500
+  (0.0ms) SAVEPOINT active_record_1
354501
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
354502
+  (0.0ms) RELEASE SAVEPOINT active_record_1
354503
+ Completed 200 OK in 6ms (Views: 0.4ms | ActiveRecord: 1.0ms)
354504
+  (0.4ms) rollback transaction
354505
+  (0.1ms) begin transaction
354506
+ ---------------------------------------------------------------------------------------------
354507
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_non-existing_token
354508
+ ---------------------------------------------------------------------------------------------
354509
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354510
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354511
+ Processing by RailsIdentity::UsersController#show as HTML
354512
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjEzODgxOTAsImV4cCI6MTQ2MTM4ODI1MH0.hzlkOHqJhg5W_eKug2ybfs6DWUTK7x6aHVq1lUhxD1A", "id"=>"1"}
354513
+ Requires a token
354514
+ Token well formatted for user 1,
354515
+ session 1
354516
+ Cache miss. Try database.
354517
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354518
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354519
+ Signature verification raised
354520
+ 401 - Cannot verify token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjEzODgxOTAsImV4cCI6MTQ2MTM4ODI1MH0.hzlkOHqJhg5W_eKug2ybfs6DWUTK7x6aHVq1lUhxD1A
354521
+ Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
354522
+  (0.1ms) rollback transaction
354523
+  (0.0ms) begin transaction
354524
+ ------------------------------------------------------
354525
+ RailsIdentity::UsersControllerTest: test_update_a_user
354526
+ ------------------------------------------------------
354527
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354528
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354529
+ Processing by RailsIdentity::UsersController#update as HTML
354530
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"1"}
354531
+ Accepts a token
354532
+ Token well formatted for user 1,
354533
+ session 1
354534
+ Cache miss. Try database.
354535
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354536
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354537
+ Token well formatted and verified. Set cache.
354538
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354539
+ Attempting to get RailsIdentity::User 1
354540
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354541
+ Checking to see if authorized to access object
354542
+ Unpermitted parameters: token, id
354543
+  (0.0ms) SAVEPOINT active_record_1
354544
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
354545
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-23 05:09:50.096102"], ["uuid", "1"]]
354546
+  (0.0ms) RELEASE SAVEPOINT active_record_1
354547
+ Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 0.4ms)
354548
+  (0.4ms) rollback transaction
354549
+  (0.0ms) begin transaction
354550
+ ------------------------------------------------------------------------------------
354551
+ RailsIdentity::UsersControllerTest: test_cannot_update_password_with_non-reset_token
354552
+ ------------------------------------------------------------------------------------
354553
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354554
+ Processing by RailsIdentity::UsersController#update as HTML
354555
+ Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"1"}
354556
+ Accepts a token
354557
+ Token well formatted for user 1,
354558
+ session 1
354559
+ Cache miss. Try database.
354560
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354561
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354562
+ Token well formatted and verified. Set cache.
354563
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354564
+ Attempting to get RailsIdentity::User 1
354565
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354566
+ Checking to see if authorized to access object
354567
+ 401 - Repia::Errors::Unauthorized
354568
+ Completed 401 Unauthorized in 7ms (Views: 0.3ms | ActiveRecord: 0.2ms)
354569
+  (0.1ms) rollback transaction
354570
+  (0.1ms) begin transaction
354571
+ ------------------------------------------------------------
354572
+ RailsIdentity::UsersControllerTest: test_delete_current_user
354573
+ ------------------------------------------------------------
354574
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354575
+ Processing by RailsIdentity::UsersController#destroy as HTML
354576
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"current"}
354577
+ Requires a token
354578
+ Token well formatted for user 1,
354579
+ session 1
354580
+ Cache miss. Try database.
354581
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354582
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354583
+ Token well formatted and verified. Set cache.
354584
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354585
+ Attempting to get RailsIdentity::User 1
354586
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354587
+ Checking to see if authorized to access object
354588
+  (0.0ms) SAVEPOINT active_record_1
354589
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "deleted_at" = '2016-04-23 05:09:50.119297' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
354590
+  (0.0ms) RELEASE SAVEPOINT active_record_1
354591
+ Rendered text template (0.0ms)
354592
+ Completed 204 No Content in 6ms (Views: 0.3ms | ActiveRecord: 0.4ms)
354593
+  (0.4ms) rollback transaction
354594
+  (0.0ms) begin transaction
354595
+ -------------------------------------------------------------------------
354596
+ RailsIdentity::UsersControllerTest: test_update_(issue)_a_new_reset_token
354597
+ -------------------------------------------------------------------------
354598
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354599
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354600
+ Processing by RailsIdentity::UsersController#update as HTML
354601
+ Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
354602
+ Accepts a token
354603
+ Token decode error: Nil JSON web token
354604
+ Suppressing error: Invalid token:
354605
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
354606
+  (0.1ms) SAVEPOINT active_record_1
354607
+ SQL (0.3ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "9b05216e-0911-11e6-8c04-6c4008a6fa2a"], ["secret", "0a9c89aa-66a4-4a5b-ace8-84f15a13237a"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWIwNTIxNmUtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE5MCwiZXhwIjoxNDYxMzkxNzkwfQ.lxLgweceW4ONYLonbVDyrYTAyIKg8xm_ITAbto2p_HU"], ["created_at", "2016-04-23 05:09:50.129218"], ["updated_at", "2016-04-23 05:09:50.129218"]]
354608
+  (0.1ms) RELEASE SAVEPOINT active_record_1
354609
+  (0.1ms) SAVEPOINT active_record_1
354610
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
354611
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWIwNTIxNmUtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE5MCwiZXhwIjoxNDYxMzkxNzkwfQ.lxLgweceW4ONYLonbVDyrYTAyIKg8xm_ITAbto2p_HU"], ["updated_at", "2016-04-23 05:09:50.132699"], ["uuid", "1"]]
354612
+  (0.0ms) RELEASE SAVEPOINT active_record_1
354613
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354614
+ [ActiveJob] [ActionMailer::DeliveryJob] [b3c9d03f-9392-48d5-86f9-dc3a3739bf32] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
354615
+ [ActiveJob] [ActionMailer::DeliveryJob] [b3c9d03f-9392-48d5-86f9-dc3a3739bf32] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (0.1ms)
354616
+ [ActiveJob] [ActionMailer::DeliveryJob] [b3c9d03f-9392-48d5-86f9-dc3a3739bf32] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (0.1ms)
354617
+ [ActiveJob] [ActionMailer::DeliveryJob] [b3c9d03f-9392-48d5-86f9-dc3a3739bf32]
354618
+ RailsIdentity::UserMailer#password_reset: processed outbound mail in 3.0ms
354619
+ [ActiveJob] [ActionMailer::DeliveryJob] [b3c9d03f-9392-48d5-86f9-dc3a3739bf32]
354620
+ Sent mail to one@example.com (3.8ms)
354621
+ [ActiveJob] [ActionMailer::DeliveryJob] [b3c9d03f-9392-48d5-86f9-dc3a3739bf32] Date: Sat, 23 Apr 2016 00:09:50 -0500
354622
+ From: no-reply@rails-identity.com
354623
+ To: one@example.com
354624
+ Message-ID: <571b039e22901_85b83ff45185246c9058d@galt.local.mail>
354625
+ Subject: [rails-identity] Password Reset
354626
+ Mime-Version: 1.0
354627
+ Content-Type: multipart/alternative;
354628
+ boundary="--==_mimepart_571b039e21e01_85b83ff45185246c90481";
354629
+ charset=UTF-8
354630
+ Content-Transfer-Encoding: 7bit
354631
+
354632
+
354633
+ ----==_mimepart_571b039e21e01_85b83ff45185246c90481
354634
+ Content-Type: text/plain;
354635
+ charset=UTF-8
354636
+ Content-Transfer-Encoding: 7bit
354637
+
354638
+ Dear one@example.com,
354639
+
354640
+ You have requested to reset your password. Here are the user UUID and reset
354641
+ token. Make a PATCH request on the UUID with the reset token to set a new
354642
+ password. For instance,
354643
+
354644
+ http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
354645
+
354646
+ will set the password to "reallysecret" (without quotes) for the user to
354647
+ whom the reset token was issued.
354648
+
354649
+ Here is the reset token: @user.reset_token
354650
+
354651
+ Good luck! :)
354652
+ rails-identity
354653
+
354654
+
354655
+ ----==_mimepart_571b039e21e01_85b83ff45185246c90481
354656
+ Content-Type: text/html;
354657
+ charset=UTF-8
354658
+ Content-Transfer-Encoding: 7bit
354659
+
354660
+ <html>
354661
+ <body>
354662
+ <p>Dear one@example.com,</p>
354663
+
354664
+ <p>You have requested to reset your password. Here are the user UUID and
354665
+ reset token. Make a PATCH request on the UUID with the reset token to set a
354666
+ new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWIwNTIxNmUtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE5MCwiZXhwIjoxNDYxMzkxNzkwfQ.lxLgweceW4ONYLonbVDyrYTAyIKg8xm_ITAbto2p_HU password=reallysecret
354667
+ password_confirmation=reallysecret</pre> will set the password to
354668
+ <pre>reallysecret</pre> for the user to whom the reset token was issued.
354669
+ Here is the reset token:</p>
354670
+
354671
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWIwNTIxNmUtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE5MCwiZXhwIjoxNDYxMzkxNzkwfQ.lxLgweceW4ONYLonbVDyrYTAyIKg8xm_ITAbto2p_HU</pre>
354672
+
354673
+ <p>Good luck! :)</p>
354674
+ <p><b>rails-identity</b></p>
354675
+
354676
+ </body>
354677
+ </html>
354678
+
354679
+ ----==_mimepart_571b039e21e01_85b83ff45185246c90481--
354680
+
354681
+ [ActiveJob] [ActionMailer::DeliveryJob] [b3c9d03f-9392-48d5-86f9-dc3a3739bf32] Performed ActionMailer::DeliveryJob from Inline(mailers) in 7.35ms
354682
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: b3c9d03f-9392-48d5-86f9-dc3a3739bf32) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
354683
+ Rendered text template (0.0ms)
354684
+ Completed 204 No Content in 18ms (Views: 0.3ms | ActiveRecord: 0.8ms)
354685
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354686
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = '1' LIMIT 1
354687
+ Processing by RailsIdentity::UsersController#update as HTML
354688
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"1"}
354689
+ Accepts a token
354690
+ Token well formatted for user 1,
354691
+ session 1
354692
+ Cache miss. Try database.
354693
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354694
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354695
+ Token well formatted and verified. Set cache.
354696
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354697
+ Attempting to get RailsIdentity::User 1
354698
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354699
+ Checking to see if authorized to access object
354700
+ Unpermitted parameters: token, id
354701
+  (0.0ms) SAVEPOINT active_record_1
354702
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
354703
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-23 05:09:50.151780"], ["uuid", "1"]]
354704
+  (0.0ms) RELEASE SAVEPOINT active_record_1
354705
+ Completed 200 OK in 7ms (Views: 0.4ms | ActiveRecord: 1.4ms)
354706
+  (0.6ms) rollback transaction
354707
+  (0.0ms) begin transaction
354708
+ -----------------------------------------------------------------------
354709
+ RailsIdentity::UsersControllerTest: test_cannot_show_a_nonexisting_user
354710
+ -----------------------------------------------------------------------
354711
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354712
+ Processing by RailsIdentity::UsersController#show as HTML
354713
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"999"}
354714
+ Requires a token
354715
+ Token well formatted for user 1,
354716
+ session 1
354717
+ Cache miss. Try database.
354718
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354719
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354720
+ Token well formatted and verified. Set cache.
354721
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354722
+ Attempting to get RailsIdentity::User 999
354723
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "999"]]
354724
+ 404 - RailsIdentity::User 999 cannot be found
354725
+ Completed 404 Not Found in 4ms (Views: 0.1ms | ActiveRecord: 0.2ms)
354726
+  (0.1ms) rollback transaction
354727
+  (0.0ms) begin transaction
354728
+ --------------------------------------------------------------------
354729
+ RailsIdentity::UsersControllerTest: test_non-admin_cannot_list_users
354730
+ --------------------------------------------------------------------
354731
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354732
+ Processing by RailsIdentity::UsersController#index as HTML
354733
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o"}
354734
+ Requires an admin token
354735
+ Token well formatted for user 1,
354736
+ session 1
354737
+ Cache miss. Try database.
354738
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354739
+ 401 - Well-formed but invalid user token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o
354740
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
354741
+  (0.1ms) rollback transaction
354742
+  (0.0ms) begin transaction
354743
+ ------------------------------------------------------------------------------------
354744
+ RailsIdentity::UsersControllerTest: test_cannot_update_password_with_a_invalid_token
354745
+ ------------------------------------------------------------------------------------
354746
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354747
+ Processing by RailsIdentity::UsersController#update as HTML
354748
+ Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0Mzg1ODh9.xuP7Utg04m8v3Xdj9sW_V-v2U-mYnObFJ8qf0A4JA_o", "id"=>"1"}
354749
+ Accepts a token
354750
+ Token well formatted for user 1,
354751
+ session 1
354752
+ Cache miss. Try database.
354753
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354754
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354755
+ Token well formatted and verified. Set cache.
354756
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354757
+ Attempting to get RailsIdentity::User 1
354758
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354759
+ Checking to see if authorized to access object
354760
+ 401 - Repia::Errors::Unauthorized
354761
+ Completed 401 Unauthorized in 78ms (Views: 0.3ms | ActiveRecord: 0.3ms)
354762
+  (0.1ms) rollback transaction
354763
+  (0.0ms) begin transaction
354764
+ --------------------------------------------------------------------------
354765
+ RailsIdentity::SessionTest: test_session_has_token_and_secret_when_created
354766
+ --------------------------------------------------------------------------
354767
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354768
+  (0.0ms) rollback transaction
354769
+  (0.0ms) begin transaction
354770
+ -----------------------------------------------
354771
+ RailsIdentity::SessionTest: test_save_a_session
354772
+ -----------------------------------------------
354773
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354774
+  (0.0ms) SAVEPOINT active_record_1
354775
+ SQL (0.3ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "9b186396-0911-11e6-8c04-6c4008a6fa2a"], ["secret", "7b9c704d-45b8-4f31-8f1b-205d5b1cefc6"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiOWIxODYzOTYtMDkxMS0xMWU2LThjMDQtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODE5MCwiZXhwIjoxNDYyNTk3NzkwfQ.T5UZoOQvnPShK4raCfhA-RQUmbChaRv2S2sHmOHzc6s"], ["created_at", "2016-04-23 05:09:50.254724"], ["updated_at", "2016-04-23 05:09:50.254724"]]
354776
+  (0.0ms) RELEASE SAVEPOINT active_record_1
354777
+  (0.4ms) rollback transaction
354778
+  (0.0ms) begin transaction
354779
+ ---------------------------------------------------------------------
354780
+ RailsIdentity::SessionTest: test_cannot_save_a_session_without_a_user
354781
+ ---------------------------------------------------------------------
354782
+  (0.0ms) rollback transaction
354783
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
354784
+  (0.1ms) begin transaction
354785
+ Fixture Delete (0.2ms) DELETE FROM "rails_identity_sessions"
354786
+ Fixture Insert (0.1ms) INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('1', '1', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ', 'secret', '2016-04-23 05:21:08', '2016-04-23 05:21:08')
354787
+ Fixture Insert (0.0ms) INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('2', '2', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIyIiwidXNlcl91dWlkIjoiMiIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.zltZmGs0RgQpxqh-MPCz2A5YBTRkTS9_5mw44QieUno', 'secret', '2016-04-23 05:21:08', '2016-04-23 05:21:08')
354788
+ Fixture Insert (0.0ms) INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('session_admin_one', 'admin_one', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM5MjY4fQ.MoyklN4m1nP5DPiKHi-KjRSIl7ygkAlFxDY6OoDjyRU', 'secret', '2016-04-23 05:21:08', '2016-04-23 05:21:08')
354789
+ Fixture Delete (0.1ms) DELETE FROM "rails_identity_users"
354790
+ Fixture Insert (0.1ms) INSERT INTO "rails_identity_users" ("uuid", "username", "password_digest", "role", "verified", "created_at", "updated_at") VALUES ('1', 'one@example.com', '$2a$10$2W1mpxMxeTAHSvSARJvoVOGdzeF9lRx1xeF9Zqc/bHalkNCvFCL6i', 10, 't', '2016-04-23 05:21:08', '2016-04-23 05:21:08')
354791
+ Fixture Insert (0.0ms) INSERT INTO "rails_identity_users" ("uuid", "username", "password_digest", "role", "verified", "created_at", "updated_at") VALUES ('2', 'two@example.com', '$2a$10$TLtrjnkoh/8ve39YTTXvJerfLnI.H.SMRPeaavqKilL6ycFfAjZOW', 10, 't', '2016-04-23 05:21:08', '2016-04-23 05:21:08')
354792
+ Fixture Insert (0.0ms) INSERT INTO "rails_identity_users" ("uuid", "username", "password_digest", "role", "verified", "created_at", "updated_at") VALUES ('admin_one', 'admin_one@example.com', '$2a$10$DXfbjLDznIvaUMkHQMk6weugfR72CTEtGc4gC4KSZSqadJVD8.XFe', 100, 't', '2016-04-23 05:21:08', '2016-04-23 05:21:08')
354793
+  (1.7ms) commit transaction
354794
+  (0.1ms) begin transaction
354795
+ --------------------------------------------------------------------------
354796
+ RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions
354797
+ --------------------------------------------------------------------------
354798
+ RailsIdentity::Session Load (0.2ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354799
+ Processing by RailsIdentity::SessionsController#index as HTML
354800
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ"}
354801
+ Requires a token
354802
+ Token well formatted for user 1,
354803
+ session 1
354804
+ Cache miss. Try database.
354805
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354806
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354807
+ Token well formatted and verified. Set cache.
354808
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354809
+ Attempting to get user
354810
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
354811
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [8f3a50f9-3fc1-4437-9d85-bb17a99a10b7] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
354812
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [8f3a50f9-3fc1-4437-9d85-bb17a99a10b7] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 2.15ms
354813
+ [ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: 8f3a50f9-3fc1-4437-9d85-bb17a99a10b7) to Inline(default)
354814
+ Completed 200 OK in 29ms (Views: 0.6ms | ActiveRecord: 0.4ms)
354815
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354816
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
354817
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354818
+  (0.0ms) rollback transaction
354819
+  (0.0ms) begin transaction
354820
+ -----------------------------------------------------------------------------------------
354821
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_a_wrong_password
354822
+ -----------------------------------------------------------------------------------------
354823
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354824
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354825
+ Processing by RailsIdentity::SessionsController#create as HTML
354826
+ Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
354827
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
354828
+ Attempting to get user
354829
+ Completed 401 Unauthorized in 65ms (Views: 0.3ms | ActiveRecord: 0.1ms)
354830
+  (0.1ms) rollback transaction
354831
+  (0.0ms) begin transaction
354832
+ -----------------------------------------------------------------------
354833
+ RailsIdentity::SessionsControllerTest: test_public_cannot_list_sessions
354834
+ -----------------------------------------------------------------------
354835
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354836
+ Processing by RailsIdentity::SessionsController#index as HTML
354837
+ Requires a token
354838
+ Token decode error: Nil JSON web token
354839
+ 401 - Invalid token:
354840
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
354841
+  (0.1ms) rollback transaction
354842
+  (0.0ms) begin transaction
354843
+ -----------------------------------------------------------------------------
354844
+ RailsIdentity::SessionsControllerTest: test_cannot_show_a_nonexisting_session
354845
+ -----------------------------------------------------------------------------
354846
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354847
+ Processing by RailsIdentity::SessionsController#show as HTML
354848
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"999"}
354849
+ Requires a token
354850
+ Token well formatted for user 1,
354851
+ session 1
354852
+ Cache miss. Try database.
354853
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354854
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354855
+ Token well formatted and verified. Set cache.
354856
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354857
+ Attempting to get RailsIdentity::Session 999
354858
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "999"]]
354859
+ 404 - RailsIdentity::Session 999 cannot be found
354860
+ Completed 404 Not Found in 4ms (Views: 0.2ms | ActiveRecord: 0.1ms)
354861
+  (0.1ms) rollback transaction
354862
+  (0.0ms) begin transaction
354863
+ ----------------------------------------------------------------------------------------------
354864
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_non-existent_username
354865
+ ----------------------------------------------------------------------------------------------
354866
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354867
+ Processing by RailsIdentity::SessionsController#create as HTML
354868
+ Parameters: {"username"=>"idontexist", "password"=>"[FILTERED]"}
354869
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "idontexist"]]
354870
+ Attempting to get user
354871
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
354872
+  (0.1ms) rollback transaction
354873
+  (0.0ms) begin transaction
354874
+ --------------------------------------------------------------------
354875
+ RailsIdentity::SessionsControllerTest: test_delete_a_current_session
354876
+ --------------------------------------------------------------------
354877
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354878
+ Processing by RailsIdentity::SessionsController#destroy as HTML
354879
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"current"}
354880
+ Requires a token
354881
+ Token well formatted for user 1,
354882
+ session 1
354883
+ Cache miss. Try database.
354884
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354885
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354886
+ Token well formatted and verified. Set cache.
354887
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354888
+ Attempting to get RailsIdentity::Session 1
354889
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354890
+ Checking to see if authorized to access object
354891
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354892
+  (0.1ms) SAVEPOINT active_record_1
354893
+ SQL (0.2ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
354894
+  (0.0ms) RELEASE SAVEPOINT active_record_1
354895
+ Rendered text template (0.0ms)
354896
+ Completed 204 No Content in 10ms (Views: 4.5ms | ActiveRecord: 0.5ms)
354897
+  (0.4ms) rollback transaction
354898
+  (0.1ms) begin transaction
354899
+ ----------------------------------------------------------------------
354900
+ RailsIdentity::SessionsControllerTest: test_public_cannot_show_session
354901
+ ----------------------------------------------------------------------
354902
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354903
+ Processing by RailsIdentity::SessionsController#show as HTML
354904
+ Parameters: {"id"=>"1"}
354905
+ Requires a token
354906
+ Token decode error: Nil JSON web token
354907
+ 401 - Invalid token:
354908
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
354909
+  (0.1ms) rollback transaction
354910
+  (0.0ms) begin transaction
354911
+ ------------------------------------------------------------------------------------
354912
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_username
354913
+ ------------------------------------------------------------------------------------
354914
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354915
+ Processing by RailsIdentity::SessionsController#create as HTML
354916
+ Parameters: {"password"=>"[FILTERED]"}
354917
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" IS NULL LIMIT 1
354918
+ Attempting to get user
354919
+ Completed 401 Unauthorized in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)
354920
+  (0.0ms) rollback transaction
354921
+  (0.0ms) begin transaction
354922
+ ---------------------------------------------------------------------------------------------------
354923
+ RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions_using_user_id_in_routing
354924
+ ---------------------------------------------------------------------------------------------------
354925
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354926
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354927
+ Processing by RailsIdentity::SessionsController#index as HTML
354928
+ Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ"}
354929
+ Requires a token
354930
+ Token well formatted for user 1,
354931
+ session 1
354932
+ Cache miss. Try database.
354933
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354934
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354935
+ Token well formatted and verified. Set cache.
354936
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354937
+ Attempting to get user 1
354938
+ Attempting to get RailsIdentity::User 1
354939
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354940
+ Checking to see if authorized to access object
354941
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
354942
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [ec220f00-5b95-4455-8ac4-9d0dfdbdca51] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
354943
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [ec220f00-5b95-4455-8ac4-9d0dfdbdca51] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 0.06ms
354944
+ [ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: ec220f00-5b95-4455-8ac4-9d0dfdbdca51) to Inline(default)
354945
+ Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms)
354946
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
354947
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354948
+  (0.0ms) rollback transaction
354949
+  (0.0ms) begin transaction
354950
+ ------------------------------------------------------------
354951
+ RailsIdentity::SessionsControllerTest: test_delete_a_session
354952
+ ------------------------------------------------------------
354953
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354954
+ Processing by RailsIdentity::SessionsController#destroy as HTML
354955
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"1"}
354956
+ Requires a token
354957
+ Token well formatted for user 1,
354958
+ session 1
354959
+ Cache miss. Try database.
354960
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354961
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354962
+ Token well formatted and verified. Set cache.
354963
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354964
+ Attempting to get RailsIdentity::Session 1
354965
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354966
+ Checking to see if authorized to access object
354967
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354968
+  (0.1ms) SAVEPOINT active_record_1
354969
+ SQL (0.2ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
354970
+  (0.0ms) RELEASE SAVEPOINT active_record_1
354971
+ Rendered text template (0.0ms)
354972
+ Completed 204 No Content in 7ms (Views: 0.5ms | ActiveRecord: 0.5ms)
354973
+  (0.3ms) rollback transaction
354974
+  (0.0ms) begin transaction
354975
+ ----------------------------------------------------------
354976
+ RailsIdentity::SessionsControllerTest: test_show_a_session
354977
+ ----------------------------------------------------------
354978
+ RailsIdentity::Session Load (0.2ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354979
+ Processing by RailsIdentity::SessionsController#show as HTML
354980
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"1"}
354981
+ Requires a token
354982
+ Token well formatted for user 1,
354983
+ session 1
354984
+ Cache miss. Try database.
354985
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354986
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354987
+ Token well formatted and verified. Set cache.
354988
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354989
+ Attempting to get RailsIdentity::Session 1
354990
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354991
+ Checking to see if authorized to access object
354992
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
354993
+ Completed 200 OK in 5ms (Views: 0.4ms | ActiveRecord: 0.2ms)
354994
+  (0.1ms) rollback transaction
354995
+  (0.0ms) begin transaction
354996
+ -------------------------------------------------------------------------
354997
+ RailsIdentity::SessionsControllerTest: test_public_cannot_create_sessions
354998
+ -------------------------------------------------------------------------
354999
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355000
+ Processing by RailsIdentity::SessionsController#index as HTML
355001
+ Requires a token
355002
+ Token decode error: Nil JSON web token
355003
+ 401 - Invalid token:
355004
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
355005
+  (0.1ms) rollback transaction
355006
+  (0.0ms) begin transaction
355007
+ -----------------------------------------------------------------------
355008
+ RailsIdentity::SessionsControllerTest: test_cannot_show_other's_session
355009
+ -----------------------------------------------------------------------
355010
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355011
+ Processing by RailsIdentity::SessionsController#show as HTML
355012
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"2"}
355013
+ Requires a token
355014
+ Token well formatted for user 1,
355015
+ session 1
355016
+ Cache miss. Try database.
355017
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355018
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355019
+ Token well formatted and verified. Set cache.
355020
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355021
+ Attempting to get RailsIdentity::Session 2
355022
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2"]]
355023
+ Checking to see if authorized to access object
355024
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
355025
+ 401 - Repia::Errors::Unauthorized
355026
+ Completed 401 Unauthorized in 5ms (Views: 0.1ms | ActiveRecord: 0.2ms)
355027
+  (0.1ms) rollback transaction
355028
+  (0.0ms) begin transaction
355029
+ ----------------------------------------------------------------------------
355030
+ RailsIdentity::SessionsControllerTest: test_admin_can_delete_other's_session
355031
+ ----------------------------------------------------------------------------
355032
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355033
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
355034
+ Processing by RailsIdentity::SessionsController#destroy as HTML
355035
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM5MjY4fQ.MoyklN4m1nP5DPiKHi-KjRSIl7ygkAlFxDY6OoDjyRU", "id"=>"1"}
355036
+ Requires a token
355037
+ Token well formatted for user admin_one,
355038
+ session session_admin_one
355039
+ Cache miss. Try database.
355040
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
355041
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
355042
+ Token well formatted and verified. Set cache.
355043
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
355044
+ Attempting to get RailsIdentity::Session 1
355045
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355046
+ Checking to see if authorized to access object
355047
+  (0.1ms) SAVEPOINT active_record_1
355048
+ SQL (0.1ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
355049
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355050
+ Rendered text template (0.1ms)
355051
+ Completed 204 No Content in 5ms (Views: 0.5ms | ActiveRecord: 0.4ms)
355052
+  (0.3ms) rollback transaction
355053
+  (0.1ms) begin transaction
355054
+ ------------------------------------------------------------------
355055
+ RailsIdentity::SessionsControllerTest: test_public_can_see_options
355056
+ ------------------------------------------------------------------
355057
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355058
+ Processing by RailsIdentity::SessionsController#options as HTML
355059
+ Rendered text template (0.0ms)
355060
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
355061
+  (0.1ms) rollback transaction
355062
+  (0.0ms) begin transaction
355063
+ -----------------------------------------------------------------------
355064
+ RailsIdentity::SessionsControllerTest: test_cannot_show_expired_session
355065
+ -----------------------------------------------------------------------
355066
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355067
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355068
+  (0.2ms) SAVEPOINT active_record_1
355069
+ SQL (0.3ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "2fa4ce90-0913-11e6-a596-6c4008a6fa2a"], ["secret", "ae4dd21e-b75a-4014-a952-343a2887df99"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMmZhNGNlOTAtMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg2OCwiZXhwIjoxNDYxMzg4ODY3fQ.d45gD1m-SILdJ9Ykx4t9ikZoFz0bM_d3Pvc9aGSCgbI"], ["created_at", "2016-04-23 05:21:08.986900"], ["updated_at", "2016-04-23 05:21:08.986900"]]
355070
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355071
+ Processing by RailsIdentity::SessionsController#show as HTML
355072
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"2fa4ce90-0913-11e6-a596-6c4008a6fa2a"}
355073
+ Requires a token
355074
+ Token well formatted for user 1,
355075
+ session 1
355076
+ Cache miss. Try database.
355077
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355078
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355079
+ Token well formatted and verified. Set cache.
355080
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355081
+ Attempting to get RailsIdentity::Session 2fa4ce90-0913-11e6-a596-6c4008a6fa2a
355082
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2fa4ce90-0913-11e6-a596-6c4008a6fa2a"]]
355083
+ Checking to see if authorized to access object
355084
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355085
+  (0.0ms) SAVEPOINT active_record_1
355086
+ SQL (0.2ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "2fa4ce90-0913-11e6-a596-6c4008a6fa2a"]]
355087
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355088
+ 404 - Repia::Errors::NotFound
355089
+ Completed 404 Not Found in 7ms (Views: 0.2ms | ActiveRecord: 0.5ms)
355090
+  (0.6ms) rollback transaction
355091
+  (0.0ms) begin transaction
355092
+ -----------------------------------------------------------------------------------
355093
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_if_not_verified
355094
+ -----------------------------------------------------------------------------------
355095
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355096
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355097
+  (0.0ms) SAVEPOINT active_record_1
355098
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
355099
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "verified" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verified", "f"], ["updated_at", "2016-04-23 05:21:09.007093"], ["uuid", "1"]]
355100
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355101
+ Processing by RailsIdentity::SessionsController#create as HTML
355102
+ Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
355103
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
355104
+ 401 - Repia::Errors::Unauthorized
355105
+ Completed 401 Unauthorized in 67ms (Views: 0.4ms | ActiveRecord: 0.1ms)
355106
+  (0.5ms) rollback transaction
355107
+  (0.0ms) begin transaction
355108
+ --------------------------------------------------------------------------------------
355109
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_a_password
355110
+ --------------------------------------------------------------------------------------
355111
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355112
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355113
+ Processing by RailsIdentity::SessionsController#create as HTML
355114
+ Parameters: {"username"=>"one@example.com"}
355115
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
355116
+ Attempting to get user
355117
+ Completed 401 Unauthorized in 64ms (Views: 0.3ms | ActiveRecord: 0.1ms)
355118
+  (0.1ms) rollback transaction
355119
+  (0.0ms) begin transaction
355120
+ ------------------------------------------------------------
355121
+ RailsIdentity::SessionsControllerTest: test_create_a_session
355122
+ ------------------------------------------------------------
355123
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355124
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355125
+ Processing by RailsIdentity::SessionsController#create as HTML
355126
+ Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
355127
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
355128
+  (0.1ms) SAVEPOINT active_record_1
355129
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "2fcac5b4-0913-11e6-a596-6c4008a6fa2a"], ["secret", "df4401e8-e097-4b6e-aaf6-f0008743e5ab"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMmZjYWM1YjQtMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYyNTk4NDY5fQ.YBLFNrbByo3C0Sef1wyLk0T_ghnq68Vh8uewhhALO6M"], ["created_at", "2016-04-23 05:21:09.223699"], ["updated_at", "2016-04-23 05:21:09.223699"]]
355130
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355131
+ Completed 201 Created in 73ms (Views: 0.4ms | ActiveRecord: 0.4ms)
355132
+  (1.0ms) rollback transaction
355133
+  (0.1ms) begin transaction
355134
+ --------------------------------------------------------------------------
355135
+ RailsIdentity::SessionsControllerTest: test_admin_can_show_other's_session
355136
+ --------------------------------------------------------------------------
355137
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355138
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
355139
+ Processing by RailsIdentity::SessionsController#show as HTML
355140
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM5MjY4fQ.MoyklN4m1nP5DPiKHi-KjRSIl7ygkAlFxDY6OoDjyRU", "id"=>"1"}
355141
+ Requires a token
355142
+ Token well formatted for user admin_one,
355143
+ session session_admin_one
355144
+ Cache miss. Try database.
355145
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
355146
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
355147
+ Token well formatted and verified. Set cache.
355148
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
355149
+ Attempting to get RailsIdentity::Session 1
355150
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355151
+ Checking to see if authorized to access object
355152
+ Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms)
355153
+  (0.1ms) rollback transaction
355154
+  (0.0ms) begin transaction
355155
+ ----------------------------------------------------------------------------
355156
+ RailsIdentity::SessionsControllerTest: test_user_cannot_list_expired_session
355157
+ ----------------------------------------------------------------------------
355158
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355159
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355160
+  (0.0ms) SAVEPOINT active_record_1
355161
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "2fcd7d36-0913-11e6-a596-6c4008a6fa2a"], ["secret", "f961eea6-1443-42e4-a0ef-fbd3dce0252c"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMmZjZDdkMzYtMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzg4ODY4fQ.0Hd0J06xbfxvXKJcU1QgIkPsNnInOXokj5X0EoBGXt0"], ["created_at", "2016-04-23 05:21:09.241089"], ["updated_at", "2016-04-23 05:21:09.241089"]]
355162
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355163
+ Processing by RailsIdentity::SessionsController#index as HTML
355164
+ Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ"}
355165
+ Requires a token
355166
+ Token well formatted for user 1,
355167
+ session 1
355168
+ Cache miss. Try database.
355169
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355170
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355171
+ Token well formatted and verified. Set cache.
355172
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355173
+ Attempting to get user 1
355174
+ Attempting to get RailsIdentity::User 1
355175
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355176
+ Checking to see if authorized to access object
355177
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
355178
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [c1bf5306-36d4-4930-b40e-35b063f03f3d] Performing RailsIdentity::SessionsCleanupJob from Inline(default) with arguments: "2fcd7d36-0913-11e6-a596-6c4008a6fa2a"
355179
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [c1bf5306-36d4-4930-b40e-35b063f03f3d] RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2fcd7d36-0913-11e6-a596-6c4008a6fa2a"]]
355180
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [c1bf5306-36d4-4930-b40e-35b063f03f3d]  (0.1ms) SAVEPOINT active_record_1
355181
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [c1bf5306-36d4-4930-b40e-35b063f03f3d] SQL (0.2ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "2fcd7d36-0913-11e6-a596-6c4008a6fa2a"]]
355182
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [c1bf5306-36d4-4930-b40e-35b063f03f3d]  (0.0ms) RELEASE SAVEPOINT active_record_1
355183
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [c1bf5306-36d4-4930-b40e-35b063f03f3d] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 1.29ms
355184
+ [ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: c1bf5306-36d4-4930-b40e-35b063f03f3d) to Inline(default) with arguments: "2fcd7d36-0913-11e6-a596-6c4008a6fa2a"
355185
+ Completed 200 OK in 9ms (Views: 0.5ms | ActiveRecord: 0.6ms)
355186
+  (0.5ms) rollback transaction
355187
+  (0.1ms) begin transaction
355188
+ -----------------------------------------------------------------------------
355189
+ RailsIdentity::SessionsControllerTest: test_user_cannot_list_other's_sessions
355190
+ -----------------------------------------------------------------------------
355191
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355192
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
355193
+ Processing by RailsIdentity::SessionsController#index as HTML
355194
+ Parameters: {"user_id"=>"2", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ"}
355195
+ Requires a token
355196
+ Token well formatted for user 1,
355197
+ session 1
355198
+ Cache miss. Try database.
355199
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355200
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355201
+ Token well formatted and verified. Set cache.
355202
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355203
+ Attempting to get user 2
355204
+ Attempting to get RailsIdentity::User 2
355205
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
355206
+ Checking to see if authorized to access object
355207
+ 401 - Not authorized to access user 2
355208
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
355209
+  (0.1ms) rollback transaction
355210
+  (0.0ms) begin transaction
355211
+ -------------------------------------------------------------------------
355212
+ RailsIdentity::SessionsControllerTest: test_cannot_delete_other's_session
355213
+ -------------------------------------------------------------------------
355214
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355215
+ Processing by RailsIdentity::SessionsController#destroy as HTML
355216
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"2"}
355217
+ Requires a token
355218
+ Token well formatted for user 1,
355219
+ session 1
355220
+ Cache miss. Try database.
355221
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355222
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355223
+ Token well formatted and verified. Set cache.
355224
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355225
+ Attempting to get RailsIdentity::Session 2
355226
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2"]]
355227
+ Checking to see if authorized to access object
355228
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
355229
+ 401 - Repia::Errors::Unauthorized
355230
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
355231
+  (0.1ms) rollback transaction
355232
+  (0.0ms) begin transaction
355233
+ --------------------------------------------------------------------------------
355234
+ RailsIdentity::SessionsControllerTest: test_cannot_delete_a_non-existent_session
355235
+ --------------------------------------------------------------------------------
355236
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355237
+ Processing by RailsIdentity::SessionsController#destroy as HTML
355238
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"999"}
355239
+ Requires a token
355240
+ Token well formatted for user 1,
355241
+ session 1
355242
+ Cache miss. Try database.
355243
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355244
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355245
+ Token well formatted and verified. Set cache.
355246
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355247
+ Attempting to get RailsIdentity::Session 999
355248
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "999"]]
355249
+ 404 - RailsIdentity::Session 999 cannot be found
355250
+ Completed 404 Not Found in 3ms (Views: 0.2ms | ActiveRecord: 0.2ms)
355251
+  (0.1ms) rollback transaction
355252
+  (0.0ms) begin transaction
355253
+ ------------------------------------------------------------------
355254
+ RailsIdentity::SessionsControllerTest: test_show_a_current_session
355255
+ ------------------------------------------------------------------
355256
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355257
+ Processing by RailsIdentity::SessionsController#show as HTML
355258
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"current"}
355259
+ Requires a token
355260
+ Token well formatted for user 1,
355261
+ session 1
355262
+ Cache miss. Try database.
355263
+ RailsIdentity::User Load (0.2ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355264
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355265
+ Token well formatted and verified. Set cache.
355266
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355267
+ Attempting to get RailsIdentity::Session 1
355268
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355269
+ Checking to see if authorized to access object
355270
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355271
+ Completed 200 OK in 9ms (Views: 0.6ms | ActiveRecord: 0.5ms)
355272
+  (0.1ms) rollback transaction
355273
+  (0.0ms) begin transaction
355274
+ ---------------------------------------------------------------------
355275
+ RailsIdentity::SessionTest: test_cannot_save_a_session_without_a_user
355276
+ ---------------------------------------------------------------------
355277
+  (0.0ms) rollback transaction
355278
+  (0.0ms) begin transaction
355279
+ -----------------------------------------------
355280
+ RailsIdentity::SessionTest: test_save_a_session
355281
+ -----------------------------------------------
355282
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355283
+  (0.0ms) SAVEPOINT active_record_1
355284
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "2fd5ee8a-0913-11e6-a596-6c4008a6fa2a"], ["secret", "5d4e8988-6522-461a-9a7a-dade01bafd4e"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMmZkNWVlOGEtMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYyNTk4NDY5fQ.14le5wbGMiZPufhvpzOIA8dRosLN1Caq9r31zkBzXDo"], ["created_at", "2016-04-23 05:21:09.296391"], ["updated_at", "2016-04-23 05:21:09.296391"]]
355285
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355286
+  (0.3ms) rollback transaction
355287
+  (0.1ms) begin transaction
355288
+ --------------------------------------------------------------------------
355289
+ RailsIdentity::SessionTest: test_session_has_token_and_secret_when_created
355290
+ --------------------------------------------------------------------------
355291
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355292
+  (0.1ms) rollback transaction
355293
+  (0.0ms) begin transaction
355294
+ ----------------------------------------------------------
355295
+ RailsIdentity::UserTest: test_user_can_issue_a_reset_token
355296
+ ----------------------------------------------------------
355297
+  (0.0ms) SAVEPOINT active_record_1
355298
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
355299
+ SQL (0.2ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$EkhPeSaHwi8obTWq21ULDOqsDT0bmdotPFBWay9jNOqyVE3kcmgdi"], ["role", 10], ["created_at", "2016-04-23 05:21:09.303921"], ["updated_at", "2016-04-23 05:21:09.303921"], ["uuid", "2fd7368c-0913-11e6-a596-6c4008a6fa2a"]]
355300
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355301
+  (0.1ms) SAVEPOINT active_record_1
355302
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "2fd7368c-0913-11e6-a596-6c4008a6fa2a"], ["uuid", "2fd765d0-0913-11e6-a596-6c4008a6fa2a"], ["secret", "d49c2e5f-720c-4c94-9a08-90333090aad6"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyZmQ3MzY4Yy0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyZmQ3NjVkMC0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4ODY5LCJleHAiOjE0NjEzOTI0Njl9.kPEWgoexUw7MHnmk0ghvIxfQIy1uTvlIzpGi75TOkIM"], ["created_at", "2016-04-23 05:21:09.305975"], ["updated_at", "2016-04-23 05:21:09.305975"]]
355303
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355304
+  (0.4ms) rollback transaction
355305
+  (0.1ms) begin transaction
355306
+ ---------------------------------------------------------------
355307
+ RailsIdentity::UserTest: test_user_has_a_role_of_100_by_default
355308
+ ---------------------------------------------------------------
355309
+  (0.0ms) SAVEPOINT active_record_1
355310
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'new@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
355311
+ SQL (0.1ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "new@example.com"], ["password_digest", "$2a$04$I2qf/ICrJtwabZGi9mKuXuSb5mcCaXKN35NW.xWpAAGyQmLFAEwVK"], ["role", 10], ["created_at", "2016-04-23 05:21:09.309814"], ["updated_at", "2016-04-23 05:21:09.309814"], ["uuid", "2fd81ad4-0913-11e6-a596-6c4008a6fa2a"]]
355312
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355313
+  (0.3ms) rollback transaction
355314
+  (0.1ms) begin transaction
355315
+ ------------------------------------------------------------------
355316
+ RailsIdentity::UserTest: test_user_is_not_valid_without_a_username
355317
+ ------------------------------------------------------------------
355318
+  (0.0ms) SAVEPOINT active_record_1
355319
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" IS NULL AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
355320
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
355321
+  (0.0ms) rollback transaction
355322
+  (0.1ms) begin transaction
355323
+ ---------------------------------------------------------------------------
355324
+ RailsIdentity::UserTest: test_user_is_not_valid_if_username_is_malformatted
355325
+ ---------------------------------------------------------------------------
355326
+  (0.0ms) SAVEPOINT active_record_1
355327
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
355328
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
355329
+  (0.0ms) rollback transaction
355330
+  (0.1ms) begin transaction
355331
+ -----------------------------------------------------------------
355332
+ RailsIdentity::UserTest: test_user_can_issue_a_verification_token
355333
+ -----------------------------------------------------------------
355334
+  (0.0ms) SAVEPOINT active_record_1
355335
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
355336
+ SQL (0.2ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$neZpNMmMr5.J1TUZVO.3xu3L8pC2uynelwSBw/rOs9kQlNuo3lg3q"], ["role", 10], ["created_at", "2016-04-23 05:21:09.322380"], ["updated_at", "2016-04-23 05:21:09.322380"], ["uuid", "2fda086c-0913-11e6-a596-6c4008a6fa2a"]]
355337
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355338
+  (0.0ms) SAVEPOINT active_record_1
355339
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "2fda086c-0913-11e6-a596-6c4008a6fa2a"], ["uuid", "2fda40ca-0913-11e6-a596-6c4008a6fa2a"], ["secret", "e5f2492c-deac-4630-bd40-4182987668e5"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyZmRhMDg2Yy0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyZmRhNDBjYS0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4ODY5LCJleHAiOjE0NjEzOTI0Njl9.UdIT05dNJyYLDgMwqcczb9qvyaoQDGtCp-QMMWLewdA"], ["created_at", "2016-04-23 05:21:09.324785"], ["updated_at", "2016-04-23 05:21:09.324785"]]
355340
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355341
+  (0.4ms) rollback transaction
355342
+  (0.1ms) begin transaction
355343
+ --------------------------------------------------------------------------
355344
+ RailsIdentity::UserTest: test_user_is_not_valid_if_username_already_exists
355345
+ --------------------------------------------------------------------------
355346
+  (0.1ms) SAVEPOINT active_record_1
355347
+ RailsIdentity::User Exists (0.2ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
355348
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
355349
+  (0.1ms) rollback transaction
355350
+  (0.0ms) begin transaction
355351
+ ------------------------------------------------------------------
355352
+ RailsIdentity::UserTest: test_user_is_not_valid_without_a_password
355353
+ ------------------------------------------------------------------
355354
+  (0.0ms) SAVEPOINT active_record_1
355355
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
355356
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
355357
+  (0.0ms) rollback transaction
355358
+  (0.0ms) begin transaction
355359
+ ----------------------------------------------------------------------
355360
+ RailsIdentity::UserTest: test_user_is_valid_with_username_and_password
355361
+ ----------------------------------------------------------------------
355362
+  (0.0ms) SAVEPOINT active_record_1
355363
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
355364
+ SQL (0.3ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$4uiOvZxENVCX1Qj7GrEWyuMRrDx6Z4AIwLqpuTi4eO8MZX3xQ1kNK"], ["role", 10], ["created_at", "2016-04-23 05:21:09.339268"], ["updated_at", "2016-04-23 05:21:09.339268"], ["uuid", "2fdc9c9e-0913-11e6-a596-6c4008a6fa2a"]]
355365
+  (0.1ms) RELEASE SAVEPOINT active_record_1
355366
+  (0.5ms) rollback transaction
355367
+  (0.0ms) begin transaction
355368
+ -----------------------------
355369
+ RailsIdentityTest: test_truth
355370
+ -----------------------------
355371
+  (0.0ms) rollback transaction
355372
+  (0.0ms) begin transaction
355373
+ ------------------------------------------------------------------------------------------------------
355374
+ RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_with_invalid_username
355375
+ ------------------------------------------------------------------------------------------------------
355376
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355377
+ Processing by RailsIdentity::UsersController#update as HTML
355378
+ Parameters: {"issue_reset_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
355379
+ Accepts a token
355380
+ Token decode error: Nil JSON web token
355381
+ Suppressing error: Invalid token:
355382
+ RailsIdentity::User Load (0.2ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "doesnotexist@example.com"]]
355383
+ 404 - Repia::Errors::NotFound
355384
+ Completed 404 Not Found in 3ms (Views: 0.2ms | ActiveRecord: 0.2ms)
355385
+  (0.1ms) rollback transaction
355386
+  (0.1ms) begin transaction
355387
+ ------------------------------------------------------------
355388
+ RailsIdentity::UsersControllerTest: test_delete_current_user
355389
+ ------------------------------------------------------------
355390
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355391
+ Processing by RailsIdentity::UsersController#destroy as HTML
355392
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"current"}
355393
+ Requires a token
355394
+ Token well formatted for user 1,
355395
+ session 1
355396
+ Cache miss. Try database.
355397
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355398
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355399
+ Token well formatted and verified. Set cache.
355400
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355401
+ Attempting to get RailsIdentity::User 1
355402
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355403
+ Checking to see if authorized to access object
355404
+  (0.0ms) SAVEPOINT active_record_1
355405
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "deleted_at" = '2016-04-23 05:21:09.368770' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
355406
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355407
+ Rendered text template (0.0ms)
355408
+ Completed 204 No Content in 6ms (Views: 1.4ms | ActiveRecord: 0.5ms)
355409
+  (0.4ms) rollback transaction
355410
+  (0.1ms) begin transaction
355411
+ -------------------------------------------------------------------------
355412
+ RailsIdentity::UsersControllerTest: test_user_cannot_create_an_admin_user
355413
+ -------------------------------------------------------------------------
355414
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355415
+ Processing by RailsIdentity::UsersController#create as HTML
355416
+ Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100"}
355417
+ Accepts a token
355418
+ Token decode error: Nil JSON web token
355419
+ Suppressing error: Invalid token:
355420
+ Create new user
355421
+ Unpermitted parameter: role
355422
+  (0.1ms) SAVEPOINT active_record_1
355423
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
355424
+ SQL (0.2ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$wLUL09TRubKBtLaoq7whh.Am7ua4b88U150IGmaOyPlQavLHsfW6."], ["role", 10], ["created_at", "2016-04-23 05:21:09.424666"], ["updated_at", "2016-04-23 05:21:09.424666"], ["uuid", "2fe9a2d6-0913-11e6-a596-6c4008a6fa2a"]]
355425
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355426
+  (0.0ms) SAVEPOINT active_record_1
355427
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "2fe9a2d6-0913-11e6-a596-6c4008a6fa2a"], ["uuid", "2fe9e7aa-0913-11e6-a596-6c4008a6fa2a"], ["secret", "405204ca-ad58-48a3-9b4e-5953c0c014fe"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyZmU5YTJkNi0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyZmU5ZTdhYS0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4ODY5LCJleHAiOjE0NjEzOTI0Njl9.dXzFA8eeXHaVb33hbu8HSd1gH4ngx6SmzwiQQbqPUmU"], ["created_at", "2016-04-23 05:21:09.427280"], ["updated_at", "2016-04-23 05:21:09.427280"]]
355428
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355429
+  (0.0ms) SAVEPOINT active_record_1
355430
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '2fe9a2d6-0913-11e6-a596-6c4008a6fa2a') LIMIT 1
355431
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyZmU5YTJkNi0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyZmU5ZTdhYS0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4ODY5LCJleHAiOjE0NjEzOTI0Njl9.dXzFA8eeXHaVb33hbu8HSd1gH4ngx6SmzwiQQbqPUmU"], ["updated_at", "2016-04-23 05:21:09.428839"], ["uuid", "2fe9a2d6-0913-11e6-a596-6c4008a6fa2a"]]
355432
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355433
+ [ActiveJob] RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2fe9a2d6-0913-11e6-a596-6c4008a6fa2a"]]
355434
+ [ActiveJob] [ActionMailer::DeliveryJob] [5dd15565-c8d1-4f44-94fe-d758723560cb] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/2fe9a2d6-0913-11e6-a596-6c4008a6fa2a
355435
+ [ActiveJob] [ActionMailer::DeliveryJob] [5dd15565-c8d1-4f44-94fe-d758723560cb] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (1.0ms)
355436
+ [ActiveJob] [ActionMailer::DeliveryJob] [5dd15565-c8d1-4f44-94fe-d758723560cb] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.3ms)
355437
+ [ActiveJob] [ActionMailer::DeliveryJob] [5dd15565-c8d1-4f44-94fe-d758723560cb]
355438
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 150.7ms
355439
+ [ActiveJob] [ActionMailer::DeliveryJob] [5dd15565-c8d1-4f44-94fe-d758723560cb]
355440
+ Sent mail to foo@example.com (6.1ms)
355441
+ [ActiveJob] [ActionMailer::DeliveryJob] [5dd15565-c8d1-4f44-94fe-d758723560cb] Date: Sat, 23 Apr 2016 00:21:09 -0500
355442
+ From: no-reply@rails-identity.com
355443
+ To: foo@example.com
355444
+ Message-ID: <571b064590d33_86873fd0ee452460191c4@galt.local.mail>
355445
+ Subject: [rails-identity] Email Confirmation
355446
+ Mime-Version: 1.0
355447
+ Content-Type: multipart/alternative;
355448
+ boundary="--==_mimepart_571b06458fc52_86873fd0ee452460190ea";
355449
+ charset=UTF-8
355450
+ Content-Transfer-Encoding: 7bit
355451
+
355452
+
355453
+ ----==_mimepart_571b06458fc52_86873fd0ee452460190ea
355454
+ Content-Type: text/plain;
355455
+ charset=UTF-8
355456
+ Content-Transfer-Encoding: 7bit
355457
+
355458
+ Dear foo@example.com,
355459
+
355460
+ Please confirm your account with rails-identity by making a PATCH request
355461
+ on the current user with a provided verification token. For example,
355462
+
355463
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyZmU5YTJkNi0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyZmU5ZTdhYS0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4ODY5LCJleHAiOjE0NjEzOTI0Njl9.dXzFA8eeXHaVb33hbu8HSd1gH4ngx6SmzwiQQbqPUmU verified=true
355464
+
355465
+ will confirm the account. Here is the verification token:
355466
+
355467
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyZmU5YTJkNi0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyZmU5ZTdhYS0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4ODY5LCJleHAiOjE0NjEzOTI0Njl9.dXzFA8eeXHaVb33hbu8HSd1gH4ngx6SmzwiQQbqPUmU
355468
+
355469
+ Thank you for using rails-identity,
355470
+ rails-identity
355471
+
355472
+
355473
+ ----==_mimepart_571b06458fc52_86873fd0ee452460190ea
355474
+ Content-Type: text/html;
355475
+ charset=UTF-8
355476
+ Content-Transfer-Encoding: 7bit
355477
+
355478
+ <html>
355479
+ <body>
355480
+ <p>Dear foo@example.com,</p>
355481
+
355482
+ <p>Please confirm your account with rails-identity by making a PATCH request
355483
+ on the current user with a provided verification token. For example,
355484
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyZmU5YTJkNi0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyZmU5ZTdhYS0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4ODY5LCJleHAiOjE0NjEzOTI0Njl9.dXzFA8eeXHaVb33hbu8HSd1gH4ngx6SmzwiQQbqPUmU
355485
+ verified=true</pre> will confirm the account. Here is the verification
355486
+ token:</p>
355487
+
355488
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyZmU5YTJkNi0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyZmU5ZTdhYS0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4ODY5LCJleHAiOjE0NjEzOTI0Njl9.dXzFA8eeXHaVb33hbu8HSd1gH4ngx6SmzwiQQbqPUmU</pre>
355489
+
355490
+ <p>Thank you for using rails-identity</p>
355491
+ <p><b>rails-identity</b></p>
355492
+
355493
+ </body>
355494
+ </html>
355495
+
355496
+ ----==_mimepart_571b06458fc52_86873fd0ee452460190ea--
355497
+
355498
+ [ActiveJob] [ActionMailer::DeliveryJob] [5dd15565-c8d1-4f44-94fe-d758723560cb] Performed ActionMailer::DeliveryJob from Inline(mailers) in 157.51ms
355499
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 5dd15565-c8d1-4f44-94fe-d758723560cb) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/2fe9a2d6-0913-11e6-a596-6c4008a6fa2a
355500
+ Completed 201 Created in 176ms (Views: 0.3ms | ActiveRecord: 0.9ms)
355501
+  (1.4ms) rollback transaction
355502
+  (0.1ms) begin transaction
355503
+ ---------------------------------------------------------------------------------------------
355504
+ RailsIdentity::UsersControllerTest: test_update_a_user_with_a_new_password_using_old_password
355505
+ ---------------------------------------------------------------------------------------------
355506
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355507
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355508
+ Processing by RailsIdentity::UsersController#update as HTML
355509
+ Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"1"}
355510
+ Accepts a token
355511
+ Token well formatted for user 1,
355512
+ session 1
355513
+ Cache miss. Try database.
355514
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355515
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355516
+ Token well formatted and verified. Set cache.
355517
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355518
+ Attempting to get RailsIdentity::User 1
355519
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355520
+ Checking to see if authorized to access object
355521
+ Unpermitted parameters: old_password, token, id
355522
+  (0.1ms) SAVEPOINT active_record_1
355523
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
355524
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["password_digest", "$2a$04$MsOo0MagXfOpzppFot1uCedB.98rQCRiLS8xBx3WSBOzwww.RrIZW"], ["updated_at", "2016-04-23 05:21:09.676814"], ["uuid", "1"]]
355525
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355526
+ Completed 200 OK in 74ms (Views: 0.4ms | ActiveRecord: 0.6ms)
355527
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355528
+  (0.5ms) rollback transaction
355529
+  (0.1ms) begin transaction
355530
+ ------------------------------------------------------------------------------
355531
+ RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_username
355532
+ ------------------------------------------------------------------------------
355533
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355534
+ Processing by RailsIdentity::UsersController#create as HTML
355535
+ Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
355536
+ Accepts a token
355537
+ Token decode error: Nil JSON web token
355538
+ Suppressing error: Invalid token:
355539
+ Create new user
355540
+  (0.1ms) SAVEPOINT active_record_1
355541
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" IS NULL AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
355542
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
355543
+ Completed 400 Bad Request in 7ms (Views: 0.3ms | ActiveRecord: 0.2ms)
355544
+  (0.1ms) rollback transaction
355545
+  (0.0ms) begin transaction
355546
+ -----------------------------------------------------------------------------------------------------------
355547
+ RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_token_with_invalid_username
355548
+ -----------------------------------------------------------------------------------------------------------
355549
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355550
+ Processing by RailsIdentity::UsersController#update as HTML
355551
+ Parameters: {"issue_verification_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
355552
+ Accepts a token
355553
+ Token decode error: Nil JSON web token
355554
+ Suppressing error: Invalid token:
355555
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "doesnotexist@example.com"]]
355556
+ 404 - Repia::Errors::NotFound
355557
+ Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
355558
+  (0.1ms) rollback transaction
355559
+  (0.0ms) begin transaction
355560
+ ------------------------------------------------------------------------------------
355561
+ RailsIdentity::UsersControllerTest: test_cannot_update_password_with_a_invalid_token
355562
+ ------------------------------------------------------------------------------------
355563
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355564
+ Processing by RailsIdentity::UsersController#update as HTML
355565
+ Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"1"}
355566
+ Accepts a token
355567
+ Token well formatted for user 1,
355568
+ session 1
355569
+ Cache miss. Try database.
355570
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355571
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355572
+ Token well formatted and verified. Set cache.
355573
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355574
+ Attempting to get RailsIdentity::User 1
355575
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355576
+ Checking to see if authorized to access object
355577
+ 401 - Repia::Errors::Unauthorized
355578
+ Completed 401 Unauthorized in 70ms (Views: 0.2ms | ActiveRecord: 0.2ms)
355579
+  (0.1ms) rollback transaction
355580
+  (0.0ms) begin transaction
355581
+ ------------------------------------------------------------------------------------
355582
+ RailsIdentity::UsersControllerTest: test_cannot_update_password_with_non-reset_token
355583
+ ------------------------------------------------------------------------------------
355584
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355585
+ Processing by RailsIdentity::UsersController#update as HTML
355586
+ Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"1"}
355587
+ Accepts a token
355588
+ Token well formatted for user 1,
355589
+ session 1
355590
+ Cache miss. Try database.
355591
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355592
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355593
+ Token well formatted and verified. Set cache.
355594
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355595
+ Attempting to get RailsIdentity::User 1
355596
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355597
+ Checking to see if authorized to access object
355598
+ 401 - Repia::Errors::Unauthorized
355599
+ Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
355600
+  (0.1ms) rollback transaction
355601
+  (0.0ms) begin transaction
355602
+ ------------------------------------------------------------------
355603
+ RailsIdentity::UsersControllerTest: test_admin_can_show_other_user
355604
+ ------------------------------------------------------------------
355605
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355606
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
355607
+ Processing by RailsIdentity::UsersController#show as HTML
355608
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM5MjY4fQ.MoyklN4m1nP5DPiKHi-KjRSIl7ygkAlFxDY6OoDjyRU", "id"=>"1"}
355609
+ Requires a token
355610
+ Token well formatted for user admin_one,
355611
+ session session_admin_one
355612
+ Cache miss. Try database.
355613
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
355614
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
355615
+ Token well formatted and verified. Set cache.
355616
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
355617
+ Attempting to get RailsIdentity::User 1
355618
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355619
+ Checking to see if authorized to access object
355620
+ Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 0.2ms)
355621
+  (0.1ms) rollback transaction
355622
+  (0.0ms) begin transaction
355623
+ ---------------------------------------------------------------------
355624
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_ill-formed
355625
+ ---------------------------------------------------------------------
355626
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355627
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355628
+ Processing by RailsIdentity::UsersController#show as HTML
355629
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzg4OTI5fQ.CWtBxNiUX8SKVhbKVXylMGc2mK4Wf---7ent2tG61Z4", "id"=>"1"}
355630
+ Requires a token
355631
+ User UUID or session UUID is nil
355632
+ 401 - Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzg4OTI5fQ.CWtBxNiUX8SKVhbKVXylMGc2mK4Wf---7ent2tG61Z4
355633
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
355634
+  (0.1ms) rollback transaction
355635
+  (0.0ms) begin transaction
355636
+ ------------------------------------------------------
355637
+ RailsIdentity::UsersControllerTest: test_delete_a_user
355638
+ ------------------------------------------------------
355639
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355640
+ Processing by RailsIdentity::UsersController#destroy as HTML
355641
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"1"}
355642
+ Requires a token
355643
+ Token well formatted for user 1,
355644
+ session 1
355645
+ Cache miss. Try database.
355646
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355647
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355648
+ Token well formatted and verified. Set cache.
355649
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355650
+ Attempting to get RailsIdentity::User 1
355651
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355652
+ Checking to see if authorized to access object
355653
+  (0.0ms) SAVEPOINT active_record_1
355654
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "deleted_at" = '2016-04-23 05:21:09.803393' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
355655
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355656
+ Rendered text template (0.0ms)
355657
+ Completed 204 No Content in 5ms (Views: 0.3ms | ActiveRecord: 0.4ms)
355658
+  (0.4ms) rollback transaction
355659
+  (0.1ms) begin transaction
355660
+ ---------------------------------------------------------------
355661
+ RailsIdentity::UsersControllerTest: test_public_can_see_options
355662
+ ---------------------------------------------------------------
355663
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355664
+ Processing by RailsIdentity::UsersController#options as HTML
355665
+ Rendered text template (0.0ms)
355666
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
355667
+  (0.1ms) rollback transaction
355668
+  (0.0ms) begin transaction
355669
+ --------------------------------------------------------------------
355670
+ RailsIdentity::UsersControllerTest: test_non-admin_cannot_list_users
355671
+ --------------------------------------------------------------------
355672
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355673
+ Processing by RailsIdentity::UsersController#index as HTML
355674
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ"}
355675
+ Requires an admin token
355676
+ Token well formatted for user 1,
355677
+ session 1
355678
+ Cache miss. Try database.
355679
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355680
+ 401 - Well-formed but invalid user token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ
355681
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
355682
+  (0.1ms) rollback transaction
355683
+  (0.0ms) begin transaction
355684
+ ------------------------------------------------------------------
355685
+ RailsIdentity::UsersControllerTest: test_public_cannot_show_a_user
355686
+ ------------------------------------------------------------------
355687
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355688
+ Processing by RailsIdentity::UsersController#show as HTML
355689
+ Parameters: {"id"=>"1"}
355690
+ Requires a token
355691
+ Token decode error: Nil JSON web token
355692
+ 401 - Invalid token:
355693
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
355694
+  (0.1ms) rollback transaction
355695
+  (0.0ms) begin transaction
355696
+ -----------------------------------------------------------------------
355697
+ RailsIdentity::UsersControllerTest: test_admin_can_create_an_admin_user
355698
+ -----------------------------------------------------------------------
355699
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355700
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
355701
+ Processing by RailsIdentity::UsersController#create as HTML
355702
+ Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM5MjY4fQ.MoyklN4m1nP5DPiKHi-KjRSIl7ygkAlFxDY6OoDjyRU"}
355703
+ Accepts a token
355704
+ Token well formatted for user admin_one,
355705
+ session session_admin_one
355706
+ Cache miss. Try database.
355707
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
355708
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
355709
+ Token well formatted and verified. Set cache.
355710
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
355711
+ Create new user
355712
+ Unpermitted parameter: token
355713
+  (0.0ms) SAVEPOINT active_record_1
355714
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
355715
+ SQL (0.1ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$27nvSkdc1Qmo/rovmhw6b.zByTWNlHhh4wdnPCnKkNjlxZ4G.m.Z."], ["role", 100], ["created_at", "2016-04-23 05:21:09.830797"], ["updated_at", "2016-04-23 05:21:09.830797"], ["uuid", "30279b86-0913-11e6-a596-6c4008a6fa2a"]]
355716
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355717
+  (0.0ms) SAVEPOINT active_record_1
355718
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "30279b86-0913-11e6-a596-6c4008a6fa2a"], ["uuid", "3027d6d2-0913-11e6-a596-6c4008a6fa2a"], ["secret", "31dd5a36-fbfd-486d-9771-6c03580479b6"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIzMDI3OWI4Ni0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIzMDI3ZDZkMi0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzkyNDY5fQ.PcZsouxwzJxCYhw5UR9UchlOavvLXbHdCegTvvyrvME"], ["created_at", "2016-04-23 05:21:09.833098"], ["updated_at", "2016-04-23 05:21:09.833098"]]
355719
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355720
+  (0.0ms) SAVEPOINT active_record_1
355721
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '30279b86-0913-11e6-a596-6c4008a6fa2a') LIMIT 1
355722
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIzMDI3OWI4Ni0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIzMDI3ZDZkMi0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzkyNDY5fQ.PcZsouxwzJxCYhw5UR9UchlOavvLXbHdCegTvvyrvME"], ["updated_at", "2016-04-23 05:21:09.834601"], ["uuid", "30279b86-0913-11e6-a596-6c4008a6fa2a"]]
355723
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355724
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "30279b86-0913-11e6-a596-6c4008a6fa2a"]]
355725
+ [ActiveJob] [ActionMailer::DeliveryJob] [66d2937d-1881-4983-83df-e1b44d602a17] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/30279b86-0913-11e6-a596-6c4008a6fa2a
355726
+ [ActiveJob] [ActionMailer::DeliveryJob] [66d2937d-1881-4983-83df-e1b44d602a17] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
355727
+ [ActiveJob] [ActionMailer::DeliveryJob] [66d2937d-1881-4983-83df-e1b44d602a17] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
355728
+ [ActiveJob] [ActionMailer::DeliveryJob] [66d2937d-1881-4983-83df-e1b44d602a17]
355729
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.4ms
355730
+ [ActiveJob] [ActionMailer::DeliveryJob] [66d2937d-1881-4983-83df-e1b44d602a17]
355731
+ Sent mail to foo@example.com (3.7ms)
355732
+ [ActiveJob] [ActionMailer::DeliveryJob] [66d2937d-1881-4983-83df-e1b44d602a17] Date: Sat, 23 Apr 2016 00:21:09 -0500
355733
+ From: no-reply@rails-identity.com
355734
+ To: foo@example.com
355735
+ Message-ID: <571b0645cd737_86873fd0ee45246019330@galt.local.mail>
355736
+ Subject: [rails-identity] Email Confirmation
355737
+ Mime-Version: 1.0
355738
+ Content-Type: multipart/alternative;
355739
+ boundary="--==_mimepart_571b0645ccd9a_86873fd0ee45246019230";
355740
+ charset=UTF-8
355741
+ Content-Transfer-Encoding: 7bit
355742
+
355743
+
355744
+ ----==_mimepart_571b0645ccd9a_86873fd0ee45246019230
355745
+ Content-Type: text/plain;
355746
+ charset=UTF-8
355747
+ Content-Transfer-Encoding: 7bit
355748
+
355749
+ Dear foo@example.com,
355750
+
355751
+ Please confirm your account with rails-identity by making a PATCH request
355752
+ on the current user with a provided verification token. For example,
355753
+
355754
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIzMDI3OWI4Ni0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIzMDI3ZDZkMi0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzkyNDY5fQ.PcZsouxwzJxCYhw5UR9UchlOavvLXbHdCegTvvyrvME verified=true
355755
+
355756
+ will confirm the account. Here is the verification token:
355757
+
355758
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIzMDI3OWI4Ni0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIzMDI3ZDZkMi0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzkyNDY5fQ.PcZsouxwzJxCYhw5UR9UchlOavvLXbHdCegTvvyrvME
355759
+
355760
+ Thank you for using rails-identity,
355761
+ rails-identity
355762
+
355763
+
355764
+ ----==_mimepart_571b0645ccd9a_86873fd0ee45246019230
355765
+ Content-Type: text/html;
355766
+ charset=UTF-8
355767
+ Content-Transfer-Encoding: 7bit
355768
+
355769
+ <html>
355770
+ <body>
355771
+ <p>Dear foo@example.com,</p>
355772
+
355773
+ <p>Please confirm your account with rails-identity by making a PATCH request
355774
+ on the current user with a provided verification token. For example,
355775
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIzMDI3OWI4Ni0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIzMDI3ZDZkMi0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzkyNDY5fQ.PcZsouxwzJxCYhw5UR9UchlOavvLXbHdCegTvvyrvME
355776
+ verified=true</pre> will confirm the account. Here is the verification
355777
+ token:</p>
355778
+
355779
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIzMDI3OWI4Ni0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIzMDI3ZDZkMi0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzkyNDY5fQ.PcZsouxwzJxCYhw5UR9UchlOavvLXbHdCegTvvyrvME</pre>
355780
+
355781
+ <p>Thank you for using rails-identity</p>
355782
+ <p><b>rails-identity</b></p>
355783
+
355784
+ </body>
355785
+ </html>
355786
+
355787
+ ----==_mimepart_571b0645ccd9a_86873fd0ee45246019230--
355788
+
355789
+ [ActiveJob] [ActionMailer::DeliveryJob] [66d2937d-1881-4983-83df-e1b44d602a17] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.63ms
355790
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 66d2937d-1881-4983-83df-e1b44d602a17) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/30279b86-0913-11e6-a596-6c4008a6fa2a
355791
+ Completed 201 Created in 20ms (Views: 0.3ms | ActiveRecord: 0.9ms)
355792
+  (0.9ms) rollback transaction
355793
+  (0.1ms) begin transaction
355794
+ --------------------------------------------------------------------------
355795
+ RailsIdentity::UsersControllerTest: test_update_password_using_reset_token
355796
+ --------------------------------------------------------------------------
355797
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355798
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355799
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355800
+ Processing by RailsIdentity::UsersController#update as HTML
355801
+ Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
355802
+ Accepts a token
355803
+ Token decode error: Nil JSON web token
355804
+ Suppressing error: Invalid token:
355805
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
355806
+  (0.1ms) SAVEPOINT active_record_1
355807
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "302b23c8-0913-11e6-a596-6c4008a6fa2a"], ["secret", "f517551e-3ec4-49d6-88dc-0f090e3b4d0d"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMzAyYjIzYzgtMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzkyNDY5fQ.utYghTqdKBg3xsB2-6BXlM3toS6BfLO4sM9kWEA0QAg"], ["created_at", "2016-04-23 05:21:09.855071"], ["updated_at", "2016-04-23 05:21:09.855071"]]
355808
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355809
+  (0.0ms) SAVEPOINT active_record_1
355810
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
355811
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMzAyYjIzYzgtMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzkyNDY5fQ.utYghTqdKBg3xsB2-6BXlM3toS6BfLO4sM9kWEA0QAg"], ["updated_at", "2016-04-23 05:21:09.857687"], ["uuid", "1"]]
355812
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355813
+ [ActiveJob] RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355814
+ [ActiveJob] [ActionMailer::DeliveryJob] [904f10b1-28d8-48f7-ab1f-0bf303d84366] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
355815
+ [ActiveJob] [ActionMailer::DeliveryJob] [904f10b1-28d8-48f7-ab1f-0bf303d84366] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (0.5ms)
355816
+ [ActiveJob] [ActionMailer::DeliveryJob] [904f10b1-28d8-48f7-ab1f-0bf303d84366] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (36.1ms)
355817
+ [ActiveJob] [ActionMailer::DeliveryJob] [904f10b1-28d8-48f7-ab1f-0bf303d84366]
355818
+ RailsIdentity::UserMailer#password_reset: processed outbound mail in 42.8ms
355819
+ [ActiveJob] [ActionMailer::DeliveryJob] [904f10b1-28d8-48f7-ab1f-0bf303d84366]
355820
+ Sent mail to one@example.com (3.3ms)
355821
+ [ActiveJob] [ActionMailer::DeliveryJob] [904f10b1-28d8-48f7-ab1f-0bf303d84366] Date: Sat, 23 Apr 2016 00:21:09 -0500
355822
+ From: no-reply@rails-identity.com
355823
+ To: one@example.com
355824
+ Message-ID: <571b0645dd1d4_86873fd0ee452460195a2@galt.local.mail>
355825
+ Subject: [rails-identity] Password Reset
355826
+ Mime-Version: 1.0
355827
+ Content-Type: multipart/alternative;
355828
+ boundary="--==_mimepart_571b0645dc91f_86873fd0ee45246019445";
355829
+ charset=UTF-8
355830
+ Content-Transfer-Encoding: 7bit
355831
+
355832
+
355833
+ ----==_mimepart_571b0645dc91f_86873fd0ee45246019445
355834
+ Content-Type: text/plain;
355835
+ charset=UTF-8
355836
+ Content-Transfer-Encoding: 7bit
355837
+
355838
+ Dear one@example.com,
355839
+
355840
+ You have requested to reset your password. Here are the user UUID and reset
355841
+ token. Make a PATCH request on the UUID with the reset token to set a new
355842
+ password. For instance,
355843
+
355844
+ http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
355845
+
355846
+ will set the password to "reallysecret" (without quotes) for the user to
355847
+ whom the reset token was issued.
355848
+
355849
+ Here is the reset token: @user.reset_token
355850
+
355851
+ Good luck! :)
355852
+ rails-identity
355853
+
355854
+
355855
+ ----==_mimepart_571b0645dc91f_86873fd0ee45246019445
355856
+ Content-Type: text/html;
355857
+ charset=UTF-8
355858
+ Content-Transfer-Encoding: 7bit
355859
+
355860
+ <html>
355861
+ <body>
355862
+ <p>Dear one@example.com,</p>
355863
+
355864
+ <p>You have requested to reset your password. Here are the user UUID and
355865
+ reset token. Make a PATCH request on the UUID with the reset token to set a
355866
+ new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMzAyYjIzYzgtMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzkyNDY5fQ.utYghTqdKBg3xsB2-6BXlM3toS6BfLO4sM9kWEA0QAg password=reallysecret
355867
+ password_confirmation=reallysecret</pre> will set the password to
355868
+ <pre>reallysecret</pre> for the user to whom the reset token was issued.
355869
+ Here is the reset token:</p>
355870
+
355871
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMzAyYjIzYzgtMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzkyNDY5fQ.utYghTqdKBg3xsB2-6BXlM3toS6BfLO4sM9kWEA0QAg</pre>
355872
+
355873
+ <p>Good luck! :)</p>
355874
+ <p><b>rails-identity</b></p>
355875
+
355876
+ </body>
355877
+ </html>
355878
+
355879
+ ----==_mimepart_571b0645dc91f_86873fd0ee45246019445--
355880
+
355881
+ [ActiveJob] [ActionMailer::DeliveryJob] [904f10b1-28d8-48f7-ab1f-0bf303d84366] Performed ActionMailer::DeliveryJob from Inline(mailers) in 46.68ms
355882
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 904f10b1-28d8-48f7-ab1f-0bf303d84366) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
355883
+ Rendered text template (0.0ms)
355884
+ Completed 204 No Content in 56ms (Views: 0.4ms | ActiveRecord: 0.7ms)
355885
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355886
+ Processing by RailsIdentity::UsersController#update as HTML
355887
+ Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMzAyYjIzYzgtMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzkyNDY5fQ.utYghTqdKBg3xsB2-6BXlM3toS6BfLO4sM9kWEA0QAg", "id"=>"1"}
355888
+ Accepts a token
355889
+ Token well formatted for user 1,
355890
+ session 302b23c8-0913-11e6-a596-6c4008a6fa2a
355891
+ Cache miss. Try database.
355892
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355893
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "302b23c8-0913-11e6-a596-6c4008a6fa2a"]]
355894
+ Token well formatted and verified. Set cache.
355895
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355896
+ Attempting to get RailsIdentity::User 1
355897
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355898
+ Checking to see if authorized to access object
355899
+ Unpermitted parameters: token, id
355900
+  (0.1ms) SAVEPOINT active_record_1
355901
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
355902
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["password_digest", "$2a$04$4qqEZCAjVZ7WGac848ZDj.sgO51I1D6.DW80StfUoTGJhokHjFXAu"], ["updated_at", "2016-04-23 05:21:09.916721"], ["uuid", "1"]]
355903
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355904
+ Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 1.2ms)
355905
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355906
+  (0.8ms) rollback transaction
355907
+  (0.1ms) begin transaction
355908
+ ----------------------------------------------------
355909
+ RailsIdentity::UsersControllerTest: test_show_a_user
355910
+ ----------------------------------------------------
355911
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355912
+ Processing by RailsIdentity::UsersController#show as HTML
355913
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"1"}
355914
+ Requires a token
355915
+ Token well formatted for user 1,
355916
+ session 1
355917
+ Cache miss. Try database.
355918
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355919
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355920
+ Token well formatted and verified. Set cache.
355921
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355922
+ Attempting to get RailsIdentity::User 1
355923
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355924
+ Checking to see if authorized to access object
355925
+ Completed 200 OK in 6ms (Views: 0.6ms | ActiveRecord: 0.2ms)
355926
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355927
+  (0.1ms) rollback transaction
355928
+  (0.0ms) begin transaction
355929
+ -----------------------------------------------------------------
355930
+ RailsIdentity::UsersControllerTest: test_admin_can_list_all_users
355931
+ -----------------------------------------------------------------
355932
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355933
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
355934
+ Processing by RailsIdentity::UsersController#index as HTML
355935
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM5MjY4fQ.MoyklN4m1nP5DPiKHi-KjRSIl7ygkAlFxDY6OoDjyRU"}
355936
+ Requires an admin token
355937
+ Token well formatted for user admin_one,
355938
+ session session_admin_one
355939
+ Cache miss. Try database.
355940
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
355941
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
355942
+ Token well formatted and verified. Set cache.
355943
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
355944
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL
355945
+ Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 0.2ms)
355946
+  (0.0ms) SELECT COUNT(*) FROM "rails_identity_sessions"
355947
+  (0.0ms) rollback transaction
355948
+  (0.0ms) begin transaction
355949
+ ----------------------------------------------------------------------------------------
355950
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_bogus_payload
355951
+ ----------------------------------------------------------------------------------------
355952
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355953
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355954
+ Processing by RailsIdentity::UsersController#show as HTML
355955
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzg4OTI5fQ.gGabiCrKgKsJc30L2p4tswQQFLboK1RbdzmxWGCN7II", "id"=>"1"}
355956
+ Requires a token
355957
+ Token well formatted for user 1,
355958
+ session doesnotexist
355959
+ Cache miss. Try database.
355960
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355961
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "doesnotexist"]]
355962
+ 401 - Well-formed but invalid session token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzg4OTI5fQ.gGabiCrKgKsJc30L2p4tswQQFLboK1RbdzmxWGCN7II
355963
+ Completed 401 Unauthorized in 2ms (Views: 0.3ms | ActiveRecord: 0.1ms)
355964
+  (0.1ms) rollback transaction
355965
+  (0.0ms) begin transaction
355966
+ ------------------------------------------------------------------------------------------------------------
355967
+ RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_reset_token_without_username
355968
+ ------------------------------------------------------------------------------------------------------------
355969
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355970
+ Processing by RailsIdentity::UsersController#update as HTML
355971
+ Parameters: {"issue_verification_token"=>true, "id"=>"current"}
355972
+ Accepts a token
355973
+ Token decode error: Nil JSON web token
355974
+ Suppressing error: Invalid token:
355975
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" IS NULL LIMIT 1
355976
+ 404 - Repia::Errors::NotFound
355977
+ Completed 404 Not Found in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)
355978
+  (0.0ms) rollback transaction
355979
+  (0.0ms) begin transaction
355980
+ -------------------------------------------------------------------------------------------------
355981
+ RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_without_username
355982
+ -------------------------------------------------------------------------------------------------
355983
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355984
+ Processing by RailsIdentity::UsersController#update as HTML
355985
+ Parameters: {"issue_reset_token"=>true, "id"=>"current"}
355986
+ Accepts a token
355987
+ Token decode error: Nil JSON web token
355988
+ Suppressing error: Invalid token:
355989
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" IS NULL LIMIT 1
355990
+ 404 - Repia::Errors::NotFound
355991
+ Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
355992
+  (0.0ms) rollback transaction
355993
+  (0.0ms) begin transaction
355994
+ -------------------------------------------------------------------------
355995
+ RailsIdentity::UsersControllerTest: test_update_(issue)_a_new_reset_token
355996
+ -------------------------------------------------------------------------
355997
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355998
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
355999
+ Processing by RailsIdentity::UsersController#update as HTML
356000
+ Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
356001
+ Accepts a token
356002
+ Token decode error: Nil JSON web token
356003
+ Suppressing error: Invalid token:
356004
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
356005
+  (0.0ms) SAVEPOINT active_record_1
356006
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "303bd54c-0913-11e6-a596-6c4008a6fa2a"], ["secret", "be5750c4-47a2-4130-9405-c511a2f518f3"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMzAzYmQ1NGMtMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzkyNDY5fQ.UiWoBCYnsFQBELQM8kNbH6P7lT0c21loj9po0mFPa04"], ["created_at", "2016-04-23 05:21:09.964319"], ["updated_at", "2016-04-23 05:21:09.964319"]]
356007
+  (0.0ms) RELEASE SAVEPOINT active_record_1
356008
+  (0.0ms) SAVEPOINT active_record_1
356009
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
356010
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMzAzYmQ1NGMtMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzkyNDY5fQ.UiWoBCYnsFQBELQM8kNbH6P7lT0c21loj9po0mFPa04"], ["updated_at", "2016-04-23 05:21:09.966966"], ["uuid", "1"]]
356011
+  (0.1ms) RELEASE SAVEPOINT active_record_1
356012
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356013
+ [ActiveJob] [ActionMailer::DeliveryJob] [1b48c37e-0237-43b7-92fb-6e82d544a69f] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
356014
+ [ActiveJob] [ActionMailer::DeliveryJob] [1b48c37e-0237-43b7-92fb-6e82d544a69f] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (0.1ms)
356015
+ [ActiveJob] [ActionMailer::DeliveryJob] [1b48c37e-0237-43b7-92fb-6e82d544a69f] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (0.1ms)
356016
+ [ActiveJob] [ActionMailer::DeliveryJob] [1b48c37e-0237-43b7-92fb-6e82d544a69f]
356017
+ RailsIdentity::UserMailer#password_reset: processed outbound mail in 2.9ms
356018
+ [ActiveJob] [ActionMailer::DeliveryJob] [1b48c37e-0237-43b7-92fb-6e82d544a69f]
356019
+ Sent mail to one@example.com (3.6ms)
356020
+ [ActiveJob] [ActionMailer::DeliveryJob] [1b48c37e-0237-43b7-92fb-6e82d544a69f] Date: Sat, 23 Apr 2016 00:21:09 -0500
356021
+ From: no-reply@rails-identity.com
356022
+ To: one@example.com
356023
+ Message-ID: <571b0645ee369_86873fd0ee452460197ab@galt.local.mail>
356024
+ Subject: [rails-identity] Password Reset
356025
+ Mime-Version: 1.0
356026
+ Content-Type: multipart/alternative;
356027
+ boundary="--==_mimepart_571b0645ed995_86873fd0ee4524601964b";
356028
+ charset=UTF-8
356029
+ Content-Transfer-Encoding: 7bit
356030
+
356031
+
356032
+ ----==_mimepart_571b0645ed995_86873fd0ee4524601964b
356033
+ Content-Type: text/plain;
356034
+ charset=UTF-8
356035
+ Content-Transfer-Encoding: 7bit
356036
+
356037
+ Dear one@example.com,
356038
+
356039
+ You have requested to reset your password. Here are the user UUID and reset
356040
+ token. Make a PATCH request on the UUID with the reset token to set a new
356041
+ password. For instance,
356042
+
356043
+ http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
356044
+
356045
+ will set the password to "reallysecret" (without quotes) for the user to
356046
+ whom the reset token was issued.
356047
+
356048
+ Here is the reset token: @user.reset_token
356049
+
356050
+ Good luck! :)
356051
+ rails-identity
356052
+
356053
+
356054
+ ----==_mimepart_571b0645ed995_86873fd0ee4524601964b
356055
+ Content-Type: text/html;
356056
+ charset=UTF-8
356057
+ Content-Transfer-Encoding: 7bit
356058
+
356059
+ <html>
356060
+ <body>
356061
+ <p>Dear one@example.com,</p>
356062
+
356063
+ <p>You have requested to reset your password. Here are the user UUID and
356064
+ reset token. Make a PATCH request on the UUID with the reset token to set a
356065
+ new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMzAzYmQ1NGMtMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzkyNDY5fQ.UiWoBCYnsFQBELQM8kNbH6P7lT0c21loj9po0mFPa04 password=reallysecret
356066
+ password_confirmation=reallysecret</pre> will set the password to
356067
+ <pre>reallysecret</pre> for the user to whom the reset token was issued.
356068
+ Here is the reset token:</p>
356069
+
356070
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMzAzYmQ1NGMtMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg2OSwiZXhwIjoxNDYxMzkyNDY5fQ.UiWoBCYnsFQBELQM8kNbH6P7lT0c21loj9po0mFPa04</pre>
356071
+
356072
+ <p>Good luck! :)</p>
356073
+ <p><b>rails-identity</b></p>
356074
+
356075
+ </body>
356076
+ </html>
356077
+
356078
+ ----==_mimepart_571b0645ed995_86873fd0ee4524601964b--
356079
+
356080
+ [ActiveJob] [ActionMailer::DeliveryJob] [1b48c37e-0237-43b7-92fb-6e82d544a69f] Performed ActionMailer::DeliveryJob from Inline(mailers) in 7.09ms
356081
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 1b48c37e-0237-43b7-92fb-6e82d544a69f) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
356082
+ Rendered text template (0.0ms)
356083
+ Completed 204 No Content in 16ms (Views: 0.3ms | ActiveRecord: 0.8ms)
356084
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356085
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = '1' LIMIT 1
356086
+ Processing by RailsIdentity::UsersController#update as HTML
356087
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"1"}
356088
+ Accepts a token
356089
+ Token well formatted for user 1,
356090
+ session 1
356091
+ Cache miss. Try database.
356092
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356093
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356094
+ Token well formatted and verified. Set cache.
356095
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356096
+ Attempting to get RailsIdentity::User 1
356097
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356098
+ Checking to see if authorized to access object
356099
+ Unpermitted parameters: token, id
356100
+  (0.0ms) SAVEPOINT active_record_1
356101
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
356102
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-23 05:21:09.985129"], ["uuid", "1"]]
356103
+  (0.0ms) RELEASE SAVEPOINT active_record_1
356104
+ Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.2ms)
356105
+  (0.8ms) rollback transaction
356106
+  (0.1ms) begin transaction
356107
+ --------------------------------------------------------------------------------
356108
+ RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_a_password
356109
+ --------------------------------------------------------------------------------
356110
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356111
+ Processing by RailsIdentity::UsersController#create as HTML
356112
+ Parameters: {"username"=>"foo@example.com"}
356113
+ Accepts a token
356114
+ Token decode error: Nil JSON web token
356115
+ Suppressing error: Invalid token:
356116
+ Create new user
356117
+  (0.1ms) SAVEPOINT active_record_1
356118
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
356119
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
356120
+ Completed 400 Bad Request in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
356121
+  (0.1ms) rollback transaction
356122
+  (0.0ms) begin transaction
356123
+ ------------------------------------------------------------------------------
356124
+ RailsIdentity::UsersControllerTest: test_update_(reissue)_a_verification_token
356125
+ ------------------------------------------------------------------------------
356126
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356127
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356128
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = '1' LIMIT 1
356129
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356130
+ Processing by RailsIdentity::UsersController#update as HTML
356131
+ Parameters: {"issue_verification_token"=>true, "username"=>"one@example.com", "id"=>"current"}
356132
+ Accepts a token
356133
+ Token decode error: Nil JSON web token
356134
+ Suppressing error: Invalid token:
356135
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1 [["username", "one@example.com"]]
356136
+  (0.0ms) SAVEPOINT active_record_1
356137
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "304206e2-0913-11e6-a596-6c4008a6fa2a"], ["secret", "d1e6a7ec-9e29-46e3-8b24-bdcc8778ee01"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMzA0MjA2ZTItMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg3MCwiZXhwIjoxNDYxMzkyNDcwfQ.mYpzDcqKhEbUeEOZij7MrIKanJNNGSUa4TnyNW7YA3k"], ["created_at", "2016-04-23 05:21:10.004823"], ["updated_at", "2016-04-23 05:21:10.004823"]]
356138
+  (0.0ms) RELEASE SAVEPOINT active_record_1
356139
+  (0.0ms) SAVEPOINT active_record_1
356140
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
356141
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMzA0MjA2ZTItMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg3MCwiZXhwIjoxNDYxMzkyNDcwfQ.mYpzDcqKhEbUeEOZij7MrIKanJNNGSUa4TnyNW7YA3k"], ["updated_at", "2016-04-23 05:21:10.006812"], ["uuid", "1"]]
356142
+  (0.0ms) RELEASE SAVEPOINT active_record_1
356143
+ [ActiveJob] RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356144
+ [ActiveJob] [ActionMailer::DeliveryJob] [a7efc537-3506-471f-a472-92f665c2ff50] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
356145
+ [ActiveJob] [ActionMailer::DeliveryJob] [a7efc537-3506-471f-a472-92f665c2ff50] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
356146
+ [ActiveJob] [ActionMailer::DeliveryJob] [a7efc537-3506-471f-a472-92f665c2ff50] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
356147
+ [ActiveJob] [ActionMailer::DeliveryJob] [a7efc537-3506-471f-a472-92f665c2ff50]
356148
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.6ms
356149
+ [ActiveJob] [ActionMailer::DeliveryJob] [a7efc537-3506-471f-a472-92f665c2ff50]
356150
+ Sent mail to one@example.com (3.9ms)
356151
+ [ActiveJob] [ActionMailer::DeliveryJob] [a7efc537-3506-471f-a472-92f665c2ff50] Date: Sat, 23 Apr 2016 00:21:10 -0500
356152
+ From: no-reply@rails-identity.com
356153
+ To: one@example.com
356154
+ Message-ID: <571b064638be_86873fd0ee45246019950@galt.local.mail>
356155
+ Subject: [rails-identity] Email Confirmation
356156
+ Mime-Version: 1.0
356157
+ Content-Type: multipart/alternative;
356158
+ boundary="--==_mimepart_571b06462f28_86873fd0ee45246019872";
356159
+ charset=UTF-8
356160
+ Content-Transfer-Encoding: 7bit
356161
+
356162
+
356163
+ ----==_mimepart_571b06462f28_86873fd0ee45246019872
356164
+ Content-Type: text/plain;
356165
+ charset=UTF-8
356166
+ Content-Transfer-Encoding: 7bit
356167
+
356168
+ Dear one@example.com,
356169
+
356170
+ Please confirm your account with rails-identity by making a PATCH request
356171
+ on the current user with a provided verification token. For example,
356172
+
356173
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMzA0MjA2ZTItMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg3MCwiZXhwIjoxNDYxMzkyNDcwfQ.mYpzDcqKhEbUeEOZij7MrIKanJNNGSUa4TnyNW7YA3k verified=true
356174
+
356175
+ will confirm the account. Here is the verification token:
356176
+
356177
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMzA0MjA2ZTItMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg3MCwiZXhwIjoxNDYxMzkyNDcwfQ.mYpzDcqKhEbUeEOZij7MrIKanJNNGSUa4TnyNW7YA3k
356178
+
356179
+ Thank you for using rails-identity,
356180
+ rails-identity
356181
+
356182
+
356183
+ ----==_mimepart_571b06462f28_86873fd0ee45246019872
356184
+ Content-Type: text/html;
356185
+ charset=UTF-8
356186
+ Content-Transfer-Encoding: 7bit
356187
+
356188
+ <html>
356189
+ <body>
356190
+ <p>Dear one@example.com,</p>
356191
+
356192
+ <p>Please confirm your account with rails-identity by making a PATCH request
356193
+ on the current user with a provided verification token. For example,
356194
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMzA0MjA2ZTItMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg3MCwiZXhwIjoxNDYxMzkyNDcwfQ.mYpzDcqKhEbUeEOZij7MrIKanJNNGSUa4TnyNW7YA3k
356195
+ verified=true</pre> will confirm the account. Here is the verification
356196
+ token:</p>
356197
+
356198
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMzA0MjA2ZTItMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg3MCwiZXhwIjoxNDYxMzkyNDcwfQ.mYpzDcqKhEbUeEOZij7MrIKanJNNGSUa4TnyNW7YA3k</pre>
356199
+
356200
+ <p>Thank you for using rails-identity</p>
356201
+ <p><b>rails-identity</b></p>
356202
+
356203
+ </body>
356204
+ </html>
356205
+
356206
+ ----==_mimepart_571b06462f28_86873fd0ee45246019872--
356207
+
356208
+ [ActiveJob] [ActionMailer::DeliveryJob] [a7efc537-3506-471f-a472-92f665c2ff50] Performed ActionMailer::DeliveryJob from Inline(mailers) in 7.21ms
356209
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: a7efc537-3506-471f-a472-92f665c2ff50) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
356210
+ Rendered text template (0.0ms)
356211
+ Completed 204 No Content in 15ms (Views: 0.6ms | ActiveRecord: 0.6ms)
356212
+ RailsIdentity::User Load (0.2ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = '1' LIMIT 1
356213
+ Processing by RailsIdentity::UsersController#update as HTML
356214
+ Parameters: {"verified"=>true, "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMzA0MjA2ZTItMDkxMy0xMWU2LWE1OTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4ODg3MCwiZXhwIjoxNDYxMzkyNDcwfQ.mYpzDcqKhEbUeEOZij7MrIKanJNNGSUa4TnyNW7YA3k", "id"=>"current"}
356215
+ Accepts a token
356216
+ Token well formatted for user 1,
356217
+ session 304206e2-0913-11e6-a596-6c4008a6fa2a
356218
+ Cache miss. Try database.
356219
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356220
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "304206e2-0913-11e6-a596-6c4008a6fa2a"]]
356221
+ Token well formatted and verified. Set cache.
356222
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356223
+ Attempting to get RailsIdentity::User 1
356224
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356225
+ Checking to see if authorized to access object
356226
+ Unpermitted parameters: token, id
356227
+  (0.0ms) SAVEPOINT active_record_1
356228
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'one@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
356229
+  (0.0ms) RELEASE SAVEPOINT active_record_1
356230
+ Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 0.9ms)
356231
+  (0.4ms) rollback transaction
356232
+  (0.0ms) begin transaction
356233
+ -------------------------------------------------------------------
356234
+ RailsIdentity::UsersControllerTest: test_cannot_update_another_user
356235
+ -------------------------------------------------------------------
356236
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356237
+ Processing by RailsIdentity::UsersController#update as HTML
356238
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"2"}
356239
+ Accepts a token
356240
+ Token well formatted for user 1,
356241
+ session 1
356242
+ Cache miss. Try database.
356243
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356244
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356245
+ Token well formatted and verified. Set cache.
356246
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356247
+ Attempting to get RailsIdentity::User 2
356248
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
356249
+ Checking to see if authorized to access object
356250
+ 401 - Repia::Errors::Unauthorized
356251
+ Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
356252
+  (0.1ms) rollback transaction
356253
+  (0.0ms) begin transaction
356254
+ ---------------------------------------------------------------
356255
+ RailsIdentity::UsersControllerTest: test_cannot_show_other_user
356256
+ ---------------------------------------------------------------
356257
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356258
+ Processing by RailsIdentity::UsersController#show as HTML
356259
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"2"}
356260
+ Requires a token
356261
+ Token well formatted for user 1,
356262
+ session 1
356263
+ Cache miss. Try database.
356264
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356265
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356266
+ Token well formatted and verified. Set cache.
356267
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356268
+ Attempting to get RailsIdentity::User 2
356269
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
356270
+ Checking to see if authorized to access object
356271
+ 401 - Repia::Errors::Unauthorized
356272
+ Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
356273
+  (0.1ms) rollback transaction
356274
+  (0.1ms) begin transaction
356275
+ ------------------------------------------------------------
356276
+ RailsIdentity::UsersControllerTest: test_show_a_current_user
356277
+ ------------------------------------------------------------
356278
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356279
+ Processing by RailsIdentity::UsersController#show as HTML
356280
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"current"}
356281
+ Requires a token
356282
+ Token well formatted for user 1,
356283
+ session 1
356284
+ Cache miss. Try database.
356285
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356286
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356287
+ Token well formatted and verified. Set cache.
356288
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356289
+ Attempting to get RailsIdentity::User 1
356290
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356291
+ Checking to see if authorized to access object
356292
+ Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.2ms)
356293
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356294
+  (0.1ms) rollback transaction
356295
+  (0.0ms) begin transaction
356296
+ --------------------------------------------------------------------
356297
+ RailsIdentity::UsersControllerTest: test_cannot_update_invalid_email
356298
+ --------------------------------------------------------------------
356299
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356300
+ Processing by RailsIdentity::UsersController#update as HTML
356301
+ Parameters: {"username"=>"foobar", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"1"}
356302
+ Accepts a token
356303
+ Token well formatted for user 1,
356304
+ session 1
356305
+ Cache miss. Try database.
356306
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356307
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356308
+ Token well formatted and verified. Set cache.
356309
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356310
+ Attempting to get RailsIdentity::User 1
356311
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356312
+ Checking to see if authorized to access object
356313
+ Unpermitted parameters: token, id
356314
+  (0.1ms) SAVEPOINT active_record_1
356315
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foobar' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
356316
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
356317
+ Completed 400 Bad Request in 7ms (Views: 0.2ms | ActiveRecord: 0.4ms)
356318
+  (0.0ms) rollback transaction
356319
+  (0.0ms) begin transaction
356320
+ ------------------------------------------------------------
356321
+ RailsIdentity::UsersControllerTest: test_update_current_user
356322
+ ------------------------------------------------------------
356323
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356324
+ Processing by RailsIdentity::UsersController#update as HTML
356325
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"current"}
356326
+ Accepts a token
356327
+ Token well formatted for user 1,
356328
+ session 1
356329
+ Cache miss. Try database.
356330
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356331
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356332
+ Token well formatted and verified. Set cache.
356333
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356334
+ Attempting to get RailsIdentity::User 1
356335
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356336
+ Checking to see if authorized to access object
356337
+ Unpermitted parameters: token, id
356338
+  (0.0ms) SAVEPOINT active_record_1
356339
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
356340
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-23 05:21:10.073993"], ["uuid", "1"]]
356341
+  (0.0ms) RELEASE SAVEPOINT active_record_1
356342
+ Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 0.4ms)
356343
+  (0.5ms) rollback transaction
356344
+  (0.1ms) begin transaction
356345
+ -------------------------------------------------------------------
356346
+ RailsIdentity::UsersControllerTest: test_cannot_delete_another_user
356347
+ -------------------------------------------------------------------
356348
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356349
+ Processing by RailsIdentity::UsersController#destroy as HTML
356350
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"2"}
356351
+ Requires a token
356352
+ Token well formatted for user 1,
356353
+ session 1
356354
+ Cache miss. Try database.
356355
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356356
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356357
+ Token well formatted and verified. Set cache.
356358
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356359
+ Attempting to get RailsIdentity::User 2
356360
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
356361
+ Checking to see if authorized to access object
356362
+ 401 - Repia::Errors::Unauthorized
356363
+ Completed 401 Unauthorized in 6ms (Views: 0.2ms | ActiveRecord: 0.2ms)
356364
+  (0.1ms) rollback transaction
356365
+  (0.1ms) begin transaction
356366
+ ---------------------------------------------------------------------------------------------
356367
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_non-existing_token
356368
+ ---------------------------------------------------------------------------------------------
356369
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356370
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356371
+ Processing by RailsIdentity::UsersController#show as HTML
356372
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjEzODg4NzAsImV4cCI6MTQ2MTM4ODkzMH0.arAfkYJ926GGfL4tiwA6n7Ybj7t9w73jq00JaVQXnIY", "id"=>"1"}
356373
+ Requires a token
356374
+ Token well formatted for user 1,
356375
+ session 1
356376
+ Cache miss. Try database.
356377
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356378
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356379
+ Signature verification raised
356380
+ 401 - Cannot verify token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjEzODg4NzAsImV4cCI6MTQ2MTM4ODkzMH0.arAfkYJ926GGfL4tiwA6n7Ybj7t9w73jq00JaVQXnIY
356381
+ Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
356382
+  (0.1ms) rollback transaction
356383
+  (0.0ms) begin transaction
356384
+ ------------------------------------------------------
356385
+ RailsIdentity::UsersControllerTest: test_create_a_user
356386
+ ------------------------------------------------------
356387
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356388
+ Processing by RailsIdentity::UsersController#create as HTML
356389
+ Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
356390
+ Accepts a token
356391
+ Token decode error: Nil JSON web token
356392
+ Suppressing error: Invalid token:
356393
+ Create new user
356394
+  (0.0ms) SAVEPOINT active_record_1
356395
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
356396
+ SQL (0.2ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$.AIlpiVAlOZZbhRrZaeRoufcKRGq/wwTfqkHMfdHgRIwpjlHiRhjG"], ["role", 10], ["created_at", "2016-04-23 05:21:10.103669"], ["updated_at", "2016-04-23 05:21:10.103669"], ["uuid", "30513e0a-0913-11e6-a596-6c4008a6fa2a"]]
356397
+  (0.0ms) RELEASE SAVEPOINT active_record_1
356398
+  (0.0ms) SAVEPOINT active_record_1
356399
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "30513e0a-0913-11e6-a596-6c4008a6fa2a"], ["uuid", "30517a64-0913-11e6-a596-6c4008a6fa2a"], ["secret", "d2c2a6fb-3163-487d-93cb-227dc9cf95f1"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIzMDUxM2UwYS0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIzMDUxN2E2NC0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4ODcwLCJleHAiOjE0NjEzOTI0NzB9.dNnr8joRKtYfpZ7dxjwmwkdXWxthetk1Ig2SO2owKdw"], ["created_at", "2016-04-23 05:21:10.105975"], ["updated_at", "2016-04-23 05:21:10.105975"]]
356400
+  (0.0ms) RELEASE SAVEPOINT active_record_1
356401
+  (0.0ms) SAVEPOINT active_record_1
356402
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '30513e0a-0913-11e6-a596-6c4008a6fa2a') LIMIT 1
356403
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIzMDUxM2UwYS0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIzMDUxN2E2NC0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4ODcwLCJleHAiOjE0NjEzOTI0NzB9.dNnr8joRKtYfpZ7dxjwmwkdXWxthetk1Ig2SO2owKdw"], ["updated_at", "2016-04-23 05:21:10.107464"], ["uuid", "30513e0a-0913-11e6-a596-6c4008a6fa2a"]]
356404
+  (0.0ms) RELEASE SAVEPOINT active_record_1
356405
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "30513e0a-0913-11e6-a596-6c4008a6fa2a"]]
356406
+ [ActiveJob] [ActionMailer::DeliveryJob] [b0daeca5-8828-4356-90bf-cdbfdc68316e] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/30513e0a-0913-11e6-a596-6c4008a6fa2a
356407
+ [ActiveJob] [ActionMailer::DeliveryJob] [b0daeca5-8828-4356-90bf-cdbfdc68316e] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
356408
+ [ActiveJob] [ActionMailer::DeliveryJob] [b0daeca5-8828-4356-90bf-cdbfdc68316e] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
356409
+ [ActiveJob] [ActionMailer::DeliveryJob] [b0daeca5-8828-4356-90bf-cdbfdc68316e]
356410
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.4ms
356411
+ [ActiveJob] [ActionMailer::DeliveryJob] [b0daeca5-8828-4356-90bf-cdbfdc68316e]
356412
+ Sent mail to foo@example.com (3.6ms)
356413
+ [ActiveJob] [ActionMailer::DeliveryJob] [b0daeca5-8828-4356-90bf-cdbfdc68316e] Date: Sat, 23 Apr 2016 00:21:10 -0500
356414
+ From: no-reply@rails-identity.com
356415
+ To: foo@example.com
356416
+ Message-ID: <571b06461bfbe_86873fd0ee452460201a6@galt.local.mail>
356417
+ Subject: [rails-identity] Email Confirmation
356418
+ Mime-Version: 1.0
356419
+ Content-Type: multipart/alternative;
356420
+ boundary="--==_mimepart_571b06461b683_86873fd0ee452460200be";
356421
+ charset=UTF-8
356422
+ Content-Transfer-Encoding: 7bit
356423
+
356424
+
356425
+ ----==_mimepart_571b06461b683_86873fd0ee452460200be
356426
+ Content-Type: text/plain;
356427
+ charset=UTF-8
356428
+ Content-Transfer-Encoding: 7bit
356429
+
356430
+ Dear foo@example.com,
356431
+
356432
+ Please confirm your account with rails-identity by making a PATCH request
356433
+ on the current user with a provided verification token. For example,
356434
+
356435
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIzMDUxM2UwYS0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIzMDUxN2E2NC0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4ODcwLCJleHAiOjE0NjEzOTI0NzB9.dNnr8joRKtYfpZ7dxjwmwkdXWxthetk1Ig2SO2owKdw verified=true
356436
+
356437
+ will confirm the account. Here is the verification token:
356438
+
356439
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIzMDUxM2UwYS0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIzMDUxN2E2NC0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4ODcwLCJleHAiOjE0NjEzOTI0NzB9.dNnr8joRKtYfpZ7dxjwmwkdXWxthetk1Ig2SO2owKdw
356440
+
356441
+ Thank you for using rails-identity,
356442
+ rails-identity
356443
+
356444
+
356445
+ ----==_mimepart_571b06461b683_86873fd0ee452460200be
356446
+ Content-Type: text/html;
356447
+ charset=UTF-8
356448
+ Content-Transfer-Encoding: 7bit
356449
+
356450
+ <html>
356451
+ <body>
356452
+ <p>Dear foo@example.com,</p>
356453
+
356454
+ <p>Please confirm your account with rails-identity by making a PATCH request
356455
+ on the current user with a provided verification token. For example,
356456
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIzMDUxM2UwYS0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIzMDUxN2E2NC0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4ODcwLCJleHAiOjE0NjEzOTI0NzB9.dNnr8joRKtYfpZ7dxjwmwkdXWxthetk1Ig2SO2owKdw
356457
+ verified=true</pre> will confirm the account. Here is the verification
356458
+ token:</p>
356459
+
356460
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIzMDUxM2UwYS0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIzMDUxN2E2NC0wOTEzLTExZTYtYTU5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg4ODcwLCJleHAiOjE0NjEzOTI0NzB9.dNnr8joRKtYfpZ7dxjwmwkdXWxthetk1Ig2SO2owKdw</pre>
356461
+
356462
+ <p>Thank you for using rails-identity</p>
356463
+ <p><b>rails-identity</b></p>
356464
+
356465
+ </body>
356466
+ </html>
356467
+
356468
+ ----==_mimepart_571b06461b683_86873fd0ee452460200be--
356469
+
356470
+ [ActiveJob] [ActionMailer::DeliveryJob] [b0daeca5-8828-4356-90bf-cdbfdc68316e] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.52ms
356471
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: b0daeca5-8828-4356-90bf-cdbfdc68316e) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/30513e0a-0913-11e6-a596-6c4008a6fa2a
356472
+ Completed 201 Created in 17ms (Views: 0.3ms | ActiveRecord: 0.8ms)
356473
+  (0.7ms) rollback transaction
356474
+  (0.0ms) begin transaction
356475
+ ------------------------------------------------------
356476
+ RailsIdentity::UsersControllerTest: test_update_a_user
356477
+ ------------------------------------------------------
356478
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356479
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356480
+ Processing by RailsIdentity::UsersController#update as HTML
356481
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"1"}
356482
+ Accepts a token
356483
+ Token well formatted for user 1,
356484
+ session 1
356485
+ Cache miss. Try database.
356486
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356487
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356488
+ Token well formatted and verified. Set cache.
356489
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356490
+ Attempting to get RailsIdentity::User 1
356491
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356492
+ Checking to see if authorized to access object
356493
+ Unpermitted parameters: token, id
356494
+  (0.1ms) SAVEPOINT active_record_1
356495
+ RailsIdentity::User Exists (0.1ms) SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foo@example.com' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
356496
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-23 05:21:10.128547"], ["uuid", "1"]]
356497
+  (0.0ms) RELEASE SAVEPOINT active_record_1
356498
+ Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 0.6ms)
356499
+  (0.4ms) rollback transaction
356500
+  (0.0ms) begin transaction
356501
+ ---------------------------------------------------------------------------
356502
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_no_token_payload
356503
+ ---------------------------------------------------------------------------
356504
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356505
+ Processing by RailsIdentity::UsersController#show as HTML
356506
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.kBb1VjzkLi9crkRtC3dduFjrhY2J2LTdXW5QSWlawN8", "id"=>"1"}
356507
+ Requires a token
356508
+ User UUID or session UUID is nil
356509
+ 401 - Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.kBb1VjzkLi9crkRtC3dduFjrhY2J2LTdXW5QSWlawN8
356510
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
356511
+  (0.1ms) rollback transaction
356512
+  (0.0ms) begin transaction
356513
+ --------------------------------------------------------------------
356514
+ RailsIdentity::UsersControllerTest: test_admin_can_delete_other_user
356515
+ --------------------------------------------------------------------
356516
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356517
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
356518
+ Processing by RailsIdentity::UsersController#destroy as HTML
356519
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM5MjY4fQ.MoyklN4m1nP5DPiKHi-KjRSIl7ygkAlFxDY6OoDjyRU", "id"=>"1"}
356520
+ Requires a token
356521
+ Token well formatted for user admin_one,
356522
+ session session_admin_one
356523
+ Cache miss. Try database.
356524
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
356525
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
356526
+ Token well formatted and verified. Set cache.
356527
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "admin_one"]]
356528
+ Attempting to get RailsIdentity::User 1
356529
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356530
+ Checking to see if authorized to access object
356531
+  (0.0ms) SAVEPOINT active_record_1
356532
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "deleted_at" = '2016-04-23 05:21:10.144011' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
356533
+  (0.0ms) RELEASE SAVEPOINT active_record_1
356534
+ Rendered text template (0.0ms)
356535
+ Completed 204 No Content in 5ms (Views: 0.4ms | ActiveRecord: 0.4ms)
356536
+  (0.3ms) rollback transaction
356537
+  (0.1ms) begin transaction
356538
+ -----------------------------------------------------------------------
356539
+ RailsIdentity::UsersControllerTest: test_cannot_show_a_nonexisting_user
356540
+ -----------------------------------------------------------------------
356541
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356542
+ Processing by RailsIdentity::UsersController#show as HTML
356543
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzkyNjh9.2NasNPDscrQ2h3pnTqQaI5o9HCX7zaruBWNVB9C92RQ", "id"=>"999"}
356544
+ Requires a token
356545
+ Token well formatted for user 1,
356546
+ session 1
356547
+ Cache miss. Try database.
356548
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356549
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356550
+ Token well formatted and verified. Set cache.
356551
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
356552
+ Attempting to get RailsIdentity::User 999
356553
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "999"]]
356554
+ 404 - RailsIdentity::User 999 cannot be found
356555
+ Completed 404 Not Found in 7ms (Views: 0.4ms | ActiveRecord: 0.3ms)
356556
+  (0.1ms) rollback transaction