rails-identity 0.2.2 → 0.2.3

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: 4cb82c7f6f145e5bcec2c40f74aae1c2ed5e471b
4
- data.tar.gz: 46995f333ed1e54bf17ba0b455b3b74c625ac712
3
+ metadata.gz: 13d1f01c0a93ffb9ea2548258bf1b63a261085bf
4
+ data.tar.gz: 4edfcaca8bc9d151a62799c54c1451fd51592196
5
5
  SHA512:
6
- metadata.gz: 1665d836fc41cd6888b014625165942ba76922a3679cd4bbdd63b8c4e13af7dd661c19e26e399e8d655615f001c922ca9e8d69158e6230e5322ff3454e7b8332
7
- data.tar.gz: b6c0d8ec07d70059a468b5c148bd1e50349ac0c5583accaff9c38a59c1fc837d75b46c4944e7819b784d940968113c96dd3b761e4ec9de62ef0f32d5de712982
6
+ metadata.gz: 2acceb4c9f742fd0ea740639f4b316e72d061e09dc56f46a6fe88bcadbfaedea0a9a9ddfbf12fcee5ed9f75d06b146c9c8d2a0ebdab429ec1ad07affd42f1ce5
7
+ data.tar.gz: e981b7d80ad98a39af5a0ed1d69b2f0cfd488f8914dbaa5e398f70a9438b5bef5a88828fc40cfcb7bf16eb57d3449d7e9ae89029fd2a1c1e76b32e95b4544157
@@ -1,5 +1,6 @@
1
1
  module RailsIdentity
2
2
  module ApplicationHelper
3
+ include Repia::BaseHelper
3
4
 
4
5
  ##
5
6
  # Helper method to get the user object in the request, which is
@@ -30,22 +31,6 @@ module RailsIdentity
30
31
  end
31
32
  end
32
33
 
33
- ##
34
- # Finds an object by model and UUID and throws an error (which will be
35
- # caught and re-thrown as an HTTP error.)
36
- #
37
- # An Repia::Errors::NotFound is raised if specified to do so when
38
- # the object could not be found using the uuid.
39
- #
40
- def find_object(model, uuid, error: Repia::Errors::NotFound)
41
- logger.debug("Attempting to get #{model.name} #{uuid}")
42
- obj = model.find_by_uuid(uuid)
43
- if obj.nil? && !error.nil?
44
- raise error, "#{model.name} #{uuid} cannot be found"
45
- end
46
- return obj
47
- end
48
-
49
34
  ##
50
35
  # Requires a token.
51
36
  #
@@ -1,3 +1,3 @@
1
1
  module RailsIdentity
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
Binary file
@@ -361876,3 +361876,3551 @@ RailsIdentity::UserTest: test_user_has_a_role_of_100_by_default
361876
361876
  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$J0OpVe5gtlKKV/TIaTxdDuvpp3HeHDmkSsTt2V.GQf2ngibBwS42u"], ["role", 10], ["created_at", "2016-04-26 03:12:13.445407"], ["updated_at", "2016-04-26 03:12:13.445407"], ["uuid", "ac262360-0b5c-11e6-8db0-6c4008a6fa2a"]]
361877
361877
   (0.0ms) RELEASE SAVEPOINT active_record_1
361878
361878
   (0.4ms) rollback transaction
361879
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
361880
+  (0.1ms) begin transaction
361881
+ Fixture Delete (1.1ms) DELETE FROM "rails_identity_sessions"
361882
+ Fixture Insert (0.1ms) INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('1', '1', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY', 'secret', '2016-04-29 03:42:51', '2016-04-29 03:42:51')
361883
+ Fixture Insert (0.1ms) INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('2', '2', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIyIiwidXNlcl91dWlkIjoiMiIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.4awG-bwYEtRDPgAZZzpxomg6modmaLPHw7i0sZoVGxE', 'secret', '2016-04-29 03:42:51', '2016-04-29 03:42:51')
361884
+ Fixture Insert (0.1ms) INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('session_admin_one', 'admin_one', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxOTUxNzcwfQ.MYh7wI1Vp32qGU0nMUUx1M9vNWYfxBfkRL9YBSdp6D0', 'secret', '2016-04-29 03:42:51', '2016-04-29 03:42:51')
361885
+ Fixture Delete (0.8ms) DELETE FROM "rails_identity_users"
361886
+ 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$CGTzI/FIkcS5wZpw9cwXPObVzB7K0mHLgpj5s/zoQMtAgvCx8UxYS', 10, 't', '2016-04-29 03:42:51', '2016-04-29 03:42:51')
361887
+ 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$uNYD/yS9nrC7SBqs5ocJeeF9AgGWfAlxwdCQKOK5ScT6CCnFVCwh2', 10, 't', '2016-04-29 03:42:51', '2016-04-29 03:42:51')
361888
+ 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$JBxULPzD468xe1k5oTTJCu8OlTeDE2Vt3IFBc8Yj2LDW1FTwMkWWy', 100, 't', '2016-04-29 03:42:51', '2016-04-29 03:42:51')
361889
+  (0.9ms) commit transaction
361890
+  (0.0ms) begin transaction
361891
+ ------------------------------------------------------------------
361892
+ RailsIdentity::SessionsControllerTest: test_public_can_see_options
361893
+ ------------------------------------------------------------------
361894
+ RailsIdentity::Session Load (0.2ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
361895
+ Processing by RailsIdentity::SessionsController#options as HTML
361896
+ Rendered text template (0.0ms)
361897
+ Completed 200 OK in 8ms (Views: 7.4ms | ActiveRecord: 0.0ms)
361898
+  (0.1ms) rollback transaction
361899
+  (0.0ms) begin transaction
361900
+ -----------------------------------------------------------------------
361901
+ RailsIdentity::SessionsControllerTest: test_public_cannot_list_sessions
361902
+ -----------------------------------------------------------------------
361903
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
361904
+ Processing by RailsIdentity::SessionsController#index as HTML
361905
+ Requires a token
361906
+ Token decode error: Nil JSON web token
361907
+ 401 - Invalid token:
361908
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
361909
+  (0.1ms) rollback transaction
361910
+  (0.0ms) begin transaction
361911
+ --------------------------------------------------------------------------
361912
+ RailsIdentity::SessionsControllerTest: test_admin_can_show_other's_session
361913
+ --------------------------------------------------------------------------
361914
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
361915
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
361916
+ Processing by RailsIdentity::SessionsController#show as HTML
361917
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxOTUxNzcwfQ.MYh7wI1Vp32qGU0nMUUx1M9vNWYfxBfkRL9YBSdp6D0", "id"=>"1"}
361918
+ Requires a token
361919
+ Token well formatted for user admin_one,
361920
+ session session_admin_one
361921
+ Cache miss. Try database.
361922
+ 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"]]
361923
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
361924
+ Token well formatted and verified. Set cache.
361925
+ 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"]]
361926
+ Attempting to get RailsIdentity::Session 1
361927
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
361928
+ Checking to see if authorized to access object
361929
+ Completed 200 OK in 61ms (Views: 0.6ms | ActiveRecord: 0.3ms)
361930
+  (0.1ms) rollback transaction
361931
+  (0.0ms) begin transaction
361932
+ ---------------------------------------------------------------------------------------------------
361933
+ RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions_using_user_id_in_routing
361934
+ ---------------------------------------------------------------------------------------------------
361935
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
361936
+ 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"]]
361937
+ Processing by RailsIdentity::SessionsController#index as HTML
361938
+ Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY"}
361939
+ Requires a token
361940
+ Token well formatted for user 1,
361941
+ session 1
361942
+ Cache miss. Try database.
361943
+ 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"]]
361944
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
361945
+ Token well formatted and verified. Set cache.
361946
+ 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"]]
361947
+ Attempting to get user 1
361948
+ Attempting to get RailsIdentity::User 1
361949
+ 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"]]
361950
+ Checking to see if authorized to access object
361951
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
361952
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [6a7cd2f9-489f-4905-946e-9dbff68e65c6] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
361953
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [6a7cd2f9-489f-4905-946e-9dbff68e65c6] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 4.32ms
361954
+ [ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: 6a7cd2f9-489f-4905-946e-9dbff68e65c6) to Inline(default)
361955
+ Completed 200 OK in 25ms (Views: 0.7ms | ActiveRecord: 0.3ms)
361956
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
361957
+ 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"]]
361958
+  (0.1ms) rollback transaction
361959
+  (0.0ms) begin transaction
361960
+ --------------------------------------------------------------------------
361961
+ RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions
361962
+ --------------------------------------------------------------------------
361963
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
361964
+ Processing by RailsIdentity::SessionsController#index as HTML
361965
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY"}
361966
+ Requires a token
361967
+ Token well formatted for user 1,
361968
+ session 1
361969
+ Cache miss. Try database.
361970
+ 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"]]
361971
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
361972
+ Token well formatted and verified. Set cache.
361973
+ 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"]]
361974
+ Attempting to get user
361975
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
361976
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [73cbd745-6eb8-4cdc-be8c-3845bde433df] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
361977
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [73cbd745-6eb8-4cdc-be8c-3845bde433df] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 0.06ms
361978
+ [ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: 73cbd745-6eb8-4cdc-be8c-3845bde433df) to Inline(default)
361979
+ Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 0.3ms)
361980
+ 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"]]
361981
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
361982
+ 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"]]
361983
+  (0.1ms) rollback transaction
361984
+  (0.1ms) begin transaction
361985
+ -----------------------------------------------------------------------------------
361986
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_if_not_verified
361987
+ -----------------------------------------------------------------------------------
361988
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
361989
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
361990
+  (0.0ms) SAVEPOINT active_record_1
361991
+ 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
361992
+ SQL (0.3ms) UPDATE "rails_identity_users" SET "verified" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verified", "f"], ["updated_at", "2016-04-29 03:42:51.299339"], ["uuid", "1"]]
361993
+  (0.1ms) RELEASE SAVEPOINT active_record_1
361994
+ Processing by RailsIdentity::SessionsController#create as HTML
361995
+ Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
361996
+ 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"]]
361997
+ 401 - Repia::Errors::Unauthorized
361998
+ Completed 401 Unauthorized in 70ms (Views: 0.2ms | ActiveRecord: 0.1ms)
361999
+  (0.5ms) rollback transaction
362000
+  (0.0ms) begin transaction
362001
+ -----------------------------------------------------------------------
362002
+ RailsIdentity::SessionsControllerTest: test_cannot_show_expired_session
362003
+ -----------------------------------------------------------------------
362004
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362005
+ 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"]]
362006
+  (0.1ms) SAVEPOINT active_record_1
362007
+ SQL (0.3ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "72e195c8-0dbc-11e6-b033-6c4008a6fa2a"], ["secret", "ef5e89a1-2e56-4430-9d59-b45f3c9be49d"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzJlMTk1YzgtMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MSwiZXhwIjoxNDYxOTAxMzcwfQ._69ORpMvPuLfsUQ4fLAObp_c-PmJIDHg_F7mn9mXUtk"], ["created_at", "2016-04-29 03:42:51.389359"], ["updated_at", "2016-04-29 03:42:51.389359"]]
362008
+  (0.0ms) RELEASE SAVEPOINT active_record_1
362009
+ Processing by RailsIdentity::SessionsController#show as HTML
362010
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"72e195c8-0dbc-11e6-b033-6c4008a6fa2a"}
362011
+ Requires a token
362012
+ Token well formatted for user 1,
362013
+ session 1
362014
+ Cache miss. Try database.
362015
+ 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"]]
362016
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362017
+ Token well formatted and verified. Set cache.
362018
+ 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"]]
362019
+ Attempting to get RailsIdentity::Session 72e195c8-0dbc-11e6-b033-6c4008a6fa2a
362020
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "72e195c8-0dbc-11e6-b033-6c4008a6fa2a"]]
362021
+ Checking to see if authorized to access object
362022
+ 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"]]
362023
+  (0.1ms) SAVEPOINT active_record_1
362024
+ SQL (0.2ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "72e195c8-0dbc-11e6-b033-6c4008a6fa2a"]]
362025
+  (0.0ms) RELEASE SAVEPOINT active_record_1
362026
+ 404 - Repia::Errors::NotFound
362027
+ Completed 404 Not Found in 7ms (Views: 0.3ms | ActiveRecord: 0.5ms)
362028
+  (0.6ms) rollback transaction
362029
+  (0.0ms) begin transaction
362030
+ -----------------------------------------------------------------------------
362031
+ RailsIdentity::SessionsControllerTest: test_cannot_show_a_nonexisting_session
362032
+ -----------------------------------------------------------------------------
362033
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362034
+ Processing by RailsIdentity::SessionsController#show as HTML
362035
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"999"}
362036
+ Requires a token
362037
+ Token well formatted for user 1,
362038
+ session 1
362039
+ Cache miss. Try database.
362040
+ 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"]]
362041
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362042
+ Token well formatted and verified. Set cache.
362043
+ 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"]]
362044
+ Attempting to get RailsIdentity::Session 999
362045
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "999"]]
362046
+ 404 - RailsIdentity::Session 999 cannot be found
362047
+ Completed 404 Not Found in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
362048
+  (0.1ms) rollback transaction
362049
+  (0.1ms) begin transaction
362050
+ --------------------------------------------------------------------------------
362051
+ RailsIdentity::SessionsControllerTest: test_cannot_delete_a_non-existent_session
362052
+ --------------------------------------------------------------------------------
362053
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362054
+ Processing by RailsIdentity::SessionsController#destroy as HTML
362055
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"999"}
362056
+ Requires a token
362057
+ Token well formatted for user 1,
362058
+ session 1
362059
+ Cache miss. Try database.
362060
+ 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"]]
362061
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362062
+ Token well formatted and verified. Set cache.
362063
+ 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"]]
362064
+ Attempting to get RailsIdentity::Session 999
362065
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "999"]]
362066
+ 404 - RailsIdentity::Session 999 cannot be found
362067
+ Completed 404 Not Found in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
362068
+  (0.1ms) rollback transaction
362069
+  (0.0ms) begin transaction
362070
+ -----------------------------------------------------------------------------------------
362071
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_a_wrong_password
362072
+ -----------------------------------------------------------------------------------------
362073
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362074
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362075
+ Processing by RailsIdentity::SessionsController#create as HTML
362076
+ Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
362077
+ 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"]]
362078
+ Attempting to get user
362079
+ Completed 401 Unauthorized in 66ms (Views: 0.3ms | ActiveRecord: 0.1ms)
362080
+  (0.1ms) rollback transaction
362081
+  (0.0ms) begin transaction
362082
+ ------------------------------------------------------------
362083
+ RailsIdentity::SessionsControllerTest: test_delete_a_session
362084
+ ------------------------------------------------------------
362085
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362086
+ Processing by RailsIdentity::SessionsController#destroy as HTML
362087
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"1"}
362088
+ Requires a token
362089
+ Token well formatted for user 1,
362090
+ session 1
362091
+ Cache miss. Try database.
362092
+ 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"]]
362093
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362094
+ Token well formatted and verified. Set cache.
362095
+ 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"]]
362096
+ Attempting to get RailsIdentity::Session 1
362097
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362098
+ Checking to see if authorized to access object
362099
+ 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"]]
362100
+  (0.0ms) SAVEPOINT active_record_1
362101
+ SQL (0.1ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
362102
+  (0.0ms) RELEASE SAVEPOINT active_record_1
362103
+ Rendered text template (0.0ms)
362104
+ Completed 204 No Content in 6ms (Views: 0.4ms | ActiveRecord: 0.4ms)
362105
+  (0.4ms) rollback transaction
362106
+  (0.0ms) begin transaction
362107
+ -----------------------------------------------------------------------------
362108
+ RailsIdentity::SessionsControllerTest: test_user_cannot_list_other's_sessions
362109
+ -----------------------------------------------------------------------------
362110
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362111
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
362112
+ Processing by RailsIdentity::SessionsController#index as HTML
362113
+ Parameters: {"user_id"=>"2", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY"}
362114
+ Requires a token
362115
+ Token well formatted for user 1,
362116
+ session 1
362117
+ Cache miss. Try database.
362118
+ 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"]]
362119
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362120
+ Token well formatted and verified. Set cache.
362121
+ 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"]]
362122
+ Attempting to get user 2
362123
+ Attempting to get RailsIdentity::User 2
362124
+ 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"]]
362125
+ Checking to see if authorized to access object
362126
+ 401 - Not authorized to access user 2
362127
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
362128
+  (0.1ms) rollback transaction
362129
+  (0.0ms) begin transaction
362130
+ ----------------------------------------------------------------------------
362131
+ RailsIdentity::SessionsControllerTest: test_user_cannot_list_expired_session
362132
+ ----------------------------------------------------------------------------
362133
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362134
+ 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"]]
362135
+  (0.0ms) SAVEPOINT active_record_1
362136
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "72f6e3b0-0dbc-11e6-b033-6c4008a6fa2a"], ["secret", "99918455-2d62-4e4c-8702-bcd1227c2d80"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzJmNmUzYjAtMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MSwiZXhwIjoxNDYxOTAxMzcwfQ.SS5rB9iW3mILzzousIxdCmXWs-wogkpJKxy9Uk2w-7E"], ["created_at", "2016-04-29 03:42:51.518185"], ["updated_at", "2016-04-29 03:42:51.518185"]]
362137
+  (0.0ms) RELEASE SAVEPOINT active_record_1
362138
+ Processing by RailsIdentity::SessionsController#index as HTML
362139
+ Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY"}
362140
+ Requires a token
362141
+ Token well formatted for user 1,
362142
+ session 1
362143
+ Cache miss. Try database.
362144
+ 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"]]
362145
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362146
+ Token well formatted and verified. Set cache.
362147
+ 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"]]
362148
+ Attempting to get user 1
362149
+ Attempting to get RailsIdentity::User 1
362150
+ 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"]]
362151
+ Checking to see if authorized to access object
362152
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
362153
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [8aea3d0f-3101-4744-9c0f-3ee4a2fb99a0] Performing RailsIdentity::SessionsCleanupJob from Inline(default) with arguments: "72f6e3b0-0dbc-11e6-b033-6c4008a6fa2a"
362154
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [8aea3d0f-3101-4744-9c0f-3ee4a2fb99a0] RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "72f6e3b0-0dbc-11e6-b033-6c4008a6fa2a"]]
362155
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [8aea3d0f-3101-4744-9c0f-3ee4a2fb99a0]  (0.1ms) SAVEPOINT active_record_1
362156
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [8aea3d0f-3101-4744-9c0f-3ee4a2fb99a0] SQL (0.2ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "72f6e3b0-0dbc-11e6-b033-6c4008a6fa2a"]]
362157
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [8aea3d0f-3101-4744-9c0f-3ee4a2fb99a0]  (0.0ms) RELEASE SAVEPOINT active_record_1
362158
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [8aea3d0f-3101-4744-9c0f-3ee4a2fb99a0] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 1.62ms
362159
+ [ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: 8aea3d0f-3101-4744-9c0f-3ee4a2fb99a0) to Inline(default) with arguments: "72f6e3b0-0dbc-11e6-b033-6c4008a6fa2a"
362160
+ Completed 200 OK in 11ms (Views: 0.5ms | ActiveRecord: 0.7ms)
362161
+  (0.6ms) rollback transaction
362162
+  (0.0ms) begin transaction
362163
+ -----------------------------------------------------------------------
362164
+ RailsIdentity::SessionsControllerTest: test_cannot_show_other's_session
362165
+ -----------------------------------------------------------------------
362166
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362167
+ Processing by RailsIdentity::SessionsController#show as HTML
362168
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"2"}
362169
+ Requires a token
362170
+ Token well formatted for user 1,
362171
+ session 1
362172
+ Cache miss. Try database.
362173
+ 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"]]
362174
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362175
+ Token well formatted and verified. Set cache.
362176
+ 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"]]
362177
+ Attempting to get RailsIdentity::Session 2
362178
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2"]]
362179
+ Checking to see if authorized to access object
362180
+ 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"]]
362181
+ 401 - Repia::Errors::Unauthorized
362182
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
362183
+  (0.1ms) rollback transaction
362184
+  (0.1ms) begin transaction
362185
+ ------------------------------------------------------------------
362186
+ RailsIdentity::SessionsControllerTest: test_show_a_current_session
362187
+ ------------------------------------------------------------------
362188
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362189
+ Processing by RailsIdentity::SessionsController#show as HTML
362190
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"current"}
362191
+ Requires a token
362192
+ Token well formatted for user 1,
362193
+ session 1
362194
+ Cache miss. Try database.
362195
+ 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"]]
362196
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362197
+ Token well formatted and verified. Set cache.
362198
+ 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"]]
362199
+ Attempting to get RailsIdentity::Session 1
362200
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362201
+ Checking to see if authorized to access object
362202
+ 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"]]
362203
+ Completed 200 OK in 5ms (Views: 0.4ms | ActiveRecord: 0.2ms)
362204
+  (0.1ms) rollback transaction
362205
+  (0.0ms) begin transaction
362206
+ ----------------------------------------------------------------------------------------------
362207
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_non-existent_username
362208
+ ----------------------------------------------------------------------------------------------
362209
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362210
+ Processing by RailsIdentity::SessionsController#create as HTML
362211
+ Parameters: {"username"=>"idontexist", "password"=>"[FILTERED]"}
362212
+ 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", "idontexist"]]
362213
+ Attempting to get user
362214
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
362215
+  (0.1ms) rollback transaction
362216
+  (0.0ms) begin transaction
362217
+ -------------------------------------------------------------------------
362218
+ RailsIdentity::SessionsControllerTest: test_cannot_delete_other's_session
362219
+ -------------------------------------------------------------------------
362220
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362221
+ Processing by RailsIdentity::SessionsController#destroy as HTML
362222
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"2"}
362223
+ Requires a token
362224
+ Token well formatted for user 1,
362225
+ session 1
362226
+ Cache miss. Try database.
362227
+ 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"]]
362228
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362229
+ Token well formatted and verified. Set cache.
362230
+ 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"]]
362231
+ Attempting to get RailsIdentity::Session 2
362232
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2"]]
362233
+ Checking to see if authorized to access object
362234
+ 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"]]
362235
+ 401 - Repia::Errors::Unauthorized
362236
+ Completed 401 Unauthorized in 6ms (Views: 0.2ms | ActiveRecord: 0.3ms)
362237
+  (0.1ms) rollback transaction
362238
+  (0.0ms) begin transaction
362239
+ ----------------------------------------------------------------------------
362240
+ RailsIdentity::SessionsControllerTest: test_admin_can_delete_other's_session
362241
+ ----------------------------------------------------------------------------
362242
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362243
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
362244
+ Processing by RailsIdentity::SessionsController#destroy as HTML
362245
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxOTUxNzcwfQ.MYh7wI1Vp32qGU0nMUUx1M9vNWYfxBfkRL9YBSdp6D0", "id"=>"1"}
362246
+ Requires a token
362247
+ Token well formatted for user admin_one,
362248
+ session session_admin_one
362249
+ Cache miss. Try database.
362250
+ 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"]]
362251
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
362252
+ Token well formatted and verified. Set cache.
362253
+ 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"]]
362254
+ Attempting to get RailsIdentity::Session 1
362255
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362256
+ Checking to see if authorized to access object
362257
+  (0.1ms) SAVEPOINT active_record_1
362258
+ SQL (0.9ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
362259
+  (0.2ms) RELEASE SAVEPOINT active_record_1
362260
+ Rendered text template (0.0ms)
362261
+ Completed 204 No Content in 8ms (Views: 0.9ms | ActiveRecord: 1.3ms)
362262
+  (0.8ms) rollback transaction
362263
+  (0.1ms) begin transaction
362264
+ ------------------------------------------------------------
362265
+ RailsIdentity::SessionsControllerTest: test_create_a_session
362266
+ ------------------------------------------------------------
362267
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362268
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362269
+ Processing by RailsIdentity::SessionsController#create as HTML
362270
+ Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
362271
+ 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"]]
362272
+  (0.1ms) SAVEPOINT active_record_1
362273
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "73126004-0dbc-11e6-b033-6c4008a6fa2a"], ["secret", "86da4031-faf8-43b2-a48b-c4bc8c8da7f6"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzMxMjYwMDQtMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MSwiZXhwIjoxNDYzMTEwOTcxfQ.yxji_g9CIZO5b4BdHAQ_jFLe5SFS_2jrxzvA0dcuKwg"], ["created_at", "2016-04-29 03:42:51.698642"], ["updated_at", "2016-04-29 03:42:51.698642"]]
362274
+  (0.0ms) RELEASE SAVEPOINT active_record_1
362275
+ Completed 201 Created in 71ms (Views: 0.4ms | ActiveRecord: 0.4ms)
362276
+  (0.5ms) rollback transaction
362277
+  (0.1ms) begin transaction
362278
+ ------------------------------------------------------------------------------------
362279
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_username
362280
+ ------------------------------------------------------------------------------------
362281
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362282
+ Processing by RailsIdentity::SessionsController#create as HTML
362283
+ Parameters: {"password"=>"[FILTERED]"}
362284
+ 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
362285
+ Attempting to get user
362286
+ Completed 401 Unauthorized in 2ms (Views: 0.3ms | ActiveRecord: 0.1ms)
362287
+  (0.1ms) rollback transaction
362288
+  (0.0ms) begin transaction
362289
+ --------------------------------------------------------------------------------------
362290
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_a_password
362291
+ --------------------------------------------------------------------------------------
362292
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362293
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362294
+ Processing by RailsIdentity::SessionsController#create as HTML
362295
+ Parameters: {"username"=>"one@example.com"}
362296
+ 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"]]
362297
+ Attempting to get user
362298
+ Completed 401 Unauthorized in 66ms (Views: 0.3ms | ActiveRecord: 0.1ms)
362299
+  (0.1ms) rollback transaction
362300
+  (0.1ms) begin transaction
362301
+ ----------------------------------------------------------
362302
+ RailsIdentity::SessionsControllerTest: test_show_a_session
362303
+ ----------------------------------------------------------
362304
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362305
+ Processing by RailsIdentity::SessionsController#show as HTML
362306
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"1"}
362307
+ Requires a token
362308
+ Token well formatted for user 1,
362309
+ session 1
362310
+ Cache miss. Try database.
362311
+ 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"]]
362312
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362313
+ Token well formatted and verified. Set cache.
362314
+ 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"]]
362315
+ Attempting to get RailsIdentity::Session 1
362316
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362317
+ Checking to see if authorized to access object
362318
+ 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"]]
362319
+ Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms)
362320
+  (0.1ms) rollback transaction
362321
+  (0.1ms) begin transaction
362322
+ ----------------------------------------------------------------------
362323
+ RailsIdentity::SessionsControllerTest: test_public_cannot_show_session
362324
+ ----------------------------------------------------------------------
362325
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362326
+ Processing by RailsIdentity::SessionsController#show as HTML
362327
+ Parameters: {"id"=>"1"}
362328
+ Requires a token
362329
+ Token decode error: Nil JSON web token
362330
+ 401 - Invalid token:
362331
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
362332
+  (0.1ms) rollback transaction
362333
+  (0.0ms) begin transaction
362334
+ -------------------------------------------------------------------------
362335
+ RailsIdentity::SessionsControllerTest: test_public_cannot_create_sessions
362336
+ -------------------------------------------------------------------------
362337
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362338
+ Processing by RailsIdentity::SessionsController#index as HTML
362339
+ Requires a token
362340
+ Token decode error: Nil JSON web token
362341
+ 401 - Invalid token:
362342
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
362343
+  (0.1ms) rollback transaction
362344
+  (0.0ms) begin transaction
362345
+ --------------------------------------------------------------------
362346
+ RailsIdentity::SessionsControllerTest: test_delete_a_current_session
362347
+ --------------------------------------------------------------------
362348
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362349
+ Processing by RailsIdentity::SessionsController#destroy as HTML
362350
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"current"}
362351
+ Requires a token
362352
+ Token well formatted for user 1,
362353
+ session 1
362354
+ Cache miss. Try database.
362355
+ 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"]]
362356
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362357
+ Token well formatted and verified. Set cache.
362358
+ 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"]]
362359
+ Attempting to get RailsIdentity::Session 1
362360
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362361
+ Checking to see if authorized to access object
362362
+ 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"]]
362363
+  (0.1ms) SAVEPOINT active_record_1
362364
+ SQL (0.1ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
362365
+  (0.0ms) RELEASE SAVEPOINT active_record_1
362366
+ Rendered text template (0.0ms)
362367
+ Completed 204 No Content in 6ms (Views: 0.3ms | ActiveRecord: 0.4ms)
362368
+  (0.4ms) rollback transaction
362369
+  (0.0ms) begin transaction
362370
+ ---------------------------------------------------------------------
362371
+ RailsIdentity::SessionTest: test_cannot_save_a_session_without_a_user
362372
+ ---------------------------------------------------------------------
362373
+  (0.0ms) rollback transaction
362374
+  (0.0ms) begin transaction
362375
+ -----------------------------------------------
362376
+ RailsIdentity::SessionTest: test_save_a_session
362377
+ -----------------------------------------------
362378
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362379
+  (0.0ms) SAVEPOINT active_record_1
362380
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "7323a710-0dbc-11e6-b033-6c4008a6fa2a"], ["secret", "fd845613-d7fc-476b-a7c0-ca718f13f847"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzMyM2E3MTAtMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MSwiZXhwIjoxNDYzMTEwOTcxfQ.Wii1kwIGsBUIoK1zTD3SwboQ443qsxDtBuJxw3H5jCw"], ["created_at", "2016-04-29 03:42:51.811535"], ["updated_at", "2016-04-29 03:42:51.811535"]]
362381
+  (0.0ms) RELEASE SAVEPOINT active_record_1
362382
+  (0.3ms) rollback transaction
362383
+  (0.1ms) begin transaction
362384
+ --------------------------------------------------------------------------
362385
+ RailsIdentity::SessionTest: test_session_has_token_and_secret_when_created
362386
+ --------------------------------------------------------------------------
362387
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362388
+  (0.1ms) rollback transaction
362389
+  (0.0ms) begin transaction
362390
+ -----------------------------
362391
+ RailsIdentityTest: test_truth
362392
+ -----------------------------
362393
+  (0.0ms) rollback transaction
362394
+  (0.0ms) begin transaction
362395
+ ------------------------------------------------------------------------------------
362396
+ RailsIdentity::UsersControllerTest: test_cannot_update_password_with_non-reset_token
362397
+ ------------------------------------------------------------------------------------
362398
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362399
+ Processing by RailsIdentity::UsersController#update as HTML
362400
+ Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"1"}
362401
+ Accepts a token
362402
+ Token well formatted for user 1,
362403
+ session 1
362404
+ Cache miss. Try database.
362405
+ 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"]]
362406
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362407
+ Token well formatted and verified. Set cache.
362408
+ 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"]]
362409
+ Attempting to get RailsIdentity::User 1
362410
+ 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"]]
362411
+ Checking to see if authorized to access object
362412
+ 401 - Repia::Errors::Unauthorized
362413
+ Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
362414
+  (0.1ms) rollback transaction
362415
+  (0.0ms) begin transaction
362416
+ ------------------------------------------------------------------------------------------------------------
362417
+ RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_reset_token_without_username
362418
+ ------------------------------------------------------------------------------------------------------------
362419
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362420
+ Processing by RailsIdentity::UsersController#update as HTML
362421
+ Parameters: {"issue_verification_token"=>true, "id"=>"current"}
362422
+ Accepts a token
362423
+ Token decode error: Nil JSON web token
362424
+ Suppressing error: Invalid token:
362425
+ 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
362426
+ 404 - Repia::Errors::NotFound
362427
+ Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
362428
+  (0.1ms) rollback transaction
362429
+  (0.0ms) begin transaction
362430
+ ------------------------------------------------------------
362431
+ RailsIdentity::UsersControllerTest: test_delete_current_user
362432
+ ------------------------------------------------------------
362433
+ RailsIdentity::Session Load (0.3ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362434
+ Processing by RailsIdentity::UsersController#destroy as HTML
362435
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"current"}
362436
+ Requires a token
362437
+ Token well formatted for user 1,
362438
+ session 1
362439
+ Cache miss. Try database.
362440
+ 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"]]
362441
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362442
+ Token well formatted and verified. Set cache.
362443
+ 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"]]
362444
+ Attempting to get RailsIdentity::User 1
362445
+ 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"]]
362446
+ Checking to see if authorized to access object
362447
+  (0.1ms) SAVEPOINT active_record_1
362448
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "deleted_at" = '2016-04-29 03:42:51.846416' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
362449
+  (0.0ms) RELEASE SAVEPOINT active_record_1
362450
+ Rendered text template (0.0ms)
362451
+ Completed 204 No Content in 8ms (Views: 1.5ms | ActiveRecord: 0.6ms)
362452
+  (0.4ms) rollback transaction
362453
+  (0.1ms) begin transaction
362454
+ -------------------------------------------------------------------------
362455
+ RailsIdentity::UsersControllerTest: test_user_cannot_create_an_admin_user
362456
+ -------------------------------------------------------------------------
362457
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362458
+ Processing by RailsIdentity::UsersController#create as HTML
362459
+ Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100"}
362460
+ Accepts a token
362461
+ Token decode error: Nil JSON web token
362462
+ Suppressing error: Invalid token:
362463
+ Create new user
362464
+ Unpermitted parameter: role
362465
+  (0.1ms) SAVEPOINT active_record_1
362466
+ 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
362467
+ 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$uOHjc3YRIbu1mMo4/JomHunWqv5DjGBWkAhe77vQ6W7/x9XEyQ6P6"], ["role", 10], ["created_at", "2016-04-29 03:42:51.857960"], ["updated_at", "2016-04-29 03:42:51.857960"], ["uuid", "732ae1a6-0dbc-11e6-b033-6c4008a6fa2a"]]
362468
+  (0.0ms) RELEASE SAVEPOINT active_record_1
362469
+  (0.0ms) SAVEPOINT active_record_1
362470
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "732ae1a6-0dbc-11e6-b033-6c4008a6fa2a"], ["uuid", "732b2b02-0dbc-11e6-b033-6c4008a6fa2a"], ["secret", "f86a48c7-6471-4d1a-817e-92605496e9c5"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzJhZTFhNi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzJiMmIwMi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxOTAxMzcxLCJleHAiOjE0NjE5MDQ5NzF9.g48a9oomYtVLToU_IUlnNdk721NLslPLvAEXf95NUT0"], ["created_at", "2016-04-29 03:42:51.860771"], ["updated_at", "2016-04-29 03:42:51.860771"]]
362471
+  (0.1ms) RELEASE SAVEPOINT active_record_1
362472
+  (0.0ms) SAVEPOINT active_record_1
362473
+ 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" != '732ae1a6-0dbc-11e6-b033-6c4008a6fa2a') LIMIT 1
362474
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzJhZTFhNi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzJiMmIwMi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxOTAxMzcxLCJleHAiOjE0NjE5MDQ5NzF9.g48a9oomYtVLToU_IUlnNdk721NLslPLvAEXf95NUT0"], ["updated_at", "2016-04-29 03:42:51.862769"], ["uuid", "732ae1a6-0dbc-11e6-b033-6c4008a6fa2a"]]
362475
+  (0.0ms) RELEASE SAVEPOINT active_record_1
362476
+ [ActiveJob] RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "732ae1a6-0dbc-11e6-b033-6c4008a6fa2a"]]
362477
+ [ActiveJob] [ActionMailer::DeliveryJob] [6493598a-82c4-4c09-9dc0-431a68f3b2c1] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/732ae1a6-0dbc-11e6-b033-6c4008a6fa2a
362478
+ [ActiveJob] [ActionMailer::DeliveryJob] [6493598a-82c4-4c09-9dc0-431a68f3b2c1] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (1.4ms)
362479
+ [ActiveJob] [ActionMailer::DeliveryJob] [6493598a-82c4-4c09-9dc0-431a68f3b2c1] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.3ms)
362480
+ [ActiveJob] [ActionMailer::DeliveryJob] [6493598a-82c4-4c09-9dc0-431a68f3b2c1]
362481
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 249.9ms
362482
+ [ActiveJob] [ActionMailer::DeliveryJob] [6493598a-82c4-4c09-9dc0-431a68f3b2c1]
362483
+ Sent mail to foo@example.com (7.7ms)
362484
+ [ActiveJob] [ActionMailer::DeliveryJob] [6493598a-82c4-4c09-9dc0-431a68f3b2c1] Date: Thu, 28 Apr 2016 22:42:52 -0500
362485
+ From: no-reply@rails-identity.com
362486
+ To: foo@example.com
362487
+ Message-ID: <5722d83c208ee_76333ffd3485246c4377c@galt.local.mail>
362488
+ Subject: [rails-identity] Email Confirmation
362489
+ Mime-Version: 1.0
362490
+ Content-Type: multipart/alternative;
362491
+ boundary="--==_mimepart_5722d83c1f3fd_76333ffd3485246c43639";
362492
+ charset=UTF-8
362493
+ Content-Transfer-Encoding: 7bit
362494
+
362495
+
362496
+ ----==_mimepart_5722d83c1f3fd_76333ffd3485246c43639
362497
+ Content-Type: text/plain;
362498
+ charset=UTF-8
362499
+ Content-Transfer-Encoding: 7bit
362500
+
362501
+ Dear foo@example.com,
362502
+
362503
+ Please confirm your account with rails-identity by making a PATCH request
362504
+ on the current user with a provided verification token. For example,
362505
+
362506
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzJhZTFhNi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzJiMmIwMi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxOTAxMzcxLCJleHAiOjE0NjE5MDQ5NzF9.g48a9oomYtVLToU_IUlnNdk721NLslPLvAEXf95NUT0 verified=true
362507
+
362508
+ will confirm the account. Here is the verification token:
362509
+
362510
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzJhZTFhNi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzJiMmIwMi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxOTAxMzcxLCJleHAiOjE0NjE5MDQ5NzF9.g48a9oomYtVLToU_IUlnNdk721NLslPLvAEXf95NUT0
362511
+
362512
+ Thank you for using rails-identity,
362513
+ rails-identity
362514
+
362515
+
362516
+ ----==_mimepart_5722d83c1f3fd_76333ffd3485246c43639
362517
+ Content-Type: text/html;
362518
+ charset=UTF-8
362519
+ Content-Transfer-Encoding: 7bit
362520
+
362521
+ <html>
362522
+ <body>
362523
+ <p>Dear foo@example.com,</p>
362524
+
362525
+ <p>Please confirm your account with rails-identity by making a PATCH request
362526
+ on the current user with a provided verification token. For example,
362527
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzJhZTFhNi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzJiMmIwMi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxOTAxMzcxLCJleHAiOjE0NjE5MDQ5NzF9.g48a9oomYtVLToU_IUlnNdk721NLslPLvAEXf95NUT0
362528
+ verified=true</pre> will confirm the account. Here is the verification
362529
+ token:</p>
362530
+
362531
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzJhZTFhNi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzJiMmIwMi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxOTAxMzcxLCJleHAiOjE0NjE5MDQ5NzF9.g48a9oomYtVLToU_IUlnNdk721NLslPLvAEXf95NUT0</pre>
362532
+
362533
+ <p>Thank you for using rails-identity</p>
362534
+ <p><b>rails-identity</b></p>
362535
+
362536
+ </body>
362537
+ </html>
362538
+
362539
+ ----==_mimepart_5722d83c1f3fd_76333ffd3485246c43639--
362540
+
362541
+ [ActiveJob] [ActionMailer::DeliveryJob] [6493598a-82c4-4c09-9dc0-431a68f3b2c1] Performed ActionMailer::DeliveryJob from Inline(mailers) in 258.29ms
362542
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 6493598a-82c4-4c09-9dc0-431a68f3b2c1) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/732ae1a6-0dbc-11e6-b033-6c4008a6fa2a
362543
+ Completed 201 Created in 284ms (Views: 0.4ms | ActiveRecord: 1.1ms)
362544
+  (0.7ms) rollback transaction
362545
+  (0.0ms) begin transaction
362546
+ ------------------------------------------------------
362547
+ RailsIdentity::UsersControllerTest: test_delete_a_user
362548
+ ------------------------------------------------------
362549
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362550
+ Processing by RailsIdentity::UsersController#destroy as HTML
362551
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"1"}
362552
+ Requires a token
362553
+ Token well formatted for user 1,
362554
+ session 1
362555
+ Cache miss. Try database.
362556
+ 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"]]
362557
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362558
+ Token well formatted and verified. Set cache.
362559
+ 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"]]
362560
+ Attempting to get RailsIdentity::User 1
362561
+ 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"]]
362562
+ Checking to see if authorized to access object
362563
+  (0.0ms) SAVEPOINT active_record_1
362564
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "deleted_at" = '2016-04-29 03:42:52.147043' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
362565
+  (0.0ms) RELEASE SAVEPOINT active_record_1
362566
+ Rendered text template (0.0ms)
362567
+ Completed 204 No Content in 5ms (Views: 0.3ms | ActiveRecord: 0.4ms)
362568
+  (0.3ms) rollback transaction
362569
+  (0.0ms) begin transaction
362570
+ ------------------------------------------------------------
362571
+ RailsIdentity::UsersControllerTest: test_show_a_current_user
362572
+ ------------------------------------------------------------
362573
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362574
+ Processing by RailsIdentity::UsersController#show as HTML
362575
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"current"}
362576
+ Requires a token
362577
+ Token well formatted for user 1,
362578
+ session 1
362579
+ Cache miss. Try database.
362580
+ 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"]]
362581
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362582
+ Token well formatted and verified. Set cache.
362583
+ 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"]]
362584
+ Attempting to get RailsIdentity::User 1
362585
+ 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"]]
362586
+ Checking to see if authorized to access object
362587
+ Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms)
362588
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362589
+  (0.1ms) rollback transaction
362590
+  (0.0ms) begin transaction
362591
+ ------------------------------------------------------
362592
+ RailsIdentity::UsersControllerTest: test_update_a_user
362593
+ ------------------------------------------------------
362594
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362595
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362596
+ Processing by RailsIdentity::UsersController#update as HTML
362597
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"1"}
362598
+ Accepts a token
362599
+ Token well formatted for user 1,
362600
+ session 1
362601
+ Cache miss. Try database.
362602
+ 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"]]
362603
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362604
+ Token well formatted and verified. Set cache.
362605
+ 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"]]
362606
+ Attempting to get RailsIdentity::User 1
362607
+ 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"]]
362608
+ Checking to see if authorized to access object
362609
+ Unpermitted parameters: token, id
362610
+  (0.0ms) SAVEPOINT active_record_1
362611
+ 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
362612
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-29 03:42:52.167570"], ["uuid", "1"]]
362613
+  (0.0ms) RELEASE SAVEPOINT active_record_1
362614
+ Completed 200 OK in 7ms (Views: 0.4ms | ActiveRecord: 0.5ms)
362615
+  (0.5ms) rollback transaction
362616
+  (0.1ms) begin transaction
362617
+ ------------------------------------------------------------------
362618
+ RailsIdentity::UsersControllerTest: test_public_cannot_show_a_user
362619
+ ------------------------------------------------------------------
362620
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362621
+ Processing by RailsIdentity::UsersController#show as HTML
362622
+ Parameters: {"id"=>"1"}
362623
+ Requires a token
362624
+ Token decode error: Nil JSON web token
362625
+ 401 - Invalid token:
362626
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
362627
+  (0.1ms) rollback transaction
362628
+  (0.1ms) begin transaction
362629
+ ------------------------------------------------------------------------------------
362630
+ RailsIdentity::UsersControllerTest: test_cannot_update_password_with_a_invalid_token
362631
+ ------------------------------------------------------------------------------------
362632
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362633
+ Processing by RailsIdentity::UsersController#update as HTML
362634
+ Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"1"}
362635
+ Accepts a token
362636
+ Token well formatted for user 1,
362637
+ session 1
362638
+ Cache miss. Try database.
362639
+ 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"]]
362640
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362641
+ Token well formatted and verified. Set cache.
362642
+ 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"]]
362643
+ Attempting to get RailsIdentity::User 1
362644
+ 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"]]
362645
+ Checking to see if authorized to access object
362646
+ 401 - Repia::Errors::Unauthorized
362647
+ Completed 401 Unauthorized in 73ms (Views: 0.2ms | ActiveRecord: 0.2ms)
362648
+  (0.1ms) rollback transaction
362649
+  (0.0ms) begin transaction
362650
+ ---------------------------------------------------------------------
362651
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_ill-formed
362652
+ ---------------------------------------------------------------------
362653
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362654
+ 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"]]
362655
+ Processing by RailsIdentity::UsersController#show as HTML
362656
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTAxNDMyfQ.Wq6bvuLGmSIu7JyCRBEzLb1j-CdGr2QAGzRoouJYgL0", "id"=>"1"}
362657
+ Requires a token
362658
+ User UUID or session UUID is nil
362659
+ 401 - Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTAxNDMyfQ.Wq6bvuLGmSIu7JyCRBEzLb1j-CdGr2QAGzRoouJYgL0
362660
+ Completed 401 Unauthorized in 1ms (Views: 0.1ms | ActiveRecord: 0.0ms)
362661
+  (0.1ms) rollback transaction
362662
+  (0.1ms) begin transaction
362663
+ ---------------------------------------------------------------
362664
+ RailsIdentity::UsersControllerTest: test_cannot_show_other_user
362665
+ ---------------------------------------------------------------
362666
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362667
+ Processing by RailsIdentity::UsersController#show as HTML
362668
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"2"}
362669
+ Requires a token
362670
+ Token well formatted for user 1,
362671
+ session 1
362672
+ Cache miss. Try database.
362673
+ 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"]]
362674
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362675
+ Token well formatted and verified. Set cache.
362676
+ 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"]]
362677
+ Attempting to get RailsIdentity::User 2
362678
+ 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"]]
362679
+ Checking to see if authorized to access object
362680
+ 401 - Repia::Errors::Unauthorized
362681
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
362682
+  (0.1ms) rollback transaction
362683
+  (0.0ms) begin transaction
362684
+ -------------------------------------------------------------------
362685
+ RailsIdentity::UsersControllerTest: test_cannot_delete_another_user
362686
+ -------------------------------------------------------------------
362687
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362688
+ Processing by RailsIdentity::UsersController#destroy as HTML
362689
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"2"}
362690
+ Requires a token
362691
+ Token well formatted for user 1,
362692
+ session 1
362693
+ Cache miss. Try database.
362694
+ 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"]]
362695
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362696
+ Token well formatted and verified. Set cache.
362697
+ 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"]]
362698
+ Attempting to get RailsIdentity::User 2
362699
+ 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"]]
362700
+ Checking to see if authorized to access object
362701
+ 401 - Repia::Errors::Unauthorized
362702
+ Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
362703
+  (0.1ms) rollback transaction
362704
+  (0.0ms) begin transaction
362705
+ -----------------------------------------------------------------------
362706
+ RailsIdentity::UsersControllerTest: test_admin_can_create_an_admin_user
362707
+ -----------------------------------------------------------------------
362708
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362709
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
362710
+ Processing by RailsIdentity::UsersController#create as HTML
362711
+ Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxOTUxNzcwfQ.MYh7wI1Vp32qGU0nMUUx1M9vNWYfxBfkRL9YBSdp6D0"}
362712
+ Accepts a token
362713
+ Token well formatted for user admin_one,
362714
+ session session_admin_one
362715
+ Cache miss. Try database.
362716
+ 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"]]
362717
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
362718
+ Token well formatted and verified. Set cache.
362719
+ 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"]]
362720
+ Create new user
362721
+ Unpermitted parameter: token
362722
+  (0.0ms) SAVEPOINT active_record_1
362723
+ 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
362724
+ 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$06sWfWRiBoG3.R67qyUrqO3NNIKLcQC9f5KQYMa.n.dGpC8Ma8q.O"], ["role", 100], ["created_at", "2016-04-29 03:42:52.288879"], ["updated_at", "2016-04-29 03:42:52.288879"], ["uuid", "736ca0d2-0dbc-11e6-b033-6c4008a6fa2a"]]
362725
+  (0.1ms) RELEASE SAVEPOINT active_record_1
362726
+  (0.0ms) SAVEPOINT active_record_1
362727
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "736ca0d2-0dbc-11e6-b033-6c4008a6fa2a"], ["uuid", "736cebc8-0dbc-11e6-b033-6c4008a6fa2a"], ["secret", "56cda274-9742-4c4f-afb9-8bcd403872d5"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzZjYTBkMi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzZjZWJjOC0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.eBNH34Ap0qNID2ivqnhnh5PJchj0V5hvN58l6UDEv24"], ["created_at", "2016-04-29 03:42:52.291717"], ["updated_at", "2016-04-29 03:42:52.291717"]]
362728
+  (0.0ms) RELEASE SAVEPOINT active_record_1
362729
+  (0.0ms) SAVEPOINT active_record_1
362730
+ 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" != '736ca0d2-0dbc-11e6-b033-6c4008a6fa2a') LIMIT 1
362731
+ SQL (0.3ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzZjYTBkMi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzZjZWJjOC0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.eBNH34Ap0qNID2ivqnhnh5PJchj0V5hvN58l6UDEv24"], ["updated_at", "2016-04-29 03:42:52.293592"], ["uuid", "736ca0d2-0dbc-11e6-b033-6c4008a6fa2a"]]
362732
+  (0.1ms) RELEASE SAVEPOINT active_record_1
362733
+ [ActiveJob] RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "736ca0d2-0dbc-11e6-b033-6c4008a6fa2a"]]
362734
+ [ActiveJob] [ActionMailer::DeliveryJob] [6e7ede56-0805-45ac-8b2a-bfd65a0e7e8a] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/736ca0d2-0dbc-11e6-b033-6c4008a6fa2a
362735
+ [ActiveJob] [ActionMailer::DeliveryJob] [6e7ede56-0805-45ac-8b2a-bfd65a0e7e8a] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
362736
+ [ActiveJob] [ActionMailer::DeliveryJob] [6e7ede56-0805-45ac-8b2a-bfd65a0e7e8a] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.1ms)
362737
+ [ActiveJob] [ActionMailer::DeliveryJob] [6e7ede56-0805-45ac-8b2a-bfd65a0e7e8a]
362738
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 3.1ms
362739
+ [ActiveJob] [ActionMailer::DeliveryJob] [6e7ede56-0805-45ac-8b2a-bfd65a0e7e8a]
362740
+ Sent mail to foo@example.com (4.1ms)
362741
+ [ActiveJob] [ActionMailer::DeliveryJob] [6e7ede56-0805-45ac-8b2a-bfd65a0e7e8a] Date: Thu, 28 Apr 2016 22:42:52 -0500
362742
+ From: no-reply@rails-identity.com
362743
+ To: foo@example.com
362744
+ Message-ID: <5722d83c4a02b_76333ffd3485246c439a3@galt.local.mail>
362745
+ Subject: [rails-identity] Email Confirmation
362746
+ Mime-Version: 1.0
362747
+ Content-Type: multipart/alternative;
362748
+ boundary="--==_mimepart_5722d83c49475_76333ffd3485246c4383a";
362749
+ charset=UTF-8
362750
+ Content-Transfer-Encoding: 7bit
362751
+
362752
+
362753
+ ----==_mimepart_5722d83c49475_76333ffd3485246c4383a
362754
+ Content-Type: text/plain;
362755
+ charset=UTF-8
362756
+ Content-Transfer-Encoding: 7bit
362757
+
362758
+ Dear foo@example.com,
362759
+
362760
+ Please confirm your account with rails-identity by making a PATCH request
362761
+ on the current user with a provided verification token. For example,
362762
+
362763
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzZjYTBkMi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzZjZWJjOC0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.eBNH34Ap0qNID2ivqnhnh5PJchj0V5hvN58l6UDEv24 verified=true
362764
+
362765
+ will confirm the account. Here is the verification token:
362766
+
362767
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzZjYTBkMi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzZjZWJjOC0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.eBNH34Ap0qNID2ivqnhnh5PJchj0V5hvN58l6UDEv24
362768
+
362769
+ Thank you for using rails-identity,
362770
+ rails-identity
362771
+
362772
+
362773
+ ----==_mimepart_5722d83c49475_76333ffd3485246c4383a
362774
+ Content-Type: text/html;
362775
+ charset=UTF-8
362776
+ Content-Transfer-Encoding: 7bit
362777
+
362778
+ <html>
362779
+ <body>
362780
+ <p>Dear foo@example.com,</p>
362781
+
362782
+ <p>Please confirm your account with rails-identity by making a PATCH request
362783
+ on the current user with a provided verification token. For example,
362784
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzZjYTBkMi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzZjZWJjOC0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.eBNH34Ap0qNID2ivqnhnh5PJchj0V5hvN58l6UDEv24
362785
+ verified=true</pre> will confirm the account. Here is the verification
362786
+ token:</p>
362787
+
362788
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzZjYTBkMi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzZjZWJjOC0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.eBNH34Ap0qNID2ivqnhnh5PJchj0V5hvN58l6UDEv24</pre>
362789
+
362790
+ <p>Thank you for using rails-identity</p>
362791
+ <p><b>rails-identity</b></p>
362792
+
362793
+ </body>
362794
+ </html>
362795
+
362796
+ ----==_mimepart_5722d83c49475_76333ffd3485246c4383a--
362797
+
362798
+ [ActiveJob] [ActionMailer::DeliveryJob] [6e7ede56-0805-45ac-8b2a-bfd65a0e7e8a] Performed ActionMailer::DeliveryJob from Inline(mailers) in 7.76ms
362799
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 6e7ede56-0805-45ac-8b2a-bfd65a0e7e8a) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/736ca0d2-0dbc-11e6-b033-6c4008a6fa2a
362800
+ Completed 201 Created in 23ms (Views: 0.3ms | ActiveRecord: 1.2ms)
362801
+  (0.6ms) rollback transaction
362802
+  (0.1ms) begin transaction
362803
+ ---------------------------------------------------------------------------
362804
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_no_token_payload
362805
+ ---------------------------------------------------------------------------
362806
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362807
+ Processing by RailsIdentity::UsersController#show as HTML
362808
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.k9BbLjMFJ-y5VgGe1a1SAkYBORK6S7I95eRg6sSJCec", "id"=>"1"}
362809
+ Requires a token
362810
+ User UUID or session UUID is nil
362811
+ 401 - Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.k9BbLjMFJ-y5VgGe1a1SAkYBORK6S7I95eRg6sSJCec
362812
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
362813
+  (0.1ms) rollback transaction
362814
+  (0.0ms) begin transaction
362815
+ ----------------------------------------------------
362816
+ RailsIdentity::UsersControllerTest: test_show_a_user
362817
+ ----------------------------------------------------
362818
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362819
+ Processing by RailsIdentity::UsersController#show as HTML
362820
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"1"}
362821
+ Requires a token
362822
+ Token well formatted for user 1,
362823
+ session 1
362824
+ Cache miss. Try database.
362825
+ 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"]]
362826
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362827
+ Token well formatted and verified. Set cache.
362828
+ 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"]]
362829
+ Attempting to get RailsIdentity::User 1
362830
+ 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"]]
362831
+ Checking to see if authorized to access object
362832
+ Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.2ms)
362833
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362834
+  (0.1ms) rollback transaction
362835
+  (0.0ms) begin transaction
362836
+ ------------------------------------------------------------
362837
+ RailsIdentity::UsersControllerTest: test_update_current_user
362838
+ ------------------------------------------------------------
362839
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362840
+ Processing by RailsIdentity::UsersController#update as HTML
362841
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"current"}
362842
+ Accepts a token
362843
+ Token well formatted for user 1,
362844
+ session 1
362845
+ Cache miss. Try database.
362846
+ 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"]]
362847
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362848
+ Token well formatted and verified. Set cache.
362849
+ 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"]]
362850
+ Attempting to get RailsIdentity::User 1
362851
+ 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"]]
362852
+ Checking to see if authorized to access object
362853
+ Unpermitted parameters: token, id
362854
+  (0.1ms) SAVEPOINT active_record_1
362855
+ 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
362856
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-29 03:42:52.330564"], ["uuid", "1"]]
362857
+  (0.0ms) RELEASE SAVEPOINT active_record_1
362858
+ Completed 200 OK in 7ms (Views: 0.4ms | ActiveRecord: 0.5ms)
362859
+  (0.4ms) rollback transaction
362860
+  (0.1ms) begin transaction
362861
+ ---------------------------------------------------------------------------------------------
362862
+ RailsIdentity::UsersControllerTest: test_update_a_user_with_a_new_password_using_old_password
362863
+ ---------------------------------------------------------------------------------------------
362864
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362865
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362866
+ Processing by RailsIdentity::UsersController#update as HTML
362867
+ Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"1"}
362868
+ Accepts a token
362869
+ Token well formatted for user 1,
362870
+ session 1
362871
+ Cache miss. Try database.
362872
+ 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"]]
362873
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362874
+ Token well formatted and verified. Set cache.
362875
+ 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"]]
362876
+ Attempting to get RailsIdentity::User 1
362877
+ 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"]]
362878
+ Checking to see if authorized to access object
362879
+ Unpermitted parameters: old_password, token, id
362880
+  (0.1ms) SAVEPOINT active_record_1
362881
+ 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
362882
+ SQL (0.3ms) UPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["password_digest", "$2a$04$glrvuOks.h6aeW5PNSt5VOOhRCYa25Z8lLfbpSyW2gz1cgGXY.V9W"], ["updated_at", "2016-04-29 03:42:52.409122"], ["uuid", "1"]]
362883
+  (0.0ms) RELEASE SAVEPOINT active_record_1
362884
+ Completed 200 OK in 73ms (Views: 0.4ms | ActiveRecord: 0.7ms)
362885
+ 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"]]
362886
+  (0.4ms) rollback transaction
362887
+  (0.1ms) begin transaction
362888
+ -------------------------------------------------------------------
362889
+ RailsIdentity::UsersControllerTest: test_cannot_update_another_user
362890
+ -------------------------------------------------------------------
362891
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362892
+ Processing by RailsIdentity::UsersController#update as HTML
362893
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"2"}
362894
+ Accepts a token
362895
+ Token well formatted for user 1,
362896
+ session 1
362897
+ Cache miss. Try database.
362898
+ 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"]]
362899
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362900
+ Token well formatted and verified. Set cache.
362901
+ 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"]]
362902
+ Attempting to get RailsIdentity::User 2
362903
+ 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"]]
362904
+ Checking to see if authorized to access object
362905
+ 401 - Repia::Errors::Unauthorized
362906
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
362907
+  (0.1ms) rollback transaction
362908
+  (0.0ms) begin transaction
362909
+ ----------------------------------------------------------------------------------------
362910
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_bogus_payload
362911
+ ----------------------------------------------------------------------------------------
362912
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362913
+ 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"]]
362914
+ Processing by RailsIdentity::UsersController#show as HTML
362915
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTAxNDMyfQ.OTfgKhadPbnBYOq_ZiVJk01LHa2CIDMfJNGZeb9b4SA", "id"=>"1"}
362916
+ Requires a token
362917
+ Token well formatted for user 1,
362918
+ session doesnotexist
362919
+ Cache miss. Try database.
362920
+ 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"]]
362921
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "doesnotexist"]]
362922
+ 401 - Well-formed but invalid session token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTAxNDMyfQ.OTfgKhadPbnBYOq_ZiVJk01LHa2CIDMfJNGZeb9b4SA
362923
+ Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
362924
+  (0.1ms) rollback transaction
362925
+  (0.0ms) begin transaction
362926
+ --------------------------------------------------------------------
362927
+ RailsIdentity::UsersControllerTest: test_cannot_update_invalid_email
362928
+ --------------------------------------------------------------------
362929
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362930
+ Processing by RailsIdentity::UsersController#update as HTML
362931
+ Parameters: {"username"=>"foobar", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"1"}
362932
+ Accepts a token
362933
+ Token well formatted for user 1,
362934
+ session 1
362935
+ Cache miss. Try database.
362936
+ 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"]]
362937
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362938
+ Token well formatted and verified. Set cache.
362939
+ 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"]]
362940
+ Attempting to get RailsIdentity::User 1
362941
+ 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"]]
362942
+ Checking to see if authorized to access object
362943
+ Unpermitted parameters: token, id
362944
+  (0.0ms) SAVEPOINT active_record_1
362945
+ 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
362946
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
362947
+ Completed 400 Bad Request in 7ms (Views: 0.2ms | ActiveRecord: 0.3ms)
362948
+  (0.1ms) rollback transaction
362949
+  (0.0ms) begin transaction
362950
+ ------------------------------------------------------------------------------
362951
+ RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_username
362952
+ ------------------------------------------------------------------------------
362953
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362954
+ Processing by RailsIdentity::UsersController#create as HTML
362955
+ Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
362956
+ Accepts a token
362957
+ Token decode error: Nil JSON web token
362958
+ Suppressing error: Invalid token:
362959
+ Create new user
362960
+  (0.1ms) SAVEPOINT active_record_1
362961
+ 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
362962
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
362963
+ Completed 400 Bad Request in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
362964
+  (0.1ms) rollback transaction
362965
+  (0.0ms) begin transaction
362966
+ ---------------------------------------------------------------
362967
+ RailsIdentity::UsersControllerTest: test_public_can_see_options
362968
+ ---------------------------------------------------------------
362969
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362970
+ Processing by RailsIdentity::UsersController#options as HTML
362971
+ Rendered text template (0.0ms)
362972
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
362973
+  (0.1ms) rollback transaction
362974
+  (0.1ms) begin transaction
362975
+ ---------------------------------------------------------------------------------------------
362976
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_non-existing_token
362977
+ ---------------------------------------------------------------------------------------------
362978
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362979
+ 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"]]
362980
+ Processing by RailsIdentity::UsersController#show as HTML
362981
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjE5MDEzNzIsImV4cCI6MTQ2MTkwMTQzMn0._F5LKiVkNI1-wzu8HAP-NHSANlfdSXum51ZW6fSefUQ", "id"=>"1"}
362982
+ Requires a token
362983
+ Token well formatted for user 1,
362984
+ session 1
362985
+ Cache miss. Try database.
362986
+ 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"]]
362987
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362988
+ Signature verification raised
362989
+ 401 - Cannot verify token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjE5MDEzNzIsImV4cCI6MTQ2MTkwMTQzMn0._F5LKiVkNI1-wzu8HAP-NHSANlfdSXum51ZW6fSefUQ
362990
+ Completed 401 Unauthorized in 2ms (Views: 0.1ms | ActiveRecord: 0.1ms)
362991
+  (0.1ms) rollback transaction
362992
+  (0.0ms) begin transaction
362993
+ --------------------------------------------------------------------
362994
+ RailsIdentity::UsersControllerTest: test_non-admin_cannot_list_users
362995
+ --------------------------------------------------------------------
362996
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
362997
+ Processing by RailsIdentity::UsersController#index as HTML
362998
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY"}
362999
+ Requires an admin token
363000
+ Token well formatted for user 1,
363001
+ session 1
363002
+ Cache miss. Try database.
363003
+ 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"]]
363004
+ 401 - Well-formed but invalid user token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY
363005
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
363006
+  (0.1ms) rollback transaction
363007
+  (0.0ms) begin transaction
363008
+ --------------------------------------------------------------------------
363009
+ RailsIdentity::UsersControllerTest: test_update_password_using_reset_token
363010
+ --------------------------------------------------------------------------
363011
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363012
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363013
+ 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"]]
363014
+ Processing by RailsIdentity::UsersController#update as HTML
363015
+ Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
363016
+ Accepts a token
363017
+ Token decode error: Nil JSON web token
363018
+ Suppressing error: Invalid token:
363019
+ 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"]]
363020
+  (0.1ms) SAVEPOINT active_record_1
363021
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "738923ec-0dbc-11e6-b033-6c4008a6fa2a"], ["secret", "a8e7f7e7-a1df-4b32-8266-fa1bc79f1642"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzM4OTIzZWMtMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.e53ZmuEhDWMCD5p8RdESMLSCnbvxfwF3vP_rzX4KTUw"], ["created_at", "2016-04-29 03:42:52.476891"], ["updated_at", "2016-04-29 03:42:52.476891"]]
363022
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363023
+  (0.0ms) SAVEPOINT active_record_1
363024
+ 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
363025
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzM4OTIzZWMtMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.e53ZmuEhDWMCD5p8RdESMLSCnbvxfwF3vP_rzX4KTUw"], ["updated_at", "2016-04-29 03:42:52.479547"], ["uuid", "1"]]
363026
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363027
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363028
+ [ActiveJob] [ActionMailer::DeliveryJob] [75ac68b3-4829-4002-8e36-e912f7e1b8d0] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
363029
+ [ActiveJob] [ActionMailer::DeliveryJob] [75ac68b3-4829-4002-8e36-e912f7e1b8d0] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (0.5ms)
363030
+ [ActiveJob] [ActionMailer::DeliveryJob] [75ac68b3-4829-4002-8e36-e912f7e1b8d0] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (0.3ms)
363031
+ [ActiveJob] [ActionMailer::DeliveryJob] [75ac68b3-4829-4002-8e36-e912f7e1b8d0]
363032
+ RailsIdentity::UserMailer#password_reset: processed outbound mail in 8.1ms
363033
+ [ActiveJob] [ActionMailer::DeliveryJob] [75ac68b3-4829-4002-8e36-e912f7e1b8d0]
363034
+ Sent mail to one@example.com (3.9ms)
363035
+ [ActiveJob] [ActionMailer::DeliveryJob] [75ac68b3-4829-4002-8e36-e912f7e1b8d0] Date: Thu, 28 Apr 2016 22:42:52 -0500
363036
+ From: no-reply@rails-identity.com
363037
+ To: one@example.com
363038
+ Message-ID: <5722d83c7833d_76333ffd3485246c44155@galt.local.mail>
363039
+ Subject: [rails-identity] Password Reset
363040
+ Mime-Version: 1.0
363041
+ Content-Type: multipart/alternative;
363042
+ boundary="--==_mimepart_5722d83c779bc_76333ffd3485246c440ca";
363043
+ charset=UTF-8
363044
+ Content-Transfer-Encoding: 7bit
363045
+
363046
+
363047
+ ----==_mimepart_5722d83c779bc_76333ffd3485246c440ca
363048
+ Content-Type: text/plain;
363049
+ charset=UTF-8
363050
+ Content-Transfer-Encoding: 7bit
363051
+
363052
+ Dear one@example.com,
363053
+
363054
+ You have requested to reset your password. Here are the user UUID and reset
363055
+ token. Make a PATCH request on the UUID with the reset token to set a new
363056
+ password. For instance,
363057
+
363058
+ http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
363059
+
363060
+ will set the password to "reallysecret" (without quotes) for the user to
363061
+ whom the reset token was issued.
363062
+
363063
+ Here is the reset token: @user.reset_token
363064
+
363065
+ Good luck! :)
363066
+ rails-identity
363067
+
363068
+
363069
+ ----==_mimepart_5722d83c779bc_76333ffd3485246c440ca
363070
+ Content-Type: text/html;
363071
+ charset=UTF-8
363072
+ Content-Transfer-Encoding: 7bit
363073
+
363074
+ <html>
363075
+ <body>
363076
+ <p>Dear one@example.com,</p>
363077
+
363078
+ <p>You have requested to reset your password. Here are the user UUID and
363079
+ reset token. Make a PATCH request on the UUID with the reset token to set a
363080
+ new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzM4OTIzZWMtMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.e53ZmuEhDWMCD5p8RdESMLSCnbvxfwF3vP_rzX4KTUw password=reallysecret
363081
+ password_confirmation=reallysecret</pre> will set the password to
363082
+ <pre>reallysecret</pre> for the user to whom the reset token was issued.
363083
+ Here is the reset token:</p>
363084
+
363085
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzM4OTIzZWMtMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.e53ZmuEhDWMCD5p8RdESMLSCnbvxfwF3vP_rzX4KTUw</pre>
363086
+
363087
+ <p>Good luck! :)</p>
363088
+ <p><b>rails-identity</b></p>
363089
+
363090
+ </body>
363091
+ </html>
363092
+
363093
+ ----==_mimepart_5722d83c779bc_76333ffd3485246c440ca--
363094
+
363095
+ [ActiveJob] [ActionMailer::DeliveryJob] [75ac68b3-4829-4002-8e36-e912f7e1b8d0] Performed ActionMailer::DeliveryJob from Inline(mailers) in 12.47ms
363096
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 75ac68b3-4829-4002-8e36-e912f7e1b8d0) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
363097
+ Rendered text template (0.0ms)
363098
+ Completed 204 No Content in 22ms (Views: 0.4ms | ActiveRecord: 0.7ms)
363099
+ 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"]]
363100
+ Processing by RailsIdentity::UsersController#update as HTML
363101
+ Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzM4OTIzZWMtMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.e53ZmuEhDWMCD5p8RdESMLSCnbvxfwF3vP_rzX4KTUw", "id"=>"1"}
363102
+ Accepts a token
363103
+ Token well formatted for user 1,
363104
+ session 738923ec-0dbc-11e6-b033-6c4008a6fa2a
363105
+ Cache miss. Try database.
363106
+ 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"]]
363107
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "738923ec-0dbc-11e6-b033-6c4008a6fa2a"]]
363108
+ Token well formatted and verified. Set cache.
363109
+ 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"]]
363110
+ Attempting to get RailsIdentity::User 1
363111
+ 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"]]
363112
+ Checking to see if authorized to access object
363113
+ Unpermitted parameters: token, id
363114
+  (0.1ms) SAVEPOINT active_record_1
363115
+ 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
363116
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["password_digest", "$2a$04$TAI3QzMWV3z5GQ/0bZn1BOb0DFoGBXUTh.qGnWJOl4s/.hwZbEKMS"], ["updated_at", "2016-04-29 03:42:52.504911"], ["uuid", "1"]]
363117
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363118
+ Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 1.3ms)
363119
+ 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"]]
363120
+  (0.7ms) rollback transaction
363121
+  (0.2ms) begin transaction
363122
+ ------------------------------------------------------
363123
+ RailsIdentity::UsersControllerTest: test_create_a_user
363124
+ ------------------------------------------------------
363125
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363126
+ Processing by RailsIdentity::UsersController#create as HTML
363127
+ Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
363128
+ Accepts a token
363129
+ Token decode error: Nil JSON web token
363130
+ Suppressing error: Invalid token:
363131
+ Create new user
363132
+  (0.1ms) SAVEPOINT active_record_1
363133
+ 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
363134
+ 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$6f47L/3Es4YNpLqAE1QIJeQ3mI2BwVBtUTXhW7tauoRQyUPQmepYu"], ["role", 10], ["created_at", "2016-04-29 03:42:52.516520"], ["updated_at", "2016-04-29 03:42:52.516520"], ["uuid", "738f5b9a-0dbc-11e6-b033-6c4008a6fa2a"]]
363135
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363136
+  (0.1ms) SAVEPOINT active_record_1
363137
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "738f5b9a-0dbc-11e6-b033-6c4008a6fa2a"], ["uuid", "738f9736-0dbc-11e6-b033-6c4008a6fa2a"], ["secret", "42fe8006-8252-419f-a8fc-a8fe3dbe4fbd"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzhmNWI5YS0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzhmOTczNi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxOTAxMzcyLCJleHAiOjE0NjE5MDQ5NzJ9.fJ---vqmXnBMNk_3brOq6JxYVzwcIYotnGfWfBCFS4I"], ["created_at", "2016-04-29 03:42:52.561205"], ["updated_at", "2016-04-29 03:42:52.561205"]]
363138
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363139
+  (0.0ms) SAVEPOINT active_record_1
363140
+ 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" != '738f5b9a-0dbc-11e6-b033-6c4008a6fa2a') LIMIT 1
363141
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzhmNWI5YS0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzhmOTczNi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxOTAxMzcyLCJleHAiOjE0NjE5MDQ5NzJ9.fJ---vqmXnBMNk_3brOq6JxYVzwcIYotnGfWfBCFS4I"], ["updated_at", "2016-04-29 03:42:52.563841"], ["uuid", "738f5b9a-0dbc-11e6-b033-6c4008a6fa2a"]]
363142
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363143
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "738f5b9a-0dbc-11e6-b033-6c4008a6fa2a"]]
363144
+ [ActiveJob] [ActionMailer::DeliveryJob] [f881a0a8-fcb3-4c44-b786-44c46d523152] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/738f5b9a-0dbc-11e6-b033-6c4008a6fa2a
363145
+ [ActiveJob] [ActionMailer::DeliveryJob] [f881a0a8-fcb3-4c44-b786-44c46d523152] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
363146
+ [ActiveJob] [ActionMailer::DeliveryJob] [f881a0a8-fcb3-4c44-b786-44c46d523152] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
363147
+ [ActiveJob] [ActionMailer::DeliveryJob] [f881a0a8-fcb3-4c44-b786-44c46d523152]
363148
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.5ms
363149
+ [ActiveJob] [ActionMailer::DeliveryJob] [f881a0a8-fcb3-4c44-b786-44c46d523152]
363150
+ Sent mail to foo@example.com (3.6ms)
363151
+ [ActiveJob] [ActionMailer::DeliveryJob] [f881a0a8-fcb3-4c44-b786-44c46d523152] Date: Thu, 28 Apr 2016 22:42:52 -0500
363152
+ From: no-reply@rails-identity.com
363153
+ To: foo@example.com
363154
+ Message-ID: <5722d83c8b657_76333ffd3485246c44350@galt.local.mail>
363155
+ Subject: [rails-identity] Email Confirmation
363156
+ Mime-Version: 1.0
363157
+ Content-Type: multipart/alternative;
363158
+ boundary="--==_mimepart_5722d83c8ad34_76333ffd3485246c4422a";
363159
+ charset=UTF-8
363160
+ Content-Transfer-Encoding: 7bit
363161
+
363162
+
363163
+ ----==_mimepart_5722d83c8ad34_76333ffd3485246c4422a
363164
+ Content-Type: text/plain;
363165
+ charset=UTF-8
363166
+ Content-Transfer-Encoding: 7bit
363167
+
363168
+ Dear foo@example.com,
363169
+
363170
+ Please confirm your account with rails-identity by making a PATCH request
363171
+ on the current user with a provided verification token. For example,
363172
+
363173
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzhmNWI5YS0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzhmOTczNi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxOTAxMzcyLCJleHAiOjE0NjE5MDQ5NzJ9.fJ---vqmXnBMNk_3brOq6JxYVzwcIYotnGfWfBCFS4I verified=true
363174
+
363175
+ will confirm the account. Here is the verification token:
363176
+
363177
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzhmNWI5YS0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzhmOTczNi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxOTAxMzcyLCJleHAiOjE0NjE5MDQ5NzJ9.fJ---vqmXnBMNk_3brOq6JxYVzwcIYotnGfWfBCFS4I
363178
+
363179
+ Thank you for using rails-identity,
363180
+ rails-identity
363181
+
363182
+
363183
+ ----==_mimepart_5722d83c8ad34_76333ffd3485246c4422a
363184
+ Content-Type: text/html;
363185
+ charset=UTF-8
363186
+ Content-Transfer-Encoding: 7bit
363187
+
363188
+ <html>
363189
+ <body>
363190
+ <p>Dear foo@example.com,</p>
363191
+
363192
+ <p>Please confirm your account with rails-identity by making a PATCH request
363193
+ on the current user with a provided verification token. For example,
363194
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzhmNWI5YS0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzhmOTczNi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxOTAxMzcyLCJleHAiOjE0NjE5MDQ5NzJ9.fJ---vqmXnBMNk_3brOq6JxYVzwcIYotnGfWfBCFS4I
363195
+ verified=true</pre> will confirm the account. Here is the verification
363196
+ token:</p>
363197
+
363198
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3MzhmNWI5YS0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3MzhmOTczNi0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxOTAxMzcyLCJleHAiOjE0NjE5MDQ5NzJ9.fJ---vqmXnBMNk_3brOq6JxYVzwcIYotnGfWfBCFS4I</pre>
363199
+
363200
+ <p>Thank you for using rails-identity</p>
363201
+ <p><b>rails-identity</b></p>
363202
+
363203
+ </body>
363204
+ </html>
363205
+
363206
+ ----==_mimepart_5722d83c8ad34_76333ffd3485246c4422a--
363207
+
363208
+ [ActiveJob] [ActionMailer::DeliveryJob] [f881a0a8-fcb3-4c44-b786-44c46d523152] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.5ms
363209
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: f881a0a8-fcb3-4c44-b786-44c46d523152) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/738f5b9a-0dbc-11e6-b033-6c4008a6fa2a
363210
+ Completed 201 Created in 60ms (Views: 0.3ms | ActiveRecord: 1.0ms)
363211
+  (0.8ms) rollback transaction
363212
+  (0.1ms) begin transaction
363213
+ -----------------------------------------------------------------------
363214
+ RailsIdentity::UsersControllerTest: test_cannot_show_a_nonexisting_user
363215
+ -----------------------------------------------------------------------
363216
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363217
+ Processing by RailsIdentity::UsersController#show as HTML
363218
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"999"}
363219
+ Requires a token
363220
+ Token well formatted for user 1,
363221
+ session 1
363222
+ Cache miss. Try database.
363223
+ 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"]]
363224
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363225
+ Token well formatted and verified. Set cache.
363226
+ 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"]]
363227
+ Attempting to get RailsIdentity::User 999
363228
+ 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"]]
363229
+ 404 - RailsIdentity::User 999 cannot be found
363230
+ Completed 404 Not Found in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
363231
+  (0.1ms) rollback transaction
363232
+  (0.1ms) begin transaction
363233
+ -------------------------------------------------------------------------
363234
+ RailsIdentity::UsersControllerTest: test_update_(issue)_a_new_reset_token
363235
+ -------------------------------------------------------------------------
363236
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363237
+ 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"]]
363238
+ Processing by RailsIdentity::UsersController#update as HTML
363239
+ Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
363240
+ Accepts a token
363241
+ Token decode error: Nil JSON web token
363242
+ Suppressing error: Invalid token:
363243
+ 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"]]
363244
+  (0.0ms) SAVEPOINT active_record_1
363245
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "739aaac2-0dbc-11e6-b033-6c4008a6fa2a"], ["secret", "866b82cb-b04a-492d-a3b1-0cbfde77ddde"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzM5YWFhYzItMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.tGCfbGjhbVFQ5wytduPVCxxcI5STroouv6nZ1S7M3Uk"], ["created_at", "2016-04-29 03:42:52.591522"], ["updated_at", "2016-04-29 03:42:52.591522"]]
363246
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363247
+  (0.0ms) SAVEPOINT active_record_1
363248
+ 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
363249
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzM5YWFhYzItMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.tGCfbGjhbVFQ5wytduPVCxxcI5STroouv6nZ1S7M3Uk"], ["updated_at", "2016-04-29 03:42:52.593746"], ["uuid", "1"]]
363250
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363251
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363252
+ [ActiveJob] [ActionMailer::DeliveryJob] [4986ed84-c8e3-4399-af52-ee7f2bec0d50] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
363253
+ [ActiveJob] [ActionMailer::DeliveryJob] [4986ed84-c8e3-4399-af52-ee7f2bec0d50] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (0.1ms)
363254
+ [ActiveJob] [ActionMailer::DeliveryJob] [4986ed84-c8e3-4399-af52-ee7f2bec0d50] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (0.0ms)
363255
+ [ActiveJob] [ActionMailer::DeliveryJob] [4986ed84-c8e3-4399-af52-ee7f2bec0d50]
363256
+ RailsIdentity::UserMailer#password_reset: processed outbound mail in 2.4ms
363257
+ [ActiveJob] [ActionMailer::DeliveryJob] [4986ed84-c8e3-4399-af52-ee7f2bec0d50]
363258
+ Sent mail to one@example.com (3.5ms)
363259
+ [ActiveJob] [ActionMailer::DeliveryJob] [4986ed84-c8e3-4399-af52-ee7f2bec0d50] Date: Thu, 28 Apr 2016 22:42:52 -0500
363260
+ From: no-reply@rails-identity.com
363261
+ To: one@example.com
363262
+ Message-ID: <5722d83c92a19_76333ffd3485246c445ad@galt.local.mail>
363263
+ Subject: [rails-identity] Password Reset
363264
+ Mime-Version: 1.0
363265
+ Content-Type: multipart/alternative;
363266
+ boundary="--==_mimepart_5722d83c920fb_76333ffd3485246c444c3";
363267
+ charset=UTF-8
363268
+ Content-Transfer-Encoding: 7bit
363269
+
363270
+
363271
+ ----==_mimepart_5722d83c920fb_76333ffd3485246c444c3
363272
+ Content-Type: text/plain;
363273
+ charset=UTF-8
363274
+ Content-Transfer-Encoding: 7bit
363275
+
363276
+ Dear one@example.com,
363277
+
363278
+ You have requested to reset your password. Here are the user UUID and reset
363279
+ token. Make a PATCH request on the UUID with the reset token to set a new
363280
+ password. For instance,
363281
+
363282
+ http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
363283
+
363284
+ will set the password to "reallysecret" (without quotes) for the user to
363285
+ whom the reset token was issued.
363286
+
363287
+ Here is the reset token: @user.reset_token
363288
+
363289
+ Good luck! :)
363290
+ rails-identity
363291
+
363292
+
363293
+ ----==_mimepart_5722d83c920fb_76333ffd3485246c444c3
363294
+ Content-Type: text/html;
363295
+ charset=UTF-8
363296
+ Content-Transfer-Encoding: 7bit
363297
+
363298
+ <html>
363299
+ <body>
363300
+ <p>Dear one@example.com,</p>
363301
+
363302
+ <p>You have requested to reset your password. Here are the user UUID and
363303
+ reset token. Make a PATCH request on the UUID with the reset token to set a
363304
+ new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzM5YWFhYzItMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.tGCfbGjhbVFQ5wytduPVCxxcI5STroouv6nZ1S7M3Uk password=reallysecret
363305
+ password_confirmation=reallysecret</pre> will set the password to
363306
+ <pre>reallysecret</pre> for the user to whom the reset token was issued.
363307
+ Here is the reset token:</p>
363308
+
363309
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzM5YWFhYzItMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.tGCfbGjhbVFQ5wytduPVCxxcI5STroouv6nZ1S7M3Uk</pre>
363310
+
363311
+ <p>Good luck! :)</p>
363312
+ <p><b>rails-identity</b></p>
363313
+
363314
+ </body>
363315
+ </html>
363316
+
363317
+ ----==_mimepart_5722d83c920fb_76333ffd3485246c444c3--
363318
+
363319
+ [ActiveJob] [ActionMailer::DeliveryJob] [4986ed84-c8e3-4399-af52-ee7f2bec0d50] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.34ms
363320
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 4986ed84-c8e3-4399-af52-ee7f2bec0d50) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
363321
+ Rendered text template (0.0ms)
363322
+ Completed 204 No Content in 14ms (Views: 0.3ms | ActiveRecord: 0.5ms)
363323
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363324
+ 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
363325
+ Processing by RailsIdentity::UsersController#update as HTML
363326
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE5NTE3NzB9.sEMSm0Lvov6e8I4sC6nwRrfg9x8iWTwlz4DCtFgGfkY", "id"=>"1"}
363327
+ Accepts a token
363328
+ Token well formatted for user 1,
363329
+ session 1
363330
+ Cache miss. Try database.
363331
+ 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"]]
363332
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363333
+ Token well formatted and verified. Set cache.
363334
+ 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"]]
363335
+ Attempting to get RailsIdentity::User 1
363336
+ 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"]]
363337
+ Checking to see if authorized to access object
363338
+ Unpermitted parameters: token, id
363339
+  (0.0ms) SAVEPOINT active_record_1
363340
+ 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
363341
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-29 03:42:52.609746"], ["uuid", "1"]]
363342
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363343
+ Completed 200 OK in 6ms (Views: 0.4ms | ActiveRecord: 1.0ms)
363344
+  (0.7ms) rollback transaction
363345
+  (0.1ms) begin transaction
363346
+ -----------------------------------------------------------------------------------------------------------
363347
+ RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_token_with_invalid_username
363348
+ -----------------------------------------------------------------------------------------------------------
363349
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363350
+ Processing by RailsIdentity::UsersController#update as HTML
363351
+ Parameters: {"issue_verification_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
363352
+ Accepts a token
363353
+ Token decode error: Nil JSON web token
363354
+ Suppressing error: Invalid token:
363355
+ 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"]]
363356
+ 404 - Repia::Errors::NotFound
363357
+ Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
363358
+  (0.1ms) rollback transaction
363359
+  (0.0ms) begin transaction
363360
+ ------------------------------------------------------------------------------
363361
+ RailsIdentity::UsersControllerTest: test_update_(reissue)_a_verification_token
363362
+ ------------------------------------------------------------------------------
363363
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363364
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363365
+ 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
363366
+ 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"]]
363367
+ Processing by RailsIdentity::UsersController#update as HTML
363368
+ Parameters: {"issue_verification_token"=>true, "username"=>"one@example.com", "id"=>"current"}
363369
+ Accepts a token
363370
+ Token decode error: Nil JSON web token
363371
+ Suppressing error: Invalid token:
363372
+ 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"]]
363373
+  (0.0ms) SAVEPOINT active_record_1
363374
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "739ffae0-0dbc-11e6-b033-6c4008a6fa2a"], ["secret", "b0e13fb9-e942-401e-94ad-ec61ff96bd0a"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzM5ZmZhZTAtMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.UZs_w96tYVr7XnE1EX4lj-XrXtciGbsqMDSaOF9fL2c"], ["created_at", "2016-04-29 03:42:52.626333"], ["updated_at", "2016-04-29 03:42:52.626333"]]
363375
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363376
+  (0.0ms) SAVEPOINT active_record_1
363377
+ 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
363378
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzM5ZmZhZTAtMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.UZs_w96tYVr7XnE1EX4lj-XrXtciGbsqMDSaOF9fL2c"], ["updated_at", "2016-04-29 03:42:52.628309"], ["uuid", "1"]]
363379
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363380
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363381
+ [ActiveJob] [ActionMailer::DeliveryJob] [92793c2c-a499-4486-9f65-549d038b0d10] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
363382
+ [ActiveJob] [ActionMailer::DeliveryJob] [92793c2c-a499-4486-9f65-549d038b0d10] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
363383
+ [ActiveJob] [ActionMailer::DeliveryJob] [92793c2c-a499-4486-9f65-549d038b0d10] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
363384
+ [ActiveJob] [ActionMailer::DeliveryJob] [92793c2c-a499-4486-9f65-549d038b0d10]
363385
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.6ms
363386
+ [ActiveJob] [ActionMailer::DeliveryJob] [92793c2c-a499-4486-9f65-549d038b0d10]
363387
+ Sent mail to one@example.com (4.8ms)
363388
+ [ActiveJob] [ActionMailer::DeliveryJob] [92793c2c-a499-4486-9f65-549d038b0d10] Date: Thu, 28 Apr 2016 22:42:52 -0500
363389
+ From: no-reply@rails-identity.com
363390
+ To: one@example.com
363391
+ Message-ID: <5722d83c9b5a3_76333ffd3485246c44776@galt.local.mail>
363392
+ Subject: [rails-identity] Email Confirmation
363393
+ Mime-Version: 1.0
363394
+ Content-Type: multipart/alternative;
363395
+ boundary="--==_mimepart_5722d83c9a8bf_76333ffd3485246c446c";
363396
+ charset=UTF-8
363397
+ Content-Transfer-Encoding: 7bit
363398
+
363399
+
363400
+ ----==_mimepart_5722d83c9a8bf_76333ffd3485246c446c
363401
+ Content-Type: text/plain;
363402
+ charset=UTF-8
363403
+ Content-Transfer-Encoding: 7bit
363404
+
363405
+ Dear one@example.com,
363406
+
363407
+ Please confirm your account with rails-identity by making a PATCH request
363408
+ on the current user with a provided verification token. For example,
363409
+
363410
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzM5ZmZhZTAtMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.UZs_w96tYVr7XnE1EX4lj-XrXtciGbsqMDSaOF9fL2c verified=true
363411
+
363412
+ will confirm the account. Here is the verification token:
363413
+
363414
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzM5ZmZhZTAtMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.UZs_w96tYVr7XnE1EX4lj-XrXtciGbsqMDSaOF9fL2c
363415
+
363416
+ Thank you for using rails-identity,
363417
+ rails-identity
363418
+
363419
+
363420
+ ----==_mimepart_5722d83c9a8bf_76333ffd3485246c446c
363421
+ Content-Type: text/html;
363422
+ charset=UTF-8
363423
+ Content-Transfer-Encoding: 7bit
363424
+
363425
+ <html>
363426
+ <body>
363427
+ <p>Dear one@example.com,</p>
363428
+
363429
+ <p>Please confirm your account with rails-identity by making a PATCH request
363430
+ on the current user with a provided verification token. For example,
363431
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzM5ZmZhZTAtMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.UZs_w96tYVr7XnE1EX4lj-XrXtciGbsqMDSaOF9fL2c
363432
+ verified=true</pre> will confirm the account. Here is the verification
363433
+ token:</p>
363434
+
363435
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzM5ZmZhZTAtMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.UZs_w96tYVr7XnE1EX4lj-XrXtciGbsqMDSaOF9fL2c</pre>
363436
+
363437
+ <p>Thank you for using rails-identity</p>
363438
+ <p><b>rails-identity</b></p>
363439
+
363440
+ </body>
363441
+ </html>
363442
+
363443
+ ----==_mimepart_5722d83c9a8bf_76333ffd3485246c446c--
363444
+
363445
+ [ActiveJob] [ActionMailer::DeliveryJob] [92793c2c-a499-4486-9f65-549d038b0d10] Performed ActionMailer::DeliveryJob from Inline(mailers) in 7.84ms
363446
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 92793c2c-a499-4486-9f65-549d038b0d10) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
363447
+ Rendered text template (0.0ms)
363448
+ Completed 204 No Content in 16ms (Views: 0.7ms | ActiveRecord: 0.5ms)
363449
+ 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
363450
+ Processing by RailsIdentity::UsersController#update as HTML
363451
+ Parameters: {"verified"=>true, "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNzM5ZmZhZTAtMGRiYy0xMWU2LWIwMzMtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTkwMTM3MiwiZXhwIjoxNDYxOTA0OTcyfQ.UZs_w96tYVr7XnE1EX4lj-XrXtciGbsqMDSaOF9fL2c", "id"=>"current"}
363452
+ Accepts a token
363453
+ Token well formatted for user 1,
363454
+ session 739ffae0-0dbc-11e6-b033-6c4008a6fa2a
363455
+ Cache miss. Try database.
363456
+ 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"]]
363457
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "739ffae0-0dbc-11e6-b033-6c4008a6fa2a"]]
363458
+ Token well formatted and verified. Set cache.
363459
+ 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"]]
363460
+ Attempting to get RailsIdentity::User 1
363461
+ 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"]]
363462
+ Checking to see if authorized to access object
363463
+ Unpermitted parameters: token, id
363464
+  (0.0ms) SAVEPOINT active_record_1
363465
+ 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
363466
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363467
+ Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 0.8ms)
363468
+  (0.4ms) rollback transaction
363469
+  (0.1ms) begin transaction
363470
+ ------------------------------------------------------------------------------------------------------
363471
+ RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_with_invalid_username
363472
+ ------------------------------------------------------------------------------------------------------
363473
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363474
+ Processing by RailsIdentity::UsersController#update as HTML
363475
+ Parameters: {"issue_reset_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
363476
+ Accepts a token
363477
+ Token decode error: Nil JSON web token
363478
+ Suppressing error: Invalid token:
363479
+ 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"]]
363480
+ 404 - Repia::Errors::NotFound
363481
+ Completed 404 Not Found in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)
363482
+  (0.1ms) rollback transaction
363483
+  (0.0ms) begin transaction
363484
+ --------------------------------------------------------------------------------
363485
+ RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_a_password
363486
+ --------------------------------------------------------------------------------
363487
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363488
+ Processing by RailsIdentity::UsersController#create as HTML
363489
+ Parameters: {"username"=>"foo@example.com"}
363490
+ Accepts a token
363491
+ Token decode error: Nil JSON web token
363492
+ Suppressing error: Invalid token:
363493
+ Create new user
363494
+  (0.0ms) SAVEPOINT active_record_1
363495
+ 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
363496
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
363497
+ Completed 400 Bad Request in 3ms (Views: 0.2ms | ActiveRecord: 0.2ms)
363498
+  (0.0ms) rollback transaction
363499
+  (0.0ms) begin transaction
363500
+ ------------------------------------------------------------------
363501
+ RailsIdentity::UsersControllerTest: test_admin_can_show_other_user
363502
+ ------------------------------------------------------------------
363503
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363504
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
363505
+ Processing by RailsIdentity::UsersController#show as HTML
363506
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxOTUxNzcwfQ.MYh7wI1Vp32qGU0nMUUx1M9vNWYfxBfkRL9YBSdp6D0", "id"=>"1"}
363507
+ Requires a token
363508
+ Token well formatted for user admin_one,
363509
+ session session_admin_one
363510
+ Cache miss. Try database.
363511
+ 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"]]
363512
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
363513
+ Token well formatted and verified. Set cache.
363514
+ 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"]]
363515
+ Attempting to get RailsIdentity::User 1
363516
+ 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"]]
363517
+ Checking to see if authorized to access object
363518
+ Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 0.2ms)
363519
+  (0.1ms) rollback transaction
363520
+  (0.0ms) begin transaction
363521
+ -----------------------------------------------------------------
363522
+ RailsIdentity::UsersControllerTest: test_admin_can_list_all_users
363523
+ -----------------------------------------------------------------
363524
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363525
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
363526
+ Processing by RailsIdentity::UsersController#index as HTML
363527
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxOTUxNzcwfQ.MYh7wI1Vp32qGU0nMUUx1M9vNWYfxBfkRL9YBSdp6D0"}
363528
+ Requires an admin token
363529
+ Token well formatted for user admin_one,
363530
+ session session_admin_one
363531
+ Cache miss. Try database.
363532
+ 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"]]
363533
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
363534
+ Token well formatted and verified. Set cache.
363535
+ 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"]]
363536
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL
363537
+ Completed 200 OK in 6ms (Views: 1.4ms | ActiveRecord: 0.2ms)
363538
+  (0.1ms) SELECT COUNT(*) FROM "rails_identity_sessions"
363539
+  (0.1ms) rollback transaction
363540
+  (0.0ms) begin transaction
363541
+ -------------------------------------------------------------------------------------------------
363542
+ RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_without_username
363543
+ -------------------------------------------------------------------------------------------------
363544
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363545
+ Processing by RailsIdentity::UsersController#update as HTML
363546
+ Parameters: {"issue_reset_token"=>true, "id"=>"current"}
363547
+ Accepts a token
363548
+ Token decode error: Nil JSON web token
363549
+ Suppressing error: Invalid token:
363550
+ 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
363551
+ 404 - Repia::Errors::NotFound
363552
+ Completed 404 Not Found in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)
363553
+  (0.0ms) rollback transaction
363554
+  (0.0ms) begin transaction
363555
+ --------------------------------------------------------------------
363556
+ RailsIdentity::UsersControllerTest: test_admin_can_delete_other_user
363557
+ --------------------------------------------------------------------
363558
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363559
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
363560
+ Processing by RailsIdentity::UsersController#destroy as HTML
363561
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxOTUxNzcwfQ.MYh7wI1Vp32qGU0nMUUx1M9vNWYfxBfkRL9YBSdp6D0", "id"=>"1"}
363562
+ Requires a token
363563
+ Token well formatted for user admin_one,
363564
+ session session_admin_one
363565
+ Cache miss. Try database.
363566
+ 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"]]
363567
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
363568
+ Token well formatted and verified. Set cache.
363569
+ 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"]]
363570
+ Attempting to get RailsIdentity::User 1
363571
+ 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"]]
363572
+ Checking to see if authorized to access object
363573
+  (0.0ms) SAVEPOINT active_record_1
363574
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "deleted_at" = '2016-04-29 03:42:52.694990' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
363575
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363576
+ Rendered text template (0.0ms)
363577
+ Completed 204 No Content in 5ms (Views: 0.3ms | ActiveRecord: 0.4ms)
363578
+  (0.4ms) rollback transaction
363579
+  (0.0ms) begin transaction
363580
+ --------------------------------------------------------------------------
363581
+ RailsIdentity::UserTest: test_user_is_not_valid_if_username_already_exists
363582
+ --------------------------------------------------------------------------
363583
+  (0.1ms) SAVEPOINT active_record_1
363584
+ 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
363585
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
363586
+  (0.0ms) rollback transaction
363587
+  (0.0ms) begin transaction
363588
+ ---------------------------------------------------------------------------
363589
+ RailsIdentity::UserTest: test_user_is_not_valid_if_username_is_malformatted
363590
+ ---------------------------------------------------------------------------
363591
+  (0.0ms) SAVEPOINT active_record_1
363592
+ 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
363593
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
363594
+  (0.0ms) rollback transaction
363595
+  (0.1ms) begin transaction
363596
+ ------------------------------------------------------------------
363597
+ RailsIdentity::UserTest: test_user_is_not_valid_without_a_password
363598
+ ------------------------------------------------------------------
363599
+  (0.0ms) SAVEPOINT active_record_1
363600
+ 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
363601
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
363602
+  (0.0ms) rollback transaction
363603
+  (0.0ms) begin transaction
363604
+ ------------------------------------------------------------------
363605
+ RailsIdentity::UserTest: test_user_is_not_valid_without_a_username
363606
+ ------------------------------------------------------------------
363607
+  (0.0ms) SAVEPOINT active_record_1
363608
+ 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
363609
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
363610
+  (0.0ms) rollback transaction
363611
+  (0.0ms) begin transaction
363612
+ ---------------------------------------------------------------
363613
+ RailsIdentity::UserTest: test_user_has_a_role_of_100_by_default
363614
+ ---------------------------------------------------------------
363615
+  (0.0ms) SAVEPOINT active_record_1
363616
+ 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
363617
+ SQL (0.2ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "new@example.com"], ["password_digest", "$2a$04$b7tH8GtvRZBoel.gC0gQ5esQuKyXxa5qwTo10e7BEY8R/.I39tC/C"], ["role", 10], ["created_at", "2016-04-29 03:42:52.712842"], ["updated_at", "2016-04-29 03:42:52.712842"], ["uuid", "73ad50d2-0dbc-11e6-b033-6c4008a6fa2a"]]
363618
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363619
+  (0.3ms) rollback transaction
363620
+  (0.0ms) begin transaction
363621
+ ----------------------------------------------------------
363622
+ RailsIdentity::UserTest: test_user_can_issue_a_reset_token
363623
+ ----------------------------------------------------------
363624
+  (0.0ms) SAVEPOINT active_record_1
363625
+ 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
363626
+ 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$N9ScPLqFwhaICBFaoV7OH.3tbQgDDLt4zuk1JL.KrETaYrMFQOo.2"], ["role", 10], ["created_at", "2016-04-29 03:42:52.717826"], ["updated_at", "2016-04-29 03:42:52.717826"], ["uuid", "73ae138c-0dbc-11e6-b033-6c4008a6fa2a"]]
363627
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363628
+  (0.0ms) SAVEPOINT active_record_1
363629
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "73ae138c-0dbc-11e6-b033-6c4008a6fa2a"], ["uuid", "73ae4730-0dbc-11e6-b033-6c4008a6fa2a"], ["secret", "23713fa1-e6f1-41ad-9ac9-06932310b4e9"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3M2FlMTM4Yy0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3M2FlNDczMC0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxOTAxMzcyLCJleHAiOjE0NjE5MDQ5NzJ9.qdn-pe4Bbe4zU9DxFUejmReQ2BPnkTd60Es9vQ6DxrM"], ["created_at", "2016-04-29 03:42:52.720046"], ["updated_at", "2016-04-29 03:42:52.720046"]]
363630
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363631
+  (0.4ms) rollback transaction
363632
+  (0.1ms) begin transaction
363633
+ -----------------------------------------------------------------
363634
+ RailsIdentity::UserTest: test_user_can_issue_a_verification_token
363635
+ -----------------------------------------------------------------
363636
+  (0.0ms) SAVEPOINT active_record_1
363637
+ 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
363638
+ 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$bsQ5Cbd0zzomtMHs0b6pi.g1p6oc821ZRo4O1MTp2/XWMyHsE/BRG"], ["role", 10], ["created_at", "2016-04-29 03:42:52.724021"], ["updated_at", "2016-04-29 03:42:52.724021"], ["uuid", "73af0418-0dbc-11e6-b033-6c4008a6fa2a"]]
363639
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363640
+  (0.0ms) SAVEPOINT active_record_1
363641
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "73af0418-0dbc-11e6-b033-6c4008a6fa2a"], ["uuid", "73af341a-0dbc-11e6-b033-6c4008a6fa2a"], ["secret", "dba4b1e9-51d4-4b17-add5-ec894f018de1"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI3M2FmMDQxOC0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI3M2FmMzQxYS0wZGJjLTExZTYtYjAzMy02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxOTAxMzcyLCJleHAiOjE0NjE5MDQ5NzJ9.o14p9MblBQ3x5DmoCoXgOMMwuaGCRBpmHoRGpkqlTi8"], ["created_at", "2016-04-29 03:42:52.725910"], ["updated_at", "2016-04-29 03:42:52.725910"]]
363642
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363643
+  (0.4ms) rollback transaction
363644
+  (0.1ms) begin transaction
363645
+ ----------------------------------------------------------------------
363646
+ RailsIdentity::UserTest: test_user_is_valid_with_username_and_password
363647
+ ----------------------------------------------------------------------
363648
+  (0.0ms) SAVEPOINT active_record_1
363649
+ 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
363650
+ 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$mT4mqWwPhxGSuQUTW0lN0.p/CgVWOqPPJas2GOg9xzGpRNgJVabh6"], ["role", 10], ["created_at", "2016-04-29 03:42:52.730846"], ["updated_at", "2016-04-29 03:42:52.730846"], ["uuid", "73b01010-0dbc-11e6-b033-6c4008a6fa2a"]]
363651
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363652
+  (0.4ms) rollback transaction
363653
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
363654
+  (0.1ms) begin transaction
363655
+ Fixture Delete (1.2ms) DELETE FROM "rails_identity_sessions"
363656
+ Fixture Insert (0.1ms) INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('1', '1', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs', 'secret', '2016-05-03 01:57:40', '2016-05-03 01:57:40')
363657
+ Fixture Insert (0.1ms) INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('2', '2', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIyIiwidXNlcl91dWlkIjoiMiIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.uAbB_-fxfwv8OlLAeC6eZMZad5Wsj2Mols6W1kqpdsk', 'secret', '2016-05-03 01:57:40', '2016-05-03 01:57:40')
363658
+ Fixture Insert (0.1ms) INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('session_admin_one', 'admin_one', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYyMjkxMDYwfQ.YaWq0Qk0nOtnltNyJbKeqajHXMJqBkQLTqdIBWeEVnE', 'secret', '2016-05-03 01:57:40', '2016-05-03 01:57:40')
363659
+ Fixture Delete (0.8ms) DELETE FROM "rails_identity_users"
363660
+ 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$Lb83xmLDOpaOhSDPDyoHIe0UbCsDCxhhPBAT5UAcp5tZcJDff2cpO', 10, 't', '2016-05-03 01:57:40', '2016-05-03 01:57:40')
363661
+ 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$7H2g60FqdSVg6sQn/xvYWuTueia6e7KlK/YdS6X7IgWgEzp.dLd2e', 10, 't', '2016-05-03 01:57:40', '2016-05-03 01:57:40')
363662
+ 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$nf0TcmUFOs.3VInfnXY5oe9ok3q1tLc3DnEQM.Z6K5hwq/Jvjh5cq', 100, 't', '2016-05-03 01:57:40', '2016-05-03 01:57:40')
363663
+  (0.7ms) commit transaction
363664
+  (0.0ms) begin transaction
363665
+ ------------------------------------------------------------------
363666
+ RailsIdentity::UserTest: test_user_is_not_valid_without_a_username
363667
+ ------------------------------------------------------------------
363668
+  (0.1ms) SAVEPOINT active_record_1
363669
+ RailsIdentity::User Exists (0.2ms) 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
363670
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
363671
+  (0.0ms) rollback transaction
363672
+  (0.0ms) begin transaction
363673
+ ---------------------------------------------------------------------------
363674
+ RailsIdentity::UserTest: test_user_is_not_valid_if_username_is_malformatted
363675
+ ---------------------------------------------------------------------------
363676
+  (0.0ms) SAVEPOINT active_record_1
363677
+ RailsIdentity::User Exists (0.0ms) 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
363678
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
363679
+  (0.0ms) rollback transaction
363680
+  (0.1ms) begin transaction
363681
+ ----------------------------------------------------------
363682
+ RailsIdentity::UserTest: test_user_can_issue_a_reset_token
363683
+ ----------------------------------------------------------
363684
+  (0.0ms) SAVEPOINT active_record_1
363685
+ 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
363686
+ SQL (0.4ms) INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$0J49NwWxOkdk.A2KRs3SAOKa1rYg1NKsEuvDV4eQn/zRtj4x.MIr2"], ["role", 10], ["created_at", "2016-05-03 01:57:40.374876"], ["updated_at", "2016-05-03 01:57:40.374876"], ["uuid", "6ae1fb74-10d2-11e6-a9de-6c4008a6fa2a"]]
363687
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363688
+  (0.1ms) SAVEPOINT active_record_1
363689
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "6ae1fb74-10d2-11e6-a9de-6c4008a6fa2a"], ["uuid", "6aec21a8-10d2-11e6-a9de-6c4008a6fa2a"], ["secret", "f1bc893f-246f-48c8-abde-067745dfc21f"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2YWUxZmI3NC0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2YWVjMjFhOC0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYyMjQwNjYwLCJleHAiOjE0NjIyNDQyNjB9.n8w63jT8M-8ADDWxFizIuhJmIZj3bo_GbrMi-k7QGxM"], ["created_at", "2016-05-03 01:57:40.442860"], ["updated_at", "2016-05-03 01:57:40.442860"]]
363690
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363691
+  (0.4ms) rollback transaction
363692
+  (0.0ms) begin transaction
363693
+ ------------------------------------------------------------------
363694
+ RailsIdentity::UserTest: test_user_is_not_valid_without_a_password
363695
+ ------------------------------------------------------------------
363696
+  (0.0ms) SAVEPOINT active_record_1
363697
+ 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
363698
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
363699
+  (0.0ms) rollback transaction
363700
+  (0.0ms) begin transaction
363701
+ --------------------------------------------------------------------------
363702
+ RailsIdentity::UserTest: test_user_is_not_valid_if_username_already_exists
363703
+ --------------------------------------------------------------------------
363704
+  (0.0ms) SAVEPOINT active_record_1
363705
+ 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
363706
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
363707
+  (0.0ms) rollback transaction
363708
+  (0.1ms) begin transaction
363709
+ -----------------------------------------------------------------
363710
+ RailsIdentity::UserTest: test_user_can_issue_a_verification_token
363711
+ -----------------------------------------------------------------
363712
+  (0.0ms) SAVEPOINT active_record_1
363713
+ 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
363714
+ 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$/g8nm8UIQYdFJuU4Q4htrOAsOQIhSkM5vV3vzrVV4A6x/jxoY0GnS"], ["role", 10], ["created_at", "2016-05-03 01:57:40.452944"], ["updated_at", "2016-05-03 01:57:40.452944"], ["uuid", "6aede3a8-10d2-11e6-a9de-6c4008a6fa2a"]]
363715
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363716
+  (0.0ms) SAVEPOINT active_record_1
363717
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "6aede3a8-10d2-11e6-a9de-6c4008a6fa2a"], ["uuid", "6aee0de2-10d2-11e6-a9de-6c4008a6fa2a"], ["secret", "281ef879-9db6-412c-b27f-6dd669b6dde6"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2YWVkZTNhOC0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2YWVlMGRlMi0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYyMjQwNjYwLCJleHAiOjE0NjIyNDQyNjB9.YAnHE1GNzbduhr6ULfdx4bbAghoQPYaKG7xba9lEMdw"], ["created_at", "2016-05-03 01:57:40.454768"], ["updated_at", "2016-05-03 01:57:40.454768"]]
363718
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363719
+  (0.4ms) rollback transaction
363720
+  (0.1ms) begin transaction
363721
+ ----------------------------------------------------------------------
363722
+ RailsIdentity::UserTest: test_user_is_valid_with_username_and_password
363723
+ ----------------------------------------------------------------------
363724
+  (0.0ms) SAVEPOINT active_record_1
363725
+ 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
363726
+ 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$OW53hmyDM8kJ2ip27Oee7.wv.Q3kKO.yVDbjcXc9D0JdVghMAgzpm"], ["role", 10], ["created_at", "2016-05-03 01:57:40.458775"], ["updated_at", "2016-05-03 01:57:40.458775"], ["uuid", "6aeec73c-10d2-11e6-a9de-6c4008a6fa2a"]]
363727
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363728
+  (0.3ms) rollback transaction
363729
+  (0.1ms) begin transaction
363730
+ ---------------------------------------------------------------
363731
+ RailsIdentity::UserTest: test_user_has_a_role_of_100_by_default
363732
+ ---------------------------------------------------------------
363733
+  (0.0ms) SAVEPOINT active_record_1
363734
+ 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
363735
+ 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$zohxH4uLiWJn0juGTOIeWuXz7aqfB6X.5QOywRXIxRLuVRe4lE78K"], ["role", 10], ["created_at", "2016-05-03 01:57:40.462602"], ["updated_at", "2016-05-03 01:57:40.462602"], ["uuid", "6aef5c7e-10d2-11e6-a9de-6c4008a6fa2a"]]
363736
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363737
+  (0.3ms) rollback transaction
363738
+  (0.0ms) begin transaction
363739
+ --------------------------------------------------------------------------
363740
+ RailsIdentity::SessionTest: test_session_has_token_and_secret_when_created
363741
+ --------------------------------------------------------------------------
363742
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363743
+  (0.1ms) rollback transaction
363744
+  (0.1ms) begin transaction
363745
+ -----------------------------------------------
363746
+ RailsIdentity::SessionTest: test_save_a_session
363747
+ -----------------------------------------------
363748
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363749
+  (0.0ms) SAVEPOINT active_record_1
363750
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "6af000e8-10d2-11e6-a9de-6c4008a6fa2a"], ["secret", "b26e6843-70a2-43f0-b0fd-6ca1ca4e165f"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmFmMDAwZTgtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MCwiZXhwIjoxNDYzNDUwMjYwfQ.qvuIGE4UaWf03AZauQZrG1oYUk-MOWA7-lSG9Yk47ys"], ["created_at", "2016-05-03 01:57:40.467591"], ["updated_at", "2016-05-03 01:57:40.467591"]]
363751
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363752
+  (0.3ms) rollback transaction
363753
+  (0.1ms) begin transaction
363754
+ ---------------------------------------------------------------------
363755
+ RailsIdentity::SessionTest: test_cannot_save_a_session_without_a_user
363756
+ ---------------------------------------------------------------------
363757
+  (0.0ms) rollback transaction
363758
+  (0.0ms) begin transaction
363759
+ ----------------------------------------------------------------------------------------------
363760
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_non-existent_username
363761
+ ----------------------------------------------------------------------------------------------
363762
+ RailsIdentity::Session Load (0.2ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363763
+ Processing by RailsIdentity::SessionsController#create as HTML
363764
+ Parameters: {"username"=>"idontexist", "password"=>"[FILTERED]"}
363765
+ 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", "idontexist"]]
363766
+ Attempting to get user
363767
+ Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms)
363768
+  (0.1ms) rollback transaction
363769
+  (0.0ms) begin transaction
363770
+ ------------------------------------------------------------------------------------
363771
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_username
363772
+ ------------------------------------------------------------------------------------
363773
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363774
+ Processing by RailsIdentity::SessionsController#create as HTML
363775
+ Parameters: {"password"=>"[FILTERED]"}
363776
+ 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
363777
+ Attempting to get user
363778
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
363779
+  (0.1ms) rollback transaction
363780
+  (0.0ms) begin transaction
363781
+ -----------------------------------------------------------------------------------
363782
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_if_not_verified
363783
+ -----------------------------------------------------------------------------------
363784
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363785
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363786
+  (0.0ms) SAVEPOINT active_record_1
363787
+ 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
363788
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "verified" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verified", "f"], ["updated_at", "2016-05-03 01:57:40.494282"], ["uuid", "1"]]
363789
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363790
+ Processing by RailsIdentity::SessionsController#create as HTML
363791
+ Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
363792
+ 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"]]
363793
+ 401 - Repia::Errors::Unauthorized
363794
+ Completed 401 Unauthorized in 69ms (Views: 0.3ms | ActiveRecord: 0.1ms)
363795
+  (0.5ms) rollback transaction
363796
+  (0.1ms) begin transaction
363797
+ ----------------------------------------------------------------------
363798
+ RailsIdentity::SessionsControllerTest: test_public_cannot_show_session
363799
+ ----------------------------------------------------------------------
363800
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363801
+ Processing by RailsIdentity::SessionsController#show as HTML
363802
+ Parameters: {"id"=>"1"}
363803
+ Requires a token
363804
+ Token decode error: Nil JSON web token
363805
+ 401 - Invalid token:
363806
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
363807
+  (0.1ms) rollback transaction
363808
+  (0.0ms) begin transaction
363809
+ --------------------------------------------------------------------
363810
+ RailsIdentity::SessionsControllerTest: test_delete_a_current_session
363811
+ --------------------------------------------------------------------
363812
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363813
+ Processing by RailsIdentity::SessionsController#destroy as HTML
363814
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"current"}
363815
+ Requires a token
363816
+ Token well formatted for user 1,
363817
+ session 1
363818
+ Cache miss. Try database.
363819
+ 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"]]
363820
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363821
+ Token well formatted and verified. Set cache.
363822
+ 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"]]
363823
+ Attempting to get RailsIdentity::Session 1
363824
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363825
+ Checking to see if authorized to access object
363826
+ 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"]]
363827
+  (0.1ms) SAVEPOINT active_record_1
363828
+ SQL (0.3ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
363829
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363830
+ Rendered text template (0.0ms)
363831
+ Completed 204 No Content in 22ms (Views: 9.4ms | ActiveRecord: 0.9ms)
363832
+  (0.4ms) rollback transaction
363833
+  (0.0ms) begin transaction
363834
+ -------------------------------------------------------------------------
363835
+ RailsIdentity::SessionsControllerTest: test_public_cannot_create_sessions
363836
+ -------------------------------------------------------------------------
363837
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363838
+ Processing by RailsIdentity::SessionsController#index as HTML
363839
+ Requires a token
363840
+ Token decode error: Nil JSON web token
363841
+ 401 - Invalid token:
363842
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
363843
+  (0.1ms) rollback transaction
363844
+  (0.0ms) begin transaction
363845
+ ------------------------------------------------------------
363846
+ RailsIdentity::SessionsControllerTest: test_delete_a_session
363847
+ ------------------------------------------------------------
363848
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363849
+ Processing by RailsIdentity::SessionsController#destroy as HTML
363850
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"1"}
363851
+ Requires a token
363852
+ Token well formatted for user 1,
363853
+ session 1
363854
+ Cache miss. Try database.
363855
+ 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"]]
363856
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363857
+ Token well formatted and verified. Set cache.
363858
+ 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"]]
363859
+ Attempting to get RailsIdentity::Session 1
363860
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363861
+ Checking to see if authorized to access object
363862
+ 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"]]
363863
+  (0.1ms) SAVEPOINT active_record_1
363864
+ SQL (0.2ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
363865
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363866
+ Rendered text template (0.0ms)
363867
+ Completed 204 No Content in 7ms (Views: 0.4ms | ActiveRecord: 0.5ms)
363868
+  (0.3ms) rollback transaction
363869
+  (0.1ms) begin transaction
363870
+ -----------------------------------------------------------------------
363871
+ RailsIdentity::SessionsControllerTest: test_public_cannot_list_sessions
363872
+ -----------------------------------------------------------------------
363873
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363874
+ Processing by RailsIdentity::SessionsController#index as HTML
363875
+ Requires a token
363876
+ Token decode error: Nil JSON web token
363877
+ 401 - Invalid token:
363878
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
363879
+  (0.1ms) rollback transaction
363880
+  (0.0ms) begin transaction
363881
+ -----------------------------------------------------------------------------------------
363882
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_a_wrong_password
363883
+ -----------------------------------------------------------------------------------------
363884
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363885
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363886
+ Processing by RailsIdentity::SessionsController#create as HTML
363887
+ Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
363888
+ 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"]]
363889
+ Attempting to get user
363890
+ Completed 401 Unauthorized in 65ms (Views: 0.3ms | ActiveRecord: 0.1ms)
363891
+  (0.1ms) rollback transaction
363892
+  (0.0ms) begin transaction
363893
+ --------------------------------------------------------------------------------------
363894
+ RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_a_password
363895
+ --------------------------------------------------------------------------------------
363896
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363897
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363898
+ Processing by RailsIdentity::SessionsController#create as HTML
363899
+ Parameters: {"username"=>"one@example.com"}
363900
+ 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"]]
363901
+ Attempting to get user
363902
+ Completed 401 Unauthorized in 68ms (Views: 0.3ms | ActiveRecord: 0.1ms)
363903
+  (0.1ms) rollback transaction
363904
+  (0.0ms) begin transaction
363905
+ ------------------------------------------------------------
363906
+ RailsIdentity::SessionsControllerTest: test_create_a_session
363907
+ ------------------------------------------------------------
363908
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363909
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363910
+ Processing by RailsIdentity::SessionsController#create as HTML
363911
+ Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
363912
+ 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"]]
363913
+  (0.1ms) SAVEPOINT active_record_1
363914
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "6b28ce32-10d2-11e6-a9de-6c4008a6fa2a"], ["secret", "e4e3893b-5ce1-4661-978a-bbb14876601b"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmIyOGNlMzItMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MCwiZXhwIjoxNDYzNDUwMjYwfQ.a2jSDTFtK7Y0FcsaANSS7EVT1YkNWjlF8c0zmJy2Kj8"], ["created_at", "2016-05-03 01:57:40.840262"], ["updated_at", "2016-05-03 01:57:40.840262"]]
363915
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363916
+ Completed 201 Created in 71ms (Views: 0.4ms | ActiveRecord: 0.4ms)
363917
+  (0.8ms) rollback transaction
363918
+  (0.0ms) begin transaction
363919
+ ------------------------------------------------------------------
363920
+ RailsIdentity::SessionsControllerTest: test_public_can_see_options
363921
+ ------------------------------------------------------------------
363922
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363923
+ Processing by RailsIdentity::SessionsController#options as HTML
363924
+ Rendered text template (0.0ms)
363925
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
363926
+  (0.1ms) rollback transaction
363927
+  (0.0ms) begin transaction
363928
+ ----------------------------------------------------------------------------
363929
+ RailsIdentity::SessionsControllerTest: test_admin_can_delete_other's_session
363930
+ ----------------------------------------------------------------------------
363931
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363932
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
363933
+ Processing by RailsIdentity::SessionsController#destroy as HTML
363934
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYyMjkxMDYwfQ.YaWq0Qk0nOtnltNyJbKeqajHXMJqBkQLTqdIBWeEVnE", "id"=>"1"}
363935
+ Requires a token
363936
+ Token well formatted for user admin_one,
363937
+ session session_admin_one
363938
+ Cache miss. Try database.
363939
+ 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"]]
363940
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
363941
+ Token well formatted and verified. Set cache.
363942
+ 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"]]
363943
+ Attempting to get RailsIdentity::Session 1
363944
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363945
+ Checking to see if authorized to access object
363946
+  (0.1ms) SAVEPOINT active_record_1
363947
+ SQL (0.1ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
363948
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363949
+ Rendered text template (0.0ms)
363950
+ Completed 204 No Content in 5ms (Views: 0.3ms | ActiveRecord: 0.4ms)
363951
+  (0.4ms) rollback transaction
363952
+  (0.0ms) begin transaction
363953
+ ----------------------------------------------------------------------------
363954
+ RailsIdentity::SessionsControllerTest: test_user_cannot_list_expired_session
363955
+ ----------------------------------------------------------------------------
363956
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363957
+ 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"]]
363958
+  (0.0ms) SAVEPOINT active_record_1
363959
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "6b2bf756-10d2-11e6-a9de-6c4008a6fa2a"], ["secret", "0e17904b-5897-41ec-98ff-43f877e6b1a9"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmIyYmY3NTYtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MCwiZXhwIjoxNDYyMjQwNjU5fQ.sDHo_XE2PpHIfMNz0BwSQyO01VMwHPc2P2-2tBilNBo"], ["created_at", "2016-05-03 01:57:40.860591"], ["updated_at", "2016-05-03 01:57:40.860591"]]
363960
+  (0.0ms) RELEASE SAVEPOINT active_record_1
363961
+ Processing by RailsIdentity::SessionsController#index as HTML
363962
+ Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs"}
363963
+ Requires a token
363964
+ Token well formatted for user 1,
363965
+ session 1
363966
+ Cache miss. Try database.
363967
+ 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"]]
363968
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363969
+ Token well formatted and verified. Set cache.
363970
+ 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"]]
363971
+ Attempting to get user 1
363972
+ Attempting to get RailsIdentity::User 1
363973
+ 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"]]
363974
+ Checking to see if authorized to access object
363975
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
363976
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [c0cba654-d077-4b98-9132-b0f2e1814da3] Performing RailsIdentity::SessionsCleanupJob from Inline(default) with arguments: "6b2bf756-10d2-11e6-a9de-6c4008a6fa2a"
363977
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [c0cba654-d077-4b98-9132-b0f2e1814da3] RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "6b2bf756-10d2-11e6-a9de-6c4008a6fa2a"]]
363978
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [c0cba654-d077-4b98-9132-b0f2e1814da3]  (0.1ms) SAVEPOINT active_record_1
363979
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [c0cba654-d077-4b98-9132-b0f2e1814da3] SQL (0.3ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "6b2bf756-10d2-11e6-a9de-6c4008a6fa2a"]]
363980
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [c0cba654-d077-4b98-9132-b0f2e1814da3]  (0.0ms) RELEASE SAVEPOINT active_record_1
363981
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [c0cba654-d077-4b98-9132-b0f2e1814da3] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 2.08ms
363982
+ [ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: c0cba654-d077-4b98-9132-b0f2e1814da3) to Inline(default) with arguments: "6b2bf756-10d2-11e6-a9de-6c4008a6fa2a"
363983
+ Completed 200 OK in 64ms (Views: 0.6ms | ActiveRecord: 0.9ms)
363984
+  (0.7ms) rollback transaction
363985
+  (0.0ms) begin transaction
363986
+ --------------------------------------------------------------------------------
363987
+ RailsIdentity::SessionsControllerTest: test_cannot_delete_a_non-existent_session
363988
+ --------------------------------------------------------------------------------
363989
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363990
+ Processing by RailsIdentity::SessionsController#destroy as HTML
363991
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"999"}
363992
+ Requires a token
363993
+ Token well formatted for user 1,
363994
+ session 1
363995
+ Cache miss. Try database.
363996
+ 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"]]
363997
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
363998
+ Token well formatted and verified. Set cache.
363999
+ 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"]]
364000
+ Attempting to get RailsIdentity::Session 999
364001
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "999"]]
364002
+ 404 - RailsIdentity::Session 999 cannot be found
364003
+ Completed 404 Not Found in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
364004
+  (0.1ms) rollback transaction
364005
+  (0.0ms) begin transaction
364006
+ ---------------------------------------------------------------------------------------------------
364007
+ RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions_using_user_id_in_routing
364008
+ ---------------------------------------------------------------------------------------------------
364009
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364010
+ 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"]]
364011
+ Processing by RailsIdentity::SessionsController#index as HTML
364012
+ Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs"}
364013
+ Requires a token
364014
+ Token well formatted for user 1,
364015
+ session 1
364016
+ Cache miss. Try database.
364017
+ 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"]]
364018
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364019
+ Token well formatted and verified. Set cache.
364020
+ 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"]]
364021
+ Attempting to get user 1
364022
+ Attempting to get RailsIdentity::User 1
364023
+ 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"]]
364024
+ Checking to see if authorized to access object
364025
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
364026
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [8d4f311d-0d5f-4df1-9445-52ae721092d2] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
364027
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [8d4f311d-0d5f-4df1-9445-52ae721092d2] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 0.06ms
364028
+ [ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: 8d4f311d-0d5f-4df1-9445-52ae721092d2) to Inline(default)
364029
+ Completed 200 OK in 5ms (Views: 0.4ms | ActiveRecord: 0.2ms)
364030
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
364031
+ 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"]]
364032
+  (0.0ms) rollback transaction
364033
+  (0.0ms) begin transaction
364034
+ --------------------------------------------------------------------------
364035
+ RailsIdentity::SessionsControllerTest: test_admin_can_show_other's_session
364036
+ --------------------------------------------------------------------------
364037
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364038
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
364039
+ Processing by RailsIdentity::SessionsController#show as HTML
364040
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYyMjkxMDYwfQ.YaWq0Qk0nOtnltNyJbKeqajHXMJqBkQLTqdIBWeEVnE", "id"=>"1"}
364041
+ Requires a token
364042
+ Token well formatted for user admin_one,
364043
+ session session_admin_one
364044
+ Cache miss. Try database.
364045
+ 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"]]
364046
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
364047
+ Token well formatted and verified. Set cache.
364048
+ 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"]]
364049
+ Attempting to get RailsIdentity::Session 1
364050
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364051
+ Checking to see if authorized to access object
364052
+ Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.2ms)
364053
+  (0.1ms) rollback transaction
364054
+  (0.0ms) begin transaction
364055
+ ----------------------------------------------------------
364056
+ RailsIdentity::SessionsControllerTest: test_show_a_session
364057
+ ----------------------------------------------------------
364058
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364059
+ Processing by RailsIdentity::SessionsController#show as HTML
364060
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"1"}
364061
+ Requires a token
364062
+ Token well formatted for user 1,
364063
+ session 1
364064
+ Cache miss. Try database.
364065
+ 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"]]
364066
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364067
+ Token well formatted and verified. Set cache.
364068
+ 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"]]
364069
+ Attempting to get RailsIdentity::Session 1
364070
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364071
+ Checking to see if authorized to access object
364072
+ 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"]]
364073
+ Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms)
364074
+  (0.1ms) rollback transaction
364075
+  (0.0ms) begin transaction
364076
+ -----------------------------------------------------------------------
364077
+ RailsIdentity::SessionsControllerTest: test_cannot_show_other's_session
364078
+ -----------------------------------------------------------------------
364079
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364080
+ Processing by RailsIdentity::SessionsController#show as HTML
364081
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"2"}
364082
+ Requires a token
364083
+ Token well formatted for user 1,
364084
+ session 1
364085
+ Cache miss. Try database.
364086
+ 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"]]
364087
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364088
+ Token well formatted and verified. Set cache.
364089
+ 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"]]
364090
+ Attempting to get RailsIdentity::Session 2
364091
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2"]]
364092
+ Checking to see if authorized to access object
364093
+ 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"]]
364094
+ 401 - Repia::Errors::Unauthorized
364095
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
364096
+  (0.1ms) rollback transaction
364097
+  (0.0ms) begin transaction
364098
+ -----------------------------------------------------------------------------
364099
+ RailsIdentity::SessionsControllerTest: test_cannot_show_a_nonexisting_session
364100
+ -----------------------------------------------------------------------------
364101
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364102
+ Processing by RailsIdentity::SessionsController#show as HTML
364103
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"999"}
364104
+ Requires a token
364105
+ Token well formatted for user 1,
364106
+ session 1
364107
+ Cache miss. Try database.
364108
+ 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"]]
364109
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364110
+ Token well formatted and verified. Set cache.
364111
+ 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"]]
364112
+ Attempting to get RailsIdentity::Session 999
364113
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "999"]]
364114
+ 404 - RailsIdentity::Session 999 cannot be found
364115
+ Completed 404 Not Found in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
364116
+  (0.1ms) rollback transaction
364117
+  (0.0ms) begin transaction
364118
+ -----------------------------------------------------------------------
364119
+ RailsIdentity::SessionsControllerTest: test_cannot_show_expired_session
364120
+ -----------------------------------------------------------------------
364121
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364122
+ 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"]]
364123
+  (0.0ms) SAVEPOINT active_record_1
364124
+ SQL (0.4ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "6b3f7cb8-10d2-11e6-a9de-6c4008a6fa2a"], ["secret", "8d1f454f-fa4d-43cd-94b5-584d2492b898"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmIzZjdjYjgtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MCwiZXhwIjoxNDYyMjQwNjU5fQ.JHRpArHvSg-rtpZnUOROAi8WLIqvTXw5947rOHyWo5k"], ["created_at", "2016-05-03 01:57:40.988700"], ["updated_at", "2016-05-03 01:57:40.988700"]]
364125
+  (0.1ms) RELEASE SAVEPOINT active_record_1
364126
+ Processing by RailsIdentity::SessionsController#show as HTML
364127
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"6b3f7cb8-10d2-11e6-a9de-6c4008a6fa2a"}
364128
+ Requires a token
364129
+ Token well formatted for user 1,
364130
+ session 1
364131
+ Cache miss. Try database.
364132
+ 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"]]
364133
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364134
+ Token well formatted and verified. Set cache.
364135
+ 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"]]
364136
+ Attempting to get RailsIdentity::Session 6b3f7cb8-10d2-11e6-a9de-6c4008a6fa2a
364137
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "6b3f7cb8-10d2-11e6-a9de-6c4008a6fa2a"]]
364138
+ Checking to see if authorized to access object
364139
+ 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"]]
364140
+  (0.0ms) SAVEPOINT active_record_1
364141
+ SQL (0.2ms) DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "6b3f7cb8-10d2-11e6-a9de-6c4008a6fa2a"]]
364142
+  (0.0ms) RELEASE SAVEPOINT active_record_1
364143
+ 404 - Repia::Errors::NotFound
364144
+ Completed 404 Not Found in 6ms (Views: 0.2ms | ActiveRecord: 0.5ms)
364145
+  (0.5ms) rollback transaction
364146
+  (0.0ms) begin transaction
364147
+ --------------------------------------------------------------------------
364148
+ RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions
364149
+ --------------------------------------------------------------------------
364150
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364151
+ Processing by RailsIdentity::SessionsController#index as HTML
364152
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs"}
364153
+ Requires a token
364154
+ Token well formatted for user 1,
364155
+ session 1
364156
+ Cache miss. Try database.
364157
+ 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"]]
364158
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364159
+ Token well formatted and verified. Set cache.
364160
+ 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"]]
364161
+ Attempting to get user
364162
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
364163
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [ef39a5dd-8e2b-4038-b458-45d2cc44c63e] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
364164
+ [ActiveJob] [RailsIdentity::SessionsCleanupJob] [ef39a5dd-8e2b-4038-b458-45d2cc44c63e] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 0.06ms
364165
+ [ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: ef39a5dd-8e2b-4038-b458-45d2cc44c63e) to Inline(default)
364166
+ Completed 200 OK in 5ms (Views: 0.4ms | ActiveRecord: 0.2ms)
364167
+ 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"]]
364168
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
364169
+ 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"]]
364170
+  (0.1ms) rollback transaction
364171
+  (0.1ms) begin transaction
364172
+ -----------------------------------------------------------------------------
364173
+ RailsIdentity::SessionsControllerTest: test_user_cannot_list_other's_sessions
364174
+ -----------------------------------------------------------------------------
364175
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364176
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
364177
+ Processing by RailsIdentity::SessionsController#index as HTML
364178
+ Parameters: {"user_id"=>"2", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs"}
364179
+ Requires a token
364180
+ Token well formatted for user 1,
364181
+ session 1
364182
+ Cache miss. Try database.
364183
+ 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"]]
364184
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364185
+ Token well formatted and verified. Set cache.
364186
+ 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"]]
364187
+ Attempting to get user 2
364188
+ Attempting to get RailsIdentity::User 2
364189
+ 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"]]
364190
+ Checking to see if authorized to access object
364191
+ 401 - Not authorized to access user 2
364192
+ Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
364193
+  (0.1ms) rollback transaction
364194
+  (0.0ms) begin transaction
364195
+ -------------------------------------------------------------------------
364196
+ RailsIdentity::SessionsControllerTest: test_cannot_delete_other's_session
364197
+ -------------------------------------------------------------------------
364198
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364199
+ Processing by RailsIdentity::SessionsController#destroy as HTML
364200
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"2"}
364201
+ Requires a token
364202
+ Token well formatted for user 1,
364203
+ session 1
364204
+ Cache miss. Try database.
364205
+ 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"]]
364206
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364207
+ Token well formatted and verified. Set cache.
364208
+ 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"]]
364209
+ Attempting to get RailsIdentity::Session 2
364210
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2"]]
364211
+ Checking to see if authorized to access object
364212
+ 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"]]
364213
+ 401 - Repia::Errors::Unauthorized
364214
+ Completed 401 Unauthorized in 4ms (Views: 0.1ms | ActiveRecord: 0.2ms)
364215
+  (0.1ms) rollback transaction
364216
+  (0.0ms) begin transaction
364217
+ ------------------------------------------------------------------
364218
+ RailsIdentity::SessionsControllerTest: test_show_a_current_session
364219
+ ------------------------------------------------------------------
364220
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364221
+ Processing by RailsIdentity::SessionsController#show as HTML
364222
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"current"}
364223
+ Requires a token
364224
+ Token well formatted for user 1,
364225
+ session 1
364226
+ Cache miss. Try database.
364227
+ 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"]]
364228
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364229
+ Token well formatted and verified. Set cache.
364230
+ 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"]]
364231
+ Attempting to get RailsIdentity::Session 1
364232
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364233
+ Checking to see if authorized to access object
364234
+ 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"]]
364235
+ Completed 200 OK in 5ms (Views: 0.4ms | ActiveRecord: 0.2ms)
364236
+  (0.1ms) rollback transaction
364237
+  (0.0ms) begin transaction
364238
+ -----------------------------
364239
+ RailsIdentityTest: test_truth
364240
+ -----------------------------
364241
+  (0.0ms) rollback transaction
364242
+  (0.0ms) begin transaction
364243
+ ------------------------------------------------------------------------------------
364244
+ RailsIdentity::UsersControllerTest: test_cannot_update_password_with_non-reset_token
364245
+ ------------------------------------------------------------------------------------
364246
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364247
+ Processing by RailsIdentity::UsersController#update as HTML
364248
+ Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"1"}
364249
+ Accepts a token
364250
+ Token well formatted for user 1,
364251
+ session 1
364252
+ Cache miss. Try database.
364253
+ 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"]]
364254
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364255
+ Token well formatted and verified. Set cache.
364256
+ 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"]]
364257
+ Attempting to get RailsIdentity::User 1
364258
+ 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"]]
364259
+ Checking to see if authorized to access object
364260
+ 401 - Repia::Errors::Unauthorized
364261
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
364262
+  (0.1ms) rollback transaction
364263
+  (0.0ms) begin transaction
364264
+ --------------------------------------------------------------------
364265
+ RailsIdentity::UsersControllerTest: test_admin_can_delete_other_user
364266
+ --------------------------------------------------------------------
364267
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364268
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
364269
+ Processing by RailsIdentity::UsersController#destroy as HTML
364270
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYyMjkxMDYwfQ.YaWq0Qk0nOtnltNyJbKeqajHXMJqBkQLTqdIBWeEVnE", "id"=>"1"}
364271
+ Requires a token
364272
+ Token well formatted for user admin_one,
364273
+ session session_admin_one
364274
+ Cache miss. Try database.
364275
+ 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"]]
364276
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
364277
+ Token well formatted and verified. Set cache.
364278
+ 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"]]
364279
+ Attempting to get RailsIdentity::User 1
364280
+ 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"]]
364281
+ Checking to see if authorized to access object
364282
+  (0.0ms) SAVEPOINT active_record_1
364283
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "deleted_at" = '2016-05-03 01:57:41.062125' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
364284
+  (0.0ms) RELEASE SAVEPOINT active_record_1
364285
+ Rendered text template (0.0ms)
364286
+ Completed 204 No Content in 6ms (Views: 1.5ms | ActiveRecord: 0.4ms)
364287
+  (0.3ms) rollback transaction
364288
+  (0.0ms) begin transaction
364289
+ -----------------------------------------------------------------------------------------------------------
364290
+ RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_token_with_invalid_username
364291
+ -----------------------------------------------------------------------------------------------------------
364292
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364293
+ Processing by RailsIdentity::UsersController#update as HTML
364294
+ Parameters: {"issue_verification_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
364295
+ Accepts a token
364296
+ Token decode error: Nil JSON web token
364297
+ Suppressing error: Invalid token:
364298
+ 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"]]
364299
+ 404 - Repia::Errors::NotFound
364300
+ Completed 404 Not Found in 1ms (Views: 0.1ms | ActiveRecord: 0.0ms)
364301
+  (0.1ms) rollback transaction
364302
+  (0.1ms) begin transaction
364303
+ --------------------------------------------------------------------------------
364304
+ RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_a_password
364305
+ --------------------------------------------------------------------------------
364306
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364307
+ Processing by RailsIdentity::UsersController#create as HTML
364308
+ Parameters: {"username"=>"foo@example.com"}
364309
+ Accepts a token
364310
+ Token decode error: Nil JSON web token
364311
+ Suppressing error: Invalid token:
364312
+ Create new user
364313
+  (0.1ms) SAVEPOINT active_record_1
364314
+ 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
364315
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
364316
+ Completed 400 Bad Request in 3ms (Views: 0.2ms | ActiveRecord: 0.2ms)
364317
+  (0.1ms) rollback transaction
364318
+  (0.0ms) begin transaction
364319
+ -------------------------------------------------------------------------
364320
+ RailsIdentity::UsersControllerTest: test_user_cannot_create_an_admin_user
364321
+ -------------------------------------------------------------------------
364322
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364323
+ Processing by RailsIdentity::UsersController#create as HTML
364324
+ Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100"}
364325
+ Accepts a token
364326
+ Token decode error: Nil JSON web token
364327
+ Suppressing error: Invalid token:
364328
+ Create new user
364329
+ Unpermitted parameter: role
364330
+  (0.1ms) SAVEPOINT active_record_1
364331
+ 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
364332
+ 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$qYq9VOLbwQtHGIXGmrO1Ve20Ls9PxSx5cMysJzhOc9EapfmKDUE4."], ["role", 10], ["created_at", "2016-05-03 01:57:41.084856"], ["updated_at", "2016-05-03 01:57:41.084856"], ["uuid", "6b4e52b0-10d2-11e6-a9de-6c4008a6fa2a"]]
364333
+  (0.1ms) RELEASE SAVEPOINT active_record_1
364334
+  (0.0ms) SAVEPOINT active_record_1
364335
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "6b4e52b0-10d2-11e6-a9de-6c4008a6fa2a"], ["uuid", "6b4e9dec-10d2-11e6-a9de-6c4008a6fa2a"], ["secret", "47d5dce4-8631-4164-9db3-e9f8e8f6fc5a"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2YjRlNTJiMC0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2YjRlOWRlYy0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYyMjQwNjYxLCJleHAiOjE0NjIyNDQyNjF9.TkxF4pNcVpSFb5ETh9GJx5F8PWajqIHmKFEUeeJKrOc"], ["created_at", "2016-05-03 01:57:41.087853"], ["updated_at", "2016-05-03 01:57:41.087853"]]
364336
+  (0.1ms) RELEASE SAVEPOINT active_record_1
364337
+  (0.1ms) SAVEPOINT active_record_1
364338
+ 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" != '6b4e52b0-10d2-11e6-a9de-6c4008a6fa2a') LIMIT 1
364339
+ SQL (0.3ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2YjRlNTJiMC0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2YjRlOWRlYy0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYyMjQwNjYxLCJleHAiOjE0NjIyNDQyNjF9.TkxF4pNcVpSFb5ETh9GJx5F8PWajqIHmKFEUeeJKrOc"], ["updated_at", "2016-05-03 01:57:41.090643"], ["uuid", "6b4e52b0-10d2-11e6-a9de-6c4008a6fa2a"]]
364340
+  (0.0ms) RELEASE SAVEPOINT active_record_1
364341
+ [ActiveJob] RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "6b4e52b0-10d2-11e6-a9de-6c4008a6fa2a"]]
364342
+ [ActiveJob] [ActionMailer::DeliveryJob] [16f37f25-8bf9-4169-8dd2-83114fa858b1] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/6b4e52b0-10d2-11e6-a9de-6c4008a6fa2a
364343
+ [ActiveJob] [ActionMailer::DeliveryJob] [16f37f25-8bf9-4169-8dd2-83114fa858b1] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (1.9ms)
364344
+ [ActiveJob] [ActionMailer::DeliveryJob] [16f37f25-8bf9-4169-8dd2-83114fa858b1] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.4ms)
364345
+ [ActiveJob] [ActionMailer::DeliveryJob] [16f37f25-8bf9-4169-8dd2-83114fa858b1]
364346
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 259.0ms
364347
+ [ActiveJob] [ActionMailer::DeliveryJob] [16f37f25-8bf9-4169-8dd2-83114fa858b1]
364348
+ Sent mail to foo@example.com (13.9ms)
364349
+ [ActiveJob] [ActionMailer::DeliveryJob] [16f37f25-8bf9-4169-8dd2-83114fa858b1] Date: Mon, 02 May 2016 20:57:41 -0500
364350
+ From: no-reply@rails-identity.com
364351
+ To: foo@example.com
364352
+ Message-ID: <572805955b3ec_127c13fdcbd45e4602494@galt.local.mail>
364353
+ Subject: [rails-identity] Email Confirmation
364354
+ Mime-Version: 1.0
364355
+ Content-Type: multipart/alternative;
364356
+ boundary="--==_mimepart_5728059558ee5_127c13fdcbd45e4602481b";
364357
+ charset=UTF-8
364358
+ Content-Transfer-Encoding: 7bit
364359
+
364360
+
364361
+ ----==_mimepart_5728059558ee5_127c13fdcbd45e4602481b
364362
+ Content-Type: text/plain;
364363
+ charset=UTF-8
364364
+ Content-Transfer-Encoding: 7bit
364365
+
364366
+ Dear foo@example.com,
364367
+
364368
+ Please confirm your account with rails-identity by making a PATCH request
364369
+ on the current user with a provided verification token. For example,
364370
+
364371
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2YjRlNTJiMC0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2YjRlOWRlYy0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYyMjQwNjYxLCJleHAiOjE0NjIyNDQyNjF9.TkxF4pNcVpSFb5ETh9GJx5F8PWajqIHmKFEUeeJKrOc verified=true
364372
+
364373
+ will confirm the account. Here is the verification token:
364374
+
364375
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2YjRlNTJiMC0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2YjRlOWRlYy0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYyMjQwNjYxLCJleHAiOjE0NjIyNDQyNjF9.TkxF4pNcVpSFb5ETh9GJx5F8PWajqIHmKFEUeeJKrOc
364376
+
364377
+ Thank you for using rails-identity,
364378
+ rails-identity
364379
+
364380
+
364381
+ ----==_mimepart_5728059558ee5_127c13fdcbd45e4602481b
364382
+ Content-Type: text/html;
364383
+ charset=UTF-8
364384
+ Content-Transfer-Encoding: 7bit
364385
+
364386
+ <html>
364387
+ <body>
364388
+ <p>Dear foo@example.com,</p>
364389
+
364390
+ <p>Please confirm your account with rails-identity by making a PATCH request
364391
+ on the current user with a provided verification token. For example,
364392
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2YjRlNTJiMC0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2YjRlOWRlYy0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYyMjQwNjYxLCJleHAiOjE0NjIyNDQyNjF9.TkxF4pNcVpSFb5ETh9GJx5F8PWajqIHmKFEUeeJKrOc
364393
+ verified=true</pre> will confirm the account. Here is the verification
364394
+ token:</p>
364395
+
364396
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2YjRlNTJiMC0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2YjRlOWRlYy0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYyMjQwNjYxLCJleHAiOjE0NjIyNDQyNjF9.TkxF4pNcVpSFb5ETh9GJx5F8PWajqIHmKFEUeeJKrOc</pre>
364397
+
364398
+ <p>Thank you for using rails-identity</p>
364399
+ <p><b>rails-identity</b></p>
364400
+
364401
+ </body>
364402
+ </html>
364403
+
364404
+ ----==_mimepart_5728059558ee5_127c13fdcbd45e4602481b--
364405
+
364406
+ [ActiveJob] [ActionMailer::DeliveryJob] [16f37f25-8bf9-4169-8dd2-83114fa858b1] Performed ActionMailer::DeliveryJob from Inline(mailers) in 273.65ms
364407
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 16f37f25-8bf9-4169-8dd2-83114fa858b1) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/6b4e52b0-10d2-11e6-a9de-6c4008a6fa2a
364408
+ Completed 201 Created in 299ms (Views: 0.3ms | ActiveRecord: 1.3ms)
364409
+  (0.7ms) rollback transaction
364410
+  (0.0ms) begin transaction
364411
+ -------------------------------------------------------------------------------------------------
364412
+ RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_without_username
364413
+ -------------------------------------------------------------------------------------------------
364414
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364415
+ Processing by RailsIdentity::UsersController#update as HTML
364416
+ Parameters: {"issue_reset_token"=>true, "id"=>"current"}
364417
+ Accepts a token
364418
+ Token decode error: Nil JSON web token
364419
+ Suppressing error: Invalid token:
364420
+ 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
364421
+ 404 - Repia::Errors::NotFound
364422
+ Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
364423
+  (0.1ms) rollback transaction
364424
+  (0.0ms) begin transaction
364425
+ -------------------------------------------------------------------------
364426
+ RailsIdentity::UsersControllerTest: test_update_(issue)_a_new_reset_token
364427
+ -------------------------------------------------------------------------
364428
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364429
+ 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"]]
364430
+ Processing by RailsIdentity::UsersController#update as HTML
364431
+ Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
364432
+ Accepts a token
364433
+ Token decode error: Nil JSON web token
364434
+ Suppressing error: Invalid token:
364435
+ 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"]]
364436
+  (0.0ms) SAVEPOINT active_record_1
364437
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "6b7d3c4c-10d2-11e6-a9de-6c4008a6fa2a"], ["secret", "6e800a96-94ca-4538-aa0b-c02b68159260"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmI3ZDNjNGMtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.a-XK9G8xw2lKbBSF8M_4utNxBwv-jkWJOPRxCnBoydM"], ["created_at", "2016-05-03 01:57:41.393268"], ["updated_at", "2016-05-03 01:57:41.393268"]]
364438
+  (0.0ms) RELEASE SAVEPOINT active_record_1
364439
+  (0.0ms) SAVEPOINT active_record_1
364440
+ 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
364441
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmI3ZDNjNGMtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.a-XK9G8xw2lKbBSF8M_4utNxBwv-jkWJOPRxCnBoydM"], ["updated_at", "2016-05-03 01:57:41.395293"], ["uuid", "1"]]
364442
+  (0.0ms) RELEASE SAVEPOINT active_record_1
364443
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364444
+ [ActiveJob] [ActionMailer::DeliveryJob] [eaecaff5-f53e-4dcf-9eed-2c549997c1b9] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
364445
+ [ActiveJob] [ActionMailer::DeliveryJob] [eaecaff5-f53e-4dcf-9eed-2c549997c1b9] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (0.5ms)
364446
+ [ActiveJob] [ActionMailer::DeliveryJob] [eaecaff5-f53e-4dcf-9eed-2c549997c1b9] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (0.3ms)
364447
+ [ActiveJob] [ActionMailer::DeliveryJob] [eaecaff5-f53e-4dcf-9eed-2c549997c1b9]
364448
+ RailsIdentity::UserMailer#password_reset: processed outbound mail in 8.0ms
364449
+ [ActiveJob] [ActionMailer::DeliveryJob] [eaecaff5-f53e-4dcf-9eed-2c549997c1b9]
364450
+ Sent mail to one@example.com (3.5ms)
364451
+ [ActiveJob] [ActionMailer::DeliveryJob] [eaecaff5-f53e-4dcf-9eed-2c549997c1b9] Date: Mon, 02 May 2016 20:57:41 -0500
364452
+ From: no-reply@rails-identity.com
364453
+ To: one@example.com
364454
+ Message-ID: <5728059563895_127c13fdcbd45e460251b2@galt.local.mail>
364455
+ Subject: [rails-identity] Password Reset
364456
+ Mime-Version: 1.0
364457
+ Content-Type: multipart/alternative;
364458
+ boundary="--==_mimepart_5728059562f3d_127c13fdcbd45e460250e5";
364459
+ charset=UTF-8
364460
+ Content-Transfer-Encoding: 7bit
364461
+
364462
+
364463
+ ----==_mimepart_5728059562f3d_127c13fdcbd45e460250e5
364464
+ Content-Type: text/plain;
364465
+ charset=UTF-8
364466
+ Content-Transfer-Encoding: 7bit
364467
+
364468
+ Dear one@example.com,
364469
+
364470
+ You have requested to reset your password. Here are the user UUID and reset
364471
+ token. Make a PATCH request on the UUID with the reset token to set a new
364472
+ password. For instance,
364473
+
364474
+ http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
364475
+
364476
+ will set the password to "reallysecret" (without quotes) for the user to
364477
+ whom the reset token was issued.
364478
+
364479
+ Here is the reset token: @user.reset_token
364480
+
364481
+ Good luck! :)
364482
+ rails-identity
364483
+
364484
+
364485
+ ----==_mimepart_5728059562f3d_127c13fdcbd45e460250e5
364486
+ Content-Type: text/html;
364487
+ charset=UTF-8
364488
+ Content-Transfer-Encoding: 7bit
364489
+
364490
+ <html>
364491
+ <body>
364492
+ <p>Dear one@example.com,</p>
364493
+
364494
+ <p>You have requested to reset your password. Here are the user UUID and
364495
+ reset token. Make a PATCH request on the UUID with the reset token to set a
364496
+ new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmI3ZDNjNGMtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.a-XK9G8xw2lKbBSF8M_4utNxBwv-jkWJOPRxCnBoydM password=reallysecret
364497
+ password_confirmation=reallysecret</pre> will set the password to
364498
+ <pre>reallysecret</pre> for the user to whom the reset token was issued.
364499
+ Here is the reset token:</p>
364500
+
364501
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmI3ZDNjNGMtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.a-XK9G8xw2lKbBSF8M_4utNxBwv-jkWJOPRxCnBoydM</pre>
364502
+
364503
+ <p>Good luck! :)</p>
364504
+ <p><b>rails-identity</b></p>
364505
+
364506
+ </body>
364507
+ </html>
364508
+
364509
+ ----==_mimepart_5728059562f3d_127c13fdcbd45e460250e5--
364510
+
364511
+ [ActiveJob] [ActionMailer::DeliveryJob] [eaecaff5-f53e-4dcf-9eed-2c549997c1b9] Performed ActionMailer::DeliveryJob from Inline(mailers) in 12.0ms
364512
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: eaecaff5-f53e-4dcf-9eed-2c549997c1b9) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
364513
+ Rendered text template (0.0ms)
364514
+ Completed 204 No Content in 19ms (Views: 0.3ms | ActiveRecord: 0.6ms)
364515
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364516
+ 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
364517
+ Processing by RailsIdentity::UsersController#update as HTML
364518
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"1"}
364519
+ Accepts a token
364520
+ Token well formatted for user 1,
364521
+ session 1
364522
+ Cache miss. Try database.
364523
+ 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"]]
364524
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364525
+ Token well formatted and verified. Set cache.
364526
+ 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"]]
364527
+ Attempting to get RailsIdentity::User 1
364528
+ 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"]]
364529
+ Checking to see if authorized to access object
364530
+ Unpermitted parameters: token, id
364531
+  (0.1ms) SAVEPOINT active_record_1
364532
+ 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
364533
+ SQL (0.3ms) UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-05-03 01:57:41.418568"], ["uuid", "1"]]
364534
+  (0.0ms) RELEASE SAVEPOINT active_record_1
364535
+ Completed 200 OK in 7ms (Views: 0.4ms | ActiveRecord: 1.2ms)
364536
+  (0.6ms) rollback transaction
364537
+  (0.0ms) begin transaction
364538
+ ---------------------------------------------------------------------
364539
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_ill-formed
364540
+ ---------------------------------------------------------------------
364541
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364542
+ 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"]]
364543
+ Processing by RailsIdentity::UsersController#show as HTML
364544
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQwNzIxfQ.d-vNDu629YrlNkLbJOokgpWoaMRZrT0wU5iz_cD1N7I", "id"=>"1"}
364545
+ Requires a token
364546
+ User UUID or session UUID is nil
364547
+ 401 - Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQwNzIxfQ.d-vNDu629YrlNkLbJOokgpWoaMRZrT0wU5iz_cD1N7I
364548
+ Completed 401 Unauthorized in 1ms (Views: 0.1ms | ActiveRecord: 0.0ms)
364549
+  (0.1ms) rollback transaction
364550
+  (0.0ms) begin transaction
364551
+ --------------------------------------------------------------------
364552
+ RailsIdentity::UsersControllerTest: test_non-admin_cannot_list_users
364553
+ --------------------------------------------------------------------
364554
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364555
+ Processing by RailsIdentity::UsersController#index as HTML
364556
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs"}
364557
+ Requires an admin token
364558
+ Token well formatted for user 1,
364559
+ session 1
364560
+ Cache miss. Try database.
364561
+ 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"]]
364562
+ 401 - Well-formed but invalid user token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs
364563
+ Completed 401 Unauthorized in 1ms (Views: 0.1ms | ActiveRecord: 0.0ms)
364564
+  (0.0ms) rollback transaction
364565
+  (0.0ms) begin transaction
364566
+ ------------------------------------------------------------------------------
364567
+ RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_username
364568
+ ------------------------------------------------------------------------------
364569
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364570
+ Processing by RailsIdentity::UsersController#create as HTML
364571
+ Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
364572
+ Accepts a token
364573
+ Token decode error: Nil JSON web token
364574
+ Suppressing error: Invalid token:
364575
+ Create new user
364576
+  (0.0ms) SAVEPOINT active_record_1
364577
+ 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
364578
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
364579
+ Completed 400 Bad Request in 4ms (Views: 0.2ms | ActiveRecord: 0.1ms)
364580
+  (0.1ms) rollback transaction
364581
+  (0.0ms) begin transaction
364582
+ --------------------------------------------------------------------
364583
+ RailsIdentity::UsersControllerTest: test_cannot_update_invalid_email
364584
+ --------------------------------------------------------------------
364585
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364586
+ Processing by RailsIdentity::UsersController#update as HTML
364587
+ Parameters: {"username"=>"foobar", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"1"}
364588
+ Accepts a token
364589
+ Token well formatted for user 1,
364590
+ session 1
364591
+ Cache miss. Try database.
364592
+ 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"]]
364593
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364594
+ Token well formatted and verified. Set cache.
364595
+ 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"]]
364596
+ Attempting to get RailsIdentity::User 1
364597
+ 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"]]
364598
+ Checking to see if authorized to access object
364599
+ Unpermitted parameters: token, id
364600
+  (0.1ms) SAVEPOINT active_record_1
364601
+ RailsIdentity::User Exists (0.2ms) 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
364602
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
364603
+ Completed 400 Bad Request in 8ms (Views: 0.3ms | ActiveRecord: 0.5ms)
364604
+  (0.1ms) rollback transaction
364605
+  (0.0ms) begin transaction
364606
+ ------------------------------------------------------
364607
+ RailsIdentity::UsersControllerTest: test_delete_a_user
364608
+ ------------------------------------------------------
364609
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364610
+ Processing by RailsIdentity::UsersController#destroy as HTML
364611
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"1"}
364612
+ Requires a token
364613
+ Token well formatted for user 1,
364614
+ session 1
364615
+ Cache miss. Try database.
364616
+ 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"]]
364617
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364618
+ Token well formatted and verified. Set cache.
364619
+ 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"]]
364620
+ Attempting to get RailsIdentity::User 1
364621
+ 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"]]
364622
+ Checking to see if authorized to access object
364623
+  (0.0ms) SAVEPOINT active_record_1
364624
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "deleted_at" = '2016-05-03 01:57:41.460265' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
364625
+  (0.0ms) RELEASE SAVEPOINT active_record_1
364626
+ Rendered text template (0.0ms)
364627
+ Completed 204 No Content in 5ms (Views: 0.3ms | ActiveRecord: 0.4ms)
364628
+  (0.3ms) rollback transaction
364629
+  (0.1ms) begin transaction
364630
+ -----------------------------------------------------------------------
364631
+ RailsIdentity::UsersControllerTest: test_admin_can_create_an_admin_user
364632
+ -----------------------------------------------------------------------
364633
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364634
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
364635
+ Processing by RailsIdentity::UsersController#create as HTML
364636
+ Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYyMjkxMDYwfQ.YaWq0Qk0nOtnltNyJbKeqajHXMJqBkQLTqdIBWeEVnE"}
364637
+ Accepts a token
364638
+ Token well formatted for user admin_one,
364639
+ session session_admin_one
364640
+ Cache miss. Try database.
364641
+ 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"]]
364642
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
364643
+ Token well formatted and verified. Set cache.
364644
+ 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"]]
364645
+ Create new user
364646
+ Unpermitted parameter: token
364647
+  (0.0ms) SAVEPOINT active_record_1
364648
+ 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
364649
+ 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$aPDcVhTggosZVeGlzL0ubuwH95IfZ9fCpjfi4cc9zQNMvWeJH0R8S"], ["role", 100], ["created_at", "2016-05-03 01:57:41.473428"], ["updated_at", "2016-05-03 01:57:41.473428"], ["uuid", "6b899c26-10d2-11e6-a9de-6c4008a6fa2a"]]
364650
+  (0.0ms) RELEASE SAVEPOINT active_record_1
364651
+  (0.0ms) SAVEPOINT active_record_1
364652
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "6b899c26-10d2-11e6-a9de-6c4008a6fa2a"], ["uuid", "6b89d8bc-10d2-11e6-a9de-6c4008a6fa2a"], ["secret", "09037d3b-47db-4b4f-b51a-bbf67c00d95d"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2Yjg5OWMyNi0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2Yjg5ZDhiYy0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.OIHa3g_cc1rWUd3LxRbZeo4ekLfDNJnacErPnxU4Yk0"], ["created_at", "2016-05-03 01:57:41.475795"], ["updated_at", "2016-05-03 01:57:41.475795"]]
364653
+  (0.0ms) RELEASE SAVEPOINT active_record_1
364654
+  (0.0ms) SAVEPOINT active_record_1
364655
+ 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" != '6b899c26-10d2-11e6-a9de-6c4008a6fa2a') LIMIT 1
364656
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2Yjg5OWMyNi0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2Yjg5ZDhiYy0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.OIHa3g_cc1rWUd3LxRbZeo4ekLfDNJnacErPnxU4Yk0"], ["updated_at", "2016-05-03 01:57:41.477376"], ["uuid", "6b899c26-10d2-11e6-a9de-6c4008a6fa2a"]]
364657
+  (0.0ms) RELEASE SAVEPOINT active_record_1
364658
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "6b899c26-10d2-11e6-a9de-6c4008a6fa2a"]]
364659
+ [ActiveJob] [ActionMailer::DeliveryJob] [6ba6e0c0-ab01-440e-ae88-daa2315e5ee8] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/6b899c26-10d2-11e6-a9de-6c4008a6fa2a
364660
+ [ActiveJob] [ActionMailer::DeliveryJob] [6ba6e0c0-ab01-440e-ae88-daa2315e5ee8] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
364661
+ [ActiveJob] [ActionMailer::DeliveryJob] [6ba6e0c0-ab01-440e-ae88-daa2315e5ee8] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
364662
+ [ActiveJob] [ActionMailer::DeliveryJob] [6ba6e0c0-ab01-440e-ae88-daa2315e5ee8]
364663
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.6ms
364664
+ [ActiveJob] [ActionMailer::DeliveryJob] [6ba6e0c0-ab01-440e-ae88-daa2315e5ee8]
364665
+ Sent mail to foo@example.com (4.0ms)
364666
+ [ActiveJob] [ActionMailer::DeliveryJob] [6ba6e0c0-ab01-440e-ae88-daa2315e5ee8] Date: Mon, 02 May 2016 20:57:41 -0500
364667
+ From: no-reply@rails-identity.com
364668
+ To: foo@example.com
364669
+ Message-ID: <5728059576541_127c13fdcbd45e4602538b@galt.local.mail>
364670
+ Subject: [rails-identity] Email Confirmation
364671
+ Mime-Version: 1.0
364672
+ Content-Type: multipart/alternative;
364673
+ boundary="--==_mimepart_5728059575b2b_127c13fdcbd45e460252cb";
364674
+ charset=UTF-8
364675
+ Content-Transfer-Encoding: 7bit
364676
+
364677
+
364678
+ ----==_mimepart_5728059575b2b_127c13fdcbd45e460252cb
364679
+ Content-Type: text/plain;
364680
+ charset=UTF-8
364681
+ Content-Transfer-Encoding: 7bit
364682
+
364683
+ Dear foo@example.com,
364684
+
364685
+ Please confirm your account with rails-identity by making a PATCH request
364686
+ on the current user with a provided verification token. For example,
364687
+
364688
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2Yjg5OWMyNi0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2Yjg5ZDhiYy0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.OIHa3g_cc1rWUd3LxRbZeo4ekLfDNJnacErPnxU4Yk0 verified=true
364689
+
364690
+ will confirm the account. Here is the verification token:
364691
+
364692
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2Yjg5OWMyNi0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2Yjg5ZDhiYy0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.OIHa3g_cc1rWUd3LxRbZeo4ekLfDNJnacErPnxU4Yk0
364693
+
364694
+ Thank you for using rails-identity,
364695
+ rails-identity
364696
+
364697
+
364698
+ ----==_mimepart_5728059575b2b_127c13fdcbd45e460252cb
364699
+ Content-Type: text/html;
364700
+ charset=UTF-8
364701
+ Content-Transfer-Encoding: 7bit
364702
+
364703
+ <html>
364704
+ <body>
364705
+ <p>Dear foo@example.com,</p>
364706
+
364707
+ <p>Please confirm your account with rails-identity by making a PATCH request
364708
+ on the current user with a provided verification token. For example,
364709
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2Yjg5OWMyNi0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2Yjg5ZDhiYy0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.OIHa3g_cc1rWUd3LxRbZeo4ekLfDNJnacErPnxU4Yk0
364710
+ verified=true</pre> will confirm the account. Here is the verification
364711
+ token:</p>
364712
+
364713
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2Yjg5OWMyNi0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2Yjg5ZDhiYy0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.OIHa3g_cc1rWUd3LxRbZeo4ekLfDNJnacErPnxU4Yk0</pre>
364714
+
364715
+ <p>Thank you for using rails-identity</p>
364716
+ <p><b>rails-identity</b></p>
364717
+
364718
+ </body>
364719
+ </html>
364720
+
364721
+ ----==_mimepart_5728059575b2b_127c13fdcbd45e460252cb--
364722
+
364723
+ [ActiveJob] [ActionMailer::DeliveryJob] [6ba6e0c0-ab01-440e-ae88-daa2315e5ee8] Performed ActionMailer::DeliveryJob from Inline(mailers) in 7.11ms
364724
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 6ba6e0c0-ab01-440e-ae88-daa2315e5ee8) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/6b899c26-10d2-11e6-a9de-6c4008a6fa2a
364725
+ Completed 201 Created in 21ms (Views: 0.3ms | ActiveRecord: 0.9ms)
364726
+  (0.7ms) rollback transaction
364727
+  (0.1ms) begin transaction
364728
+ -------------------------------------------------------------------
364729
+ RailsIdentity::UsersControllerTest: test_cannot_delete_another_user
364730
+ -------------------------------------------------------------------
364731
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364732
+ Processing by RailsIdentity::UsersController#destroy as HTML
364733
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"2"}
364734
+ Requires a token
364735
+ Token well formatted for user 1,
364736
+ session 1
364737
+ Cache miss. Try database.
364738
+ 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"]]
364739
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364740
+ Token well formatted and verified. Set cache.
364741
+ 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"]]
364742
+ Attempting to get RailsIdentity::User 2
364743
+ 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"]]
364744
+ Checking to see if authorized to access object
364745
+ 401 - Repia::Errors::Unauthorized
364746
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
364747
+  (0.1ms) rollback transaction
364748
+  (0.1ms) begin transaction
364749
+ ------------------------------------------------------------
364750
+ RailsIdentity::UsersControllerTest: test_show_a_current_user
364751
+ ------------------------------------------------------------
364752
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364753
+ Processing by RailsIdentity::UsersController#show as HTML
364754
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"current"}
364755
+ Requires a token
364756
+ Token well formatted for user 1,
364757
+ session 1
364758
+ Cache miss. Try database.
364759
+ 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"]]
364760
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364761
+ Token well formatted and verified. Set cache.
364762
+ 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"]]
364763
+ Attempting to get RailsIdentity::User 1
364764
+ 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"]]
364765
+ Checking to see if authorized to access object
364766
+ Completed 200 OK in 8ms (Views: 0.6ms | ActiveRecord: 0.3ms)
364767
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364768
+  (0.1ms) rollback transaction
364769
+  (0.0ms) begin transaction
364770
+ ---------------------------------------------------------------------------------------------
364771
+ RailsIdentity::UsersControllerTest: test_update_a_user_with_a_new_password_using_old_password
364772
+ ---------------------------------------------------------------------------------------------
364773
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364774
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364775
+ Processing by RailsIdentity::UsersController#update as HTML
364776
+ Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"1"}
364777
+ Accepts a token
364778
+ Token well formatted for user 1,
364779
+ session 1
364780
+ Cache miss. Try database.
364781
+ 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"]]
364782
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364783
+ Token well formatted and verified. Set cache.
364784
+ 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"]]
364785
+ Attempting to get RailsIdentity::User 1
364786
+ 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"]]
364787
+ Checking to see if authorized to access object
364788
+ Unpermitted parameters: old_password, token, id
364789
+  (0.1ms) SAVEPOINT active_record_1
364790
+ 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
364791
+ SQL (0.3ms) UPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["password_digest", "$2a$04$lTZQlswmQTaOq0a2wPSq9.P91b49v0xYKfdrBxRmT44zW4xXDMiJC"], ["updated_at", "2016-05-03 01:57:41.590585"], ["uuid", "1"]]
364792
+  (0.0ms) RELEASE SAVEPOINT active_record_1
364793
+ Completed 200 OK in 74ms (Views: 0.4ms | ActiveRecord: 0.7ms)
364794
+ 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"]]
364795
+  (0.5ms) rollback transaction
364796
+  (0.1ms) begin transaction
364797
+ ------------------------------------------------------------------------------------
364798
+ RailsIdentity::UsersControllerTest: test_cannot_update_password_with_a_invalid_token
364799
+ ------------------------------------------------------------------------------------
364800
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364801
+ Processing by RailsIdentity::UsersController#update as HTML
364802
+ Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"1"}
364803
+ Accepts a token
364804
+ Token well formatted for user 1,
364805
+ session 1
364806
+ Cache miss. Try database.
364807
+ 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"]]
364808
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364809
+ Token well formatted and verified. Set cache.
364810
+ 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"]]
364811
+ Attempting to get RailsIdentity::User 1
364812
+ 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"]]
364813
+ Checking to see if authorized to access object
364814
+ 401 - Repia::Errors::Unauthorized
364815
+ Completed 401 Unauthorized in 73ms (Views: 0.2ms | ActiveRecord: 0.2ms)
364816
+  (0.1ms) rollback transaction
364817
+  (0.1ms) begin transaction
364818
+ ------------------------------------------------------
364819
+ RailsIdentity::UsersControllerTest: test_update_a_user
364820
+ ------------------------------------------------------
364821
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364822
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364823
+ Processing by RailsIdentity::UsersController#update as HTML
364824
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"1"}
364825
+ Accepts a token
364826
+ Token well formatted for user 1,
364827
+ session 1
364828
+ Cache miss. Try database.
364829
+ 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"]]
364830
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364831
+ Token well formatted and verified. Set cache.
364832
+ 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"]]
364833
+ Attempting to get RailsIdentity::User 1
364834
+ 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"]]
364835
+ Checking to see if authorized to access object
364836
+ Unpermitted parameters: token, id
364837
+  (0.0ms) SAVEPOINT active_record_1
364838
+ 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
364839
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-05-03 01:57:41.684216"], ["uuid", "1"]]
364840
+  (0.0ms) RELEASE SAVEPOINT active_record_1
364841
+ Completed 200 OK in 7ms (Views: 0.5ms | ActiveRecord: 0.5ms)
364842
+  (0.4ms) rollback transaction
364843
+  (0.1ms) begin transaction
364844
+ ---------------------------------------------------------------------------------------------
364845
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_non-existing_token
364846
+ ---------------------------------------------------------------------------------------------
364847
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364848
+ 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"]]
364849
+ Processing by RailsIdentity::UsersController#show as HTML
364850
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjIyNDA2NjEsImV4cCI6MTQ2MjI0MDcyMX0.WXiVOAbD38BVYvcSGxQO6yUHT3BRppmvAB4ZEwDuKt0", "id"=>"1"}
364851
+ Requires a token
364852
+ Token well formatted for user 1,
364853
+ session 1
364854
+ Cache miss. Try database.
364855
+ 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"]]
364856
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364857
+ Signature verification raised
364858
+ 401 - Cannot verify token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjIyNDA2NjEsImV4cCI6MTQ2MjI0MDcyMX0.WXiVOAbD38BVYvcSGxQO6yUHT3BRppmvAB4ZEwDuKt0
364859
+ Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
364860
+  (0.1ms) rollback transaction
364861
+  (0.1ms) begin transaction
364862
+ ------------------------------------------------------------------
364863
+ RailsIdentity::UsersControllerTest: test_admin_can_show_other_user
364864
+ ------------------------------------------------------------------
364865
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364866
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
364867
+ Processing by RailsIdentity::UsersController#show as HTML
364868
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYyMjkxMDYwfQ.YaWq0Qk0nOtnltNyJbKeqajHXMJqBkQLTqdIBWeEVnE", "id"=>"1"}
364869
+ Requires a token
364870
+ Token well formatted for user admin_one,
364871
+ session session_admin_one
364872
+ Cache miss. Try database.
364873
+ 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"]]
364874
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
364875
+ Token well formatted and verified. Set cache.
364876
+ 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"]]
364877
+ Attempting to get RailsIdentity::User 1
364878
+ 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"]]
364879
+ Checking to see if authorized to access object
364880
+ Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms)
364881
+  (0.1ms) rollback transaction
364882
+  (0.0ms) begin transaction
364883
+ ------------------------------------------------------------------
364884
+ RailsIdentity::UsersControllerTest: test_public_cannot_show_a_user
364885
+ ------------------------------------------------------------------
364886
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364887
+ Processing by RailsIdentity::UsersController#show as HTML
364888
+ Parameters: {"id"=>"1"}
364889
+ Requires a token
364890
+ Token decode error: Nil JSON web token
364891
+ 401 - Invalid token:
364892
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
364893
+  (0.1ms) rollback transaction
364894
+  (0.0ms) begin transaction
364895
+ ----------------------------------------------------
364896
+ RailsIdentity::UsersControllerTest: test_show_a_user
364897
+ ----------------------------------------------------
364898
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364899
+ Processing by RailsIdentity::UsersController#show as HTML
364900
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"1"}
364901
+ Requires a token
364902
+ Token well formatted for user 1,
364903
+ session 1
364904
+ Cache miss. Try database.
364905
+ 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"]]
364906
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364907
+ Token well formatted and verified. Set cache.
364908
+ 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"]]
364909
+ Attempting to get RailsIdentity::User 1
364910
+ 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"]]
364911
+ Checking to see if authorized to access object
364912
+ Completed 200 OK in 6ms (Views: 0.6ms | ActiveRecord: 0.3ms)
364913
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364914
+  (0.1ms) rollback transaction
364915
+  (0.0ms) begin transaction
364916
+ ---------------------------------------------------------------------------
364917
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_no_token_payload
364918
+ ---------------------------------------------------------------------------
364919
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364920
+ Processing by RailsIdentity::UsersController#show as HTML
364921
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.dBJvCkDsWAafrJJof7nCGS6NfzWEWyNsL8CX6nX0h4c", "id"=>"1"}
364922
+ Requires a token
364923
+ User UUID or session UUID is nil
364924
+ 401 - Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.dBJvCkDsWAafrJJof7nCGS6NfzWEWyNsL8CX6nX0h4c
364925
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
364926
+  (0.1ms) rollback transaction
364927
+  (0.0ms) begin transaction
364928
+ ------------------------------------------------------------------------------------------------------------
364929
+ RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_reset_token_without_username
364930
+ ------------------------------------------------------------------------------------------------------------
364931
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364932
+ Processing by RailsIdentity::UsersController#update as HTML
364933
+ Parameters: {"issue_verification_token"=>true, "id"=>"current"}
364934
+ Accepts a token
364935
+ Token decode error: Nil JSON web token
364936
+ Suppressing error: Invalid token:
364937
+ 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
364938
+ 404 - Repia::Errors::NotFound
364939
+ Completed 404 Not Found in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
364940
+  (0.1ms) rollback transaction
364941
+  (0.0ms) begin transaction
364942
+ ------------------------------------------------------------
364943
+ RailsIdentity::UsersControllerTest: test_update_current_user
364944
+ ------------------------------------------------------------
364945
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364946
+ Processing by RailsIdentity::UsersController#update as HTML
364947
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"current"}
364948
+ Accepts a token
364949
+ Token well formatted for user 1,
364950
+ session 1
364951
+ Cache miss. Try database.
364952
+ 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"]]
364953
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364954
+ Token well formatted and verified. Set cache.
364955
+ 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"]]
364956
+ Attempting to get RailsIdentity::User 1
364957
+ 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"]]
364958
+ Checking to see if authorized to access object
364959
+ Unpermitted parameters: token, id
364960
+  (0.1ms) SAVEPOINT active_record_1
364961
+ 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
364962
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-05-03 01:57:41.784262"], ["uuid", "1"]]
364963
+  (0.0ms) RELEASE SAVEPOINT active_record_1
364964
+ Completed 200 OK in 7ms (Views: 0.4ms | ActiveRecord: 0.5ms)
364965
+  (0.3ms) rollback transaction
364966
+  (0.0ms) begin transaction
364967
+ -----------------------------------------------------------------
364968
+ RailsIdentity::UsersControllerTest: test_admin_can_list_all_users
364969
+ -----------------------------------------------------------------
364970
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364971
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
364972
+ Processing by RailsIdentity::UsersController#index as HTML
364973
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYyMjkxMDYwfQ.YaWq0Qk0nOtnltNyJbKeqajHXMJqBkQLTqdIBWeEVnE"}
364974
+ Requires an admin token
364975
+ Token well formatted for user admin_one,
364976
+ session session_admin_one
364977
+ Cache miss. Try database.
364978
+ 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"]]
364979
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
364980
+ Token well formatted and verified. Set cache.
364981
+ 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"]]
364982
+ RailsIdentity::User Load (0.1ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL
364983
+ Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 0.3ms)
364984
+  (0.0ms) SELECT COUNT(*) FROM "rails_identity_sessions"
364985
+  (0.1ms) rollback transaction
364986
+  (0.0ms) begin transaction
364987
+ ----------------------------------------------------------------------------------------
364988
+ RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_bogus_payload
364989
+ ----------------------------------------------------------------------------------------
364990
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
364991
+ 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"]]
364992
+ Processing by RailsIdentity::UsersController#show as HTML
364993
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQwNzIxfQ.4dRhpJmZfN3hMzwKeEYVigZSlpn0iiaEAt2R1DYpTbE", "id"=>"1"}
364994
+ Requires a token
364995
+ Token well formatted for user 1,
364996
+ session doesnotexist
364997
+ Cache miss. Try database.
364998
+ 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"]]
364999
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "doesnotexist"]]
365000
+ 401 - Well-formed but invalid session token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQwNzIxfQ.4dRhpJmZfN3hMzwKeEYVigZSlpn0iiaEAt2R1DYpTbE
365001
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
365002
+  (0.1ms) rollback transaction
365003
+  (0.0ms) begin transaction
365004
+ --------------------------------------------------------------------------
365005
+ RailsIdentity::UsersControllerTest: test_update_password_using_reset_token
365006
+ --------------------------------------------------------------------------
365007
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
365008
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
365009
+ 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"]]
365010
+ Processing by RailsIdentity::UsersController#update as HTML
365011
+ Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
365012
+ Accepts a token
365013
+ Token decode error: Nil JSON web token
365014
+ Suppressing error: Invalid token:
365015
+ 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"]]
365016
+  (0.0ms) SAVEPOINT active_record_1
365017
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "6bbd2154-10d2-11e6-a9de-6c4008a6fa2a"], ["secret", "88e9cddc-9d14-4b3f-abd2-0c4dd2fdf917"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmJiZDIxNTQtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.3zMP2fW4mTFb1vKoria9FQG64LJUtGdlqxMyoW4NFL4"], ["created_at", "2016-05-03 01:57:41.812005"], ["updated_at", "2016-05-03 01:57:41.812005"]]
365018
+  (0.0ms) RELEASE SAVEPOINT active_record_1
365019
+  (0.0ms) SAVEPOINT active_record_1
365020
+ 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
365021
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmJiZDIxNTQtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.3zMP2fW4mTFb1vKoria9FQG64LJUtGdlqxMyoW4NFL4"], ["updated_at", "2016-05-03 01:57:41.814380"], ["uuid", "1"]]
365022
+  (0.0ms) RELEASE SAVEPOINT active_record_1
365023
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
365024
+ [ActiveJob] [ActionMailer::DeliveryJob] [87edec69-f9cb-4c90-b38c-c63cb9934bcc] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
365025
+ [ActiveJob] [ActionMailer::DeliveryJob] [87edec69-f9cb-4c90-b38c-c63cb9934bcc] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (0.1ms)
365026
+ [ActiveJob] [ActionMailer::DeliveryJob] [87edec69-f9cb-4c90-b38c-c63cb9934bcc] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (0.0ms)
365027
+ [ActiveJob] [ActionMailer::DeliveryJob] [87edec69-f9cb-4c90-b38c-c63cb9934bcc]
365028
+ RailsIdentity::UserMailer#password_reset: processed outbound mail in 2.6ms
365029
+ [ActiveJob] [ActionMailer::DeliveryJob] [87edec69-f9cb-4c90-b38c-c63cb9934bcc]
365030
+ Sent mail to one@example.com (3.8ms)
365031
+ [ActiveJob] [ActionMailer::DeliveryJob] [87edec69-f9cb-4c90-b38c-c63cb9934bcc] Date: Mon, 02 May 2016 20:57:41 -0500
365032
+ From: no-reply@rails-identity.com
365033
+ To: one@example.com
365034
+ Message-ID: <57280595c8973_127c13fdcbd45e460255ce@galt.local.mail>
365035
+ Subject: [rails-identity] Password Reset
365036
+ Mime-Version: 1.0
365037
+ Content-Type: multipart/alternative;
365038
+ boundary="--==_mimepart_57280595c7ff2_127c13fdcbd45e46025417";
365039
+ charset=UTF-8
365040
+ Content-Transfer-Encoding: 7bit
365041
+
365042
+
365043
+ ----==_mimepart_57280595c7ff2_127c13fdcbd45e46025417
365044
+ Content-Type: text/plain;
365045
+ charset=UTF-8
365046
+ Content-Transfer-Encoding: 7bit
365047
+
365048
+ Dear one@example.com,
365049
+
365050
+ You have requested to reset your password. Here are the user UUID and reset
365051
+ token. Make a PATCH request on the UUID with the reset token to set a new
365052
+ password. For instance,
365053
+
365054
+ http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
365055
+
365056
+ will set the password to "reallysecret" (without quotes) for the user to
365057
+ whom the reset token was issued.
365058
+
365059
+ Here is the reset token: @user.reset_token
365060
+
365061
+ Good luck! :)
365062
+ rails-identity
365063
+
365064
+
365065
+ ----==_mimepart_57280595c7ff2_127c13fdcbd45e46025417
365066
+ Content-Type: text/html;
365067
+ charset=UTF-8
365068
+ Content-Transfer-Encoding: 7bit
365069
+
365070
+ <html>
365071
+ <body>
365072
+ <p>Dear one@example.com,</p>
365073
+
365074
+ <p>You have requested to reset your password. Here are the user UUID and
365075
+ reset token. Make a PATCH request on the UUID with the reset token to set a
365076
+ new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmJiZDIxNTQtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.3zMP2fW4mTFb1vKoria9FQG64LJUtGdlqxMyoW4NFL4 password=reallysecret
365077
+ password_confirmation=reallysecret</pre> will set the password to
365078
+ <pre>reallysecret</pre> for the user to whom the reset token was issued.
365079
+ Here is the reset token:</p>
365080
+
365081
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmJiZDIxNTQtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.3zMP2fW4mTFb1vKoria9FQG64LJUtGdlqxMyoW4NFL4</pre>
365082
+
365083
+ <p>Good luck! :)</p>
365084
+ <p><b>rails-identity</b></p>
365085
+
365086
+ </body>
365087
+ </html>
365088
+
365089
+ ----==_mimepart_57280595c7ff2_127c13fdcbd45e46025417--
365090
+
365091
+ [ActiveJob] [ActionMailer::DeliveryJob] [87edec69-f9cb-4c90-b38c-c63cb9934bcc] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.8ms
365092
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 87edec69-f9cb-4c90-b38c-c63cb9934bcc) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
365093
+ Rendered text template (0.0ms)
365094
+ Completed 204 No Content in 15ms (Views: 0.3ms | ActiveRecord: 0.6ms)
365095
+ 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"]]
365096
+ Processing by RailsIdentity::UsersController#update as HTML
365097
+ Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmJiZDIxNTQtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.3zMP2fW4mTFb1vKoria9FQG64LJUtGdlqxMyoW4NFL4", "id"=>"1"}
365098
+ Accepts a token
365099
+ Token well formatted for user 1,
365100
+ session 6bbd2154-10d2-11e6-a9de-6c4008a6fa2a
365101
+ Cache miss. Try database.
365102
+ 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"]]
365103
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "6bbd2154-10d2-11e6-a9de-6c4008a6fa2a"]]
365104
+ Token well formatted and verified. Set cache.
365105
+ 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"]]
365106
+ Attempting to get RailsIdentity::User 1
365107
+ 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"]]
365108
+ Checking to see if authorized to access object
365109
+ Unpermitted parameters: token, id
365110
+  (0.0ms) SAVEPOINT active_record_1
365111
+ 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
365112
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["password_digest", "$2a$04$FsoeQi.WzSjBtYurpCTcSeNow9qA.L4l/G2RuUxga2qkQW7k8plYu"], ["updated_at", "2016-05-03 01:57:41.832417"], ["uuid", "1"]]
365113
+  (0.0ms) RELEASE SAVEPOINT active_record_1
365114
+ Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 1.1ms)
365115
+ 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"]]
365116
+  (0.7ms) rollback transaction
365117
+  (0.1ms) begin transaction
365118
+ ---------------------------------------------------------------
365119
+ RailsIdentity::UsersControllerTest: test_public_can_see_options
365120
+ ---------------------------------------------------------------
365121
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
365122
+ Processing by RailsIdentity::UsersController#options as HTML
365123
+ Rendered text template (0.0ms)
365124
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
365125
+  (0.1ms) rollback transaction
365126
+  (0.0ms) begin transaction
365127
+ ---------------------------------------------------------------
365128
+ RailsIdentity::UsersControllerTest: test_cannot_show_other_user
365129
+ ---------------------------------------------------------------
365130
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
365131
+ Processing by RailsIdentity::UsersController#show as HTML
365132
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"2"}
365133
+ Requires a token
365134
+ Token well formatted for user 1,
365135
+ session 1
365136
+ Cache miss. Try database.
365137
+ 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"]]
365138
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
365139
+ Token well formatted and verified. Set cache.
365140
+ 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"]]
365141
+ Attempting to get RailsIdentity::User 2
365142
+ 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"]]
365143
+ Checking to see if authorized to access object
365144
+ 401 - Repia::Errors::Unauthorized
365145
+ Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
365146
+  (0.1ms) rollback transaction
365147
+  (0.0ms) begin transaction
365148
+ -------------------------------------------------------------------
365149
+ RailsIdentity::UsersControllerTest: test_cannot_update_another_user
365150
+ -------------------------------------------------------------------
365151
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
365152
+ Processing by RailsIdentity::UsersController#update as HTML
365153
+ Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"2"}
365154
+ Accepts a token
365155
+ Token well formatted for user 1,
365156
+ session 1
365157
+ Cache miss. Try database.
365158
+ 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"]]
365159
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
365160
+ Token well formatted and verified. Set cache.
365161
+ 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"]]
365162
+ Attempting to get RailsIdentity::User 2
365163
+ 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"]]
365164
+ Checking to see if authorized to access object
365165
+ 401 - Repia::Errors::Unauthorized
365166
+ Completed 401 Unauthorized in 4ms (Views: 0.1ms | ActiveRecord: 0.2ms)
365167
+  (0.1ms) rollback transaction
365168
+  (0.0ms) begin transaction
365169
+ ------------------------------------------------------------------------------
365170
+ RailsIdentity::UsersControllerTest: test_update_(reissue)_a_verification_token
365171
+ ------------------------------------------------------------------------------
365172
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
365173
+ RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
365174
+ 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
365175
+ 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"]]
365176
+ Processing by RailsIdentity::UsersController#update as HTML
365177
+ Parameters: {"issue_verification_token"=>true, "username"=>"one@example.com", "id"=>"current"}
365178
+ Accepts a token
365179
+ Token decode error: Nil JSON web token
365180
+ Suppressing error: Invalid token:
365181
+ 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"]]
365182
+  (0.0ms) SAVEPOINT active_record_1
365183
+ SQL (0.2ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "6bc553d8-10d2-11e6-a9de-6c4008a6fa2a"], ["secret", "88bec910-c852-4ceb-8d61-e1bbe970d002"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmJjNTUzZDgtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.8LtCjeHhwHKjILM0bESPBdh9EtnFBalHtpn6tvHZIe0"], ["created_at", "2016-05-03 01:57:41.865737"], ["updated_at", "2016-05-03 01:57:41.865737"]]
365184
+  (0.0ms) RELEASE SAVEPOINT active_record_1
365185
+  (0.0ms) SAVEPOINT active_record_1
365186
+ 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
365187
+ SQL (0.1ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmJjNTUzZDgtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.8LtCjeHhwHKjILM0bESPBdh9EtnFBalHtpn6tvHZIe0"], ["updated_at", "2016-05-03 01:57:41.868724"], ["uuid", "1"]]
365188
+  (0.0ms) RELEASE SAVEPOINT active_record_1
365189
+ [ActiveJob] RailsIdentity::User Load (0.0ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
365190
+ [ActiveJob] [ActionMailer::DeliveryJob] [c7a11dd9-a75a-40d2-bef1-a7a32e2bd6ab] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
365191
+ [ActiveJob] [ActionMailer::DeliveryJob] [c7a11dd9-a75a-40d2-bef1-a7a32e2bd6ab] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
365192
+ [ActiveJob] [ActionMailer::DeliveryJob] [c7a11dd9-a75a-40d2-bef1-a7a32e2bd6ab] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
365193
+ [ActiveJob] [ActionMailer::DeliveryJob] [c7a11dd9-a75a-40d2-bef1-a7a32e2bd6ab]
365194
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.6ms
365195
+ [ActiveJob] [ActionMailer::DeliveryJob] [c7a11dd9-a75a-40d2-bef1-a7a32e2bd6ab]
365196
+ Sent mail to one@example.com (4.4ms)
365197
+ [ActiveJob] [ActionMailer::DeliveryJob] [c7a11dd9-a75a-40d2-bef1-a7a32e2bd6ab] Date: Mon, 02 May 2016 20:57:41 -0500
365198
+ From: no-reply@rails-identity.com
365199
+ To: one@example.com
365200
+ Message-ID: <57280595d625a_127c13fdcbd45e4602579f@galt.local.mail>
365201
+ Subject: [rails-identity] Email Confirmation
365202
+ Mime-Version: 1.0
365203
+ Content-Type: multipart/alternative;
365204
+ boundary="--==_mimepart_57280595d57a3_127c13fdcbd45e46025637";
365205
+ charset=UTF-8
365206
+ Content-Transfer-Encoding: 7bit
365207
+
365208
+
365209
+ ----==_mimepart_57280595d57a3_127c13fdcbd45e46025637
365210
+ Content-Type: text/plain;
365211
+ charset=UTF-8
365212
+ Content-Transfer-Encoding: 7bit
365213
+
365214
+ Dear one@example.com,
365215
+
365216
+ Please confirm your account with rails-identity by making a PATCH request
365217
+ on the current user with a provided verification token. For example,
365218
+
365219
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmJjNTUzZDgtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.8LtCjeHhwHKjILM0bESPBdh9EtnFBalHtpn6tvHZIe0 verified=true
365220
+
365221
+ will confirm the account. Here is the verification token:
365222
+
365223
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmJjNTUzZDgtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.8LtCjeHhwHKjILM0bESPBdh9EtnFBalHtpn6tvHZIe0
365224
+
365225
+ Thank you for using rails-identity,
365226
+ rails-identity
365227
+
365228
+
365229
+ ----==_mimepart_57280595d57a3_127c13fdcbd45e46025637
365230
+ Content-Type: text/html;
365231
+ charset=UTF-8
365232
+ Content-Transfer-Encoding: 7bit
365233
+
365234
+ <html>
365235
+ <body>
365236
+ <p>Dear one@example.com,</p>
365237
+
365238
+ <p>Please confirm your account with rails-identity by making a PATCH request
365239
+ on the current user with a provided verification token. For example,
365240
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmJjNTUzZDgtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.8LtCjeHhwHKjILM0bESPBdh9EtnFBalHtpn6tvHZIe0
365241
+ verified=true</pre> will confirm the account. Here is the verification
365242
+ token:</p>
365243
+
365244
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmJjNTUzZDgtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.8LtCjeHhwHKjILM0bESPBdh9EtnFBalHtpn6tvHZIe0</pre>
365245
+
365246
+ <p>Thank you for using rails-identity</p>
365247
+ <p><b>rails-identity</b></p>
365248
+
365249
+ </body>
365250
+ </html>
365251
+
365252
+ ----==_mimepart_57280595d57a3_127c13fdcbd45e46025637--
365253
+
365254
+ [ActiveJob] [ActionMailer::DeliveryJob] [c7a11dd9-a75a-40d2-bef1-a7a32e2bd6ab] Performed ActionMailer::DeliveryJob from Inline(mailers) in 7.5ms
365255
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: c7a11dd9-a75a-40d2-bef1-a7a32e2bd6ab) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
365256
+ Rendered text template (0.0ms)
365257
+ Completed 204 No Content in 17ms (Views: 0.3ms | ActiveRecord: 0.7ms)
365258
+ 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
365259
+ Processing by RailsIdentity::UsersController#update as HTML
365260
+ Parameters: {"verified"=>true, "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNmJjNTUzZDgtMTBkMi0xMWU2LWE5ZGUtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MjI0MDY2MSwiZXhwIjoxNDYyMjQ0MjYxfQ.8LtCjeHhwHKjILM0bESPBdh9EtnFBalHtpn6tvHZIe0", "id"=>"current"}
365261
+ Accepts a token
365262
+ Token well formatted for user 1,
365263
+ session 6bc553d8-10d2-11e6-a9de-6c4008a6fa2a
365264
+ Cache miss. Try database.
365265
+ 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"]]
365266
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "6bc553d8-10d2-11e6-a9de-6c4008a6fa2a"]]
365267
+ Token well formatted and verified. Set cache.
365268
+ 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"]]
365269
+ Attempting to get RailsIdentity::User 1
365270
+ 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"]]
365271
+ Checking to see if authorized to access object
365272
+ Unpermitted parameters: token, id
365273
+  (0.0ms) SAVEPOINT active_record_1
365274
+ 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
365275
+  (0.0ms) RELEASE SAVEPOINT active_record_1
365276
+ Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.0ms)
365277
+  (0.4ms) rollback transaction
365278
+  (0.0ms) begin transaction
365279
+ ------------------------------------------------------------
365280
+ RailsIdentity::UsersControllerTest: test_delete_current_user
365281
+ ------------------------------------------------------------
365282
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
365283
+ Processing by RailsIdentity::UsersController#destroy as HTML
365284
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"current"}
365285
+ Requires a token
365286
+ Token well formatted for user 1,
365287
+ session 1
365288
+ Cache miss. Try database.
365289
+ 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"]]
365290
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
365291
+ Token well formatted and verified. Set cache.
365292
+ 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"]]
365293
+ Attempting to get RailsIdentity::User 1
365294
+ 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"]]
365295
+ Checking to see if authorized to access object
365296
+  (0.0ms) SAVEPOINT active_record_1
365297
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "deleted_at" = '2016-05-03 01:57:41.896978' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
365298
+  (0.0ms) RELEASE SAVEPOINT active_record_1
365299
+ Rendered text template (0.0ms)
365300
+ Completed 204 No Content in 6ms (Views: 0.4ms | ActiveRecord: 0.5ms)
365301
+  (0.3ms) rollback transaction
365302
+  (0.0ms) begin transaction
365303
+ -----------------------------------------------------------------------
365304
+ RailsIdentity::UsersControllerTest: test_cannot_show_a_nonexisting_user
365305
+ -----------------------------------------------------------------------
365306
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
365307
+ Processing by RailsIdentity::UsersController#show as HTML
365308
+ Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjIyOTEwNjB9.k46B9RKBpC9I66vnYvW0oTZkeBg7-fnyYL_5Kmpm0zs", "id"=>"999"}
365309
+ Requires a token
365310
+ Token well formatted for user 1,
365311
+ session 1
365312
+ Cache miss. Try database.
365313
+ 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"]]
365314
+ RailsIdentity::Session Load (0.0ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
365315
+ Token well formatted and verified. Set cache.
365316
+ 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"]]
365317
+ Attempting to get RailsIdentity::User 999
365318
+ 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"]]
365319
+ 404 - RailsIdentity::User 999 cannot be found
365320
+ Completed 404 Not Found in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
365321
+  (0.1ms) rollback transaction
365322
+  (0.0ms) begin transaction
365323
+ ------------------------------------------------------
365324
+ RailsIdentity::UsersControllerTest: test_create_a_user
365325
+ ------------------------------------------------------
365326
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
365327
+ Processing by RailsIdentity::UsersController#create as HTML
365328
+ Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
365329
+ Accepts a token
365330
+ Token decode error: Nil JSON web token
365331
+ Suppressing error: Invalid token:
365332
+ Create new user
365333
+  (0.0ms) SAVEPOINT active_record_1
365334
+ 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
365335
+ 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$c457bcAx4gsHSrC3Rw9bT.QPh9Ld3eqgysBzQP8.5b62irk43SjHu"], ["role", 10], ["created_at", "2016-05-03 01:57:41.916043"], ["updated_at", "2016-05-03 01:57:41.916043"], ["uuid", "6bcd24b4-10d2-11e6-a9de-6c4008a6fa2a"]]
365336
+  (0.0ms) RELEASE SAVEPOINT active_record_1
365337
+  (0.0ms) SAVEPOINT active_record_1
365338
+ SQL (0.1ms) INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "6bcd24b4-10d2-11e6-a9de-6c4008a6fa2a"], ["uuid", "6bcd6316-10d2-11e6-a9de-6c4008a6fa2a"], ["secret", "d1ff5018-f211-4bfb-8e14-2fff434e5a87"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2YmNkMjRiNC0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2YmNkNjMxNi0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYyMjQwNjYxLCJleHAiOjE0NjIyNDQyNjF9.nH8HXnMA7CBDi2yMqtYk5_XATl2FvK8uXXO6KPSb6Lg"], ["created_at", "2016-05-03 01:57:41.918405"], ["updated_at", "2016-05-03 01:57:41.918405"]]
365339
+  (0.0ms) RELEASE SAVEPOINT active_record_1
365340
+  (0.0ms) SAVEPOINT active_record_1
365341
+ 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" != '6bcd24b4-10d2-11e6-a9de-6c4008a6fa2a') LIMIT 1
365342
+ SQL (0.2ms) UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2YmNkMjRiNC0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2YmNkNjMxNi0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYyMjQwNjYxLCJleHAiOjE0NjIyNDQyNjF9.nH8HXnMA7CBDi2yMqtYk5_XATl2FvK8uXXO6KPSb6Lg"], ["updated_at", "2016-05-03 01:57:41.919957"], ["uuid", "6bcd24b4-10d2-11e6-a9de-6c4008a6fa2a"]]
365343
+  (0.0ms) RELEASE SAVEPOINT active_record_1
365344
+ [ActiveJob] RailsIdentity::User Load (0.2ms) SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "6bcd24b4-10d2-11e6-a9de-6c4008a6fa2a"]]
365345
+ [ActiveJob] [ActionMailer::DeliveryJob] [149cd283-843a-42f8-85d2-486d2fc41fdf] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/6bcd24b4-10d2-11e6-a9de-6c4008a6fa2a
365346
+ [ActiveJob] [ActionMailer::DeliveryJob] [149cd283-843a-42f8-85d2-486d2fc41fdf] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
365347
+ [ActiveJob] [ActionMailer::DeliveryJob] [149cd283-843a-42f8-85d2-486d2fc41fdf] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
365348
+ [ActiveJob] [ActionMailer::DeliveryJob] [149cd283-843a-42f8-85d2-486d2fc41fdf]
365349
+ RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.5ms
365350
+ [ActiveJob] [ActionMailer::DeliveryJob] [149cd283-843a-42f8-85d2-486d2fc41fdf]
365351
+ Sent mail to foo@example.com (4.6ms)
365352
+ [ActiveJob] [ActionMailer::DeliveryJob] [149cd283-843a-42f8-85d2-486d2fc41fdf] Date: Mon, 02 May 2016 20:57:41 -0500
365353
+ From: no-reply@rails-identity.com
365354
+ To: foo@example.com
365355
+ Message-ID: <57280595e2e04_127c13fdcbd45e4602593d@galt.local.mail>
365356
+ Subject: [rails-identity] Email Confirmation
365357
+ Mime-Version: 1.0
365358
+ Content-Type: multipart/alternative;
365359
+ boundary="--==_mimepart_57280595e2461_127c13fdcbd45e4602582a";
365360
+ charset=UTF-8
365361
+ Content-Transfer-Encoding: 7bit
365362
+
365363
+
365364
+ ----==_mimepart_57280595e2461_127c13fdcbd45e4602582a
365365
+ Content-Type: text/plain;
365366
+ charset=UTF-8
365367
+ Content-Transfer-Encoding: 7bit
365368
+
365369
+ Dear foo@example.com,
365370
+
365371
+ Please confirm your account with rails-identity by making a PATCH request
365372
+ on the current user with a provided verification token. For example,
365373
+
365374
+ http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2YmNkMjRiNC0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2YmNkNjMxNi0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYyMjQwNjYxLCJleHAiOjE0NjIyNDQyNjF9.nH8HXnMA7CBDi2yMqtYk5_XATl2FvK8uXXO6KPSb6Lg verified=true
365375
+
365376
+ will confirm the account. Here is the verification token:
365377
+
365378
+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2YmNkMjRiNC0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2YmNkNjMxNi0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYyMjQwNjYxLCJleHAiOjE0NjIyNDQyNjF9.nH8HXnMA7CBDi2yMqtYk5_XATl2FvK8uXXO6KPSb6Lg
365379
+
365380
+ Thank you for using rails-identity,
365381
+ rails-identity
365382
+
365383
+
365384
+ ----==_mimepart_57280595e2461_127c13fdcbd45e4602582a
365385
+ Content-Type: text/html;
365386
+ charset=UTF-8
365387
+ Content-Transfer-Encoding: 7bit
365388
+
365389
+ <html>
365390
+ <body>
365391
+ <p>Dear foo@example.com,</p>
365392
+
365393
+ <p>Please confirm your account with rails-identity by making a PATCH request
365394
+ on the current user with a provided verification token. For example,
365395
+ <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2YmNkMjRiNC0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2YmNkNjMxNi0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYyMjQwNjYxLCJleHAiOjE0NjIyNDQyNjF9.nH8HXnMA7CBDi2yMqtYk5_XATl2FvK8uXXO6KPSb6Lg
365396
+ verified=true</pre> will confirm the account. Here is the verification
365397
+ token:</p>
365398
+
365399
+ <pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI2YmNkMjRiNC0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI2YmNkNjMxNi0xMGQyLTExZTYtYTlkZS02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYyMjQwNjYxLCJleHAiOjE0NjIyNDQyNjF9.nH8HXnMA7CBDi2yMqtYk5_XATl2FvK8uXXO6KPSb6Lg</pre>
365400
+
365401
+ <p>Thank you for using rails-identity</p>
365402
+ <p><b>rails-identity</b></p>
365403
+
365404
+ </body>
365405
+ </html>
365406
+
365407
+ ----==_mimepart_57280595e2461_127c13fdcbd45e4602582a--
365408
+
365409
+ [ActiveJob] [ActionMailer::DeliveryJob] [149cd283-843a-42f8-85d2-486d2fc41fdf] Performed ActionMailer::DeliveryJob from Inline(mailers) in 7.7ms
365410
+ [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 149cd283-843a-42f8-85d2-486d2fc41fdf) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/6bcd24b4-10d2-11e6-a9de-6c4008a6fa2a
365411
+ Completed 201 Created in 20ms (Views: 0.3ms | ActiveRecord: 0.9ms)
365412
+  (0.6ms) rollback transaction
365413
+  (0.0ms) begin transaction
365414
+ ------------------------------------------------------------------------------------------------------
365415
+ RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_with_invalid_username
365416
+ ------------------------------------------------------------------------------------------------------
365417
+ RailsIdentity::Session Load (0.1ms) SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
365418
+ Processing by RailsIdentity::UsersController#update as HTML
365419
+ Parameters: {"issue_reset_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
365420
+ Accepts a token
365421
+ Token decode error: Nil JSON web token
365422
+ Suppressing error: Invalid token:
365423
+ 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"]]
365424
+ 404 - Repia::Errors::NotFound
365425
+ Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
365426
+  (0.1ms) rollback transaction