rails-identity 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails_identity/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +1774 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2692ca2c92fa8c70baf0faa085230d26c8e0a7d6
|
4
|
+
data.tar.gz: ff025713fa3bf222d33e0eeb2ed4aa989f2d01c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56baf3620f1a4f7f5b87d02330ff4f5632d3ab6e6fc0413a689e4ba2b3c5dc1d105667c6bf42dde812031c6909445e7e23dca6c16c4f90f9692d4987814450f7
|
7
|
+
data.tar.gz: 2964fe6dc4ef5a9af01da9a0295b102b7e1f0c0964b33357a624e4bdfbc90e24f621ae19a6db18a167debc9529a18dcd8f8f15e78acd5ef5323b60dab8c387b1
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/test/dummy/log/test.log
CHANGED
@@ -322029,3 +322029,1777 @@ RailsIdentity::SessionTest: test_save_a_session
|
|
322029
322029
|
RailsIdentity::SessionTest: test_cannot_save_a_session_without_a_user
|
322030
322030
|
---------------------------------------------------------------------
|
322031
322031
|
[1m[35m (0.0ms)[0m rollback transaction
|
322032
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
322033
|
+
[1m[35m (0.1ms)[0m begin transaction
|
322034
|
+
[1m[36mFixture Delete (0.3ms)[0m [1mDELETE FROM "rails_identity_sessions"[0m
|
322035
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('1', '1', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA', 'secret', '2016-04-16 04:24:39', '2016-04-16 04:24:39')
|
322036
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('2', '2', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIyIiwidXNlcl91dWlkIjoiMiIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.FbDmc7IzVSQmdKeK7cO-TIAYTU2l1shIwnGghOh55kY', 'secret', '2016-04-16 04:24:39', '2016-04-16 04:24:39')[0m
|
322037
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('session_admin_one', 'admin_one', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYwODMxMDc4fQ.CSDumaIQ9SroeW6Gs3tjyvRV5BkKB5uQMiGq7ObGRSk', 'secret', '2016-04-16 04:24:39', '2016-04-16 04:24:39')
|
322038
|
+
[1m[36mFixture Delete (0.1ms)[0m [1mDELETE FROM "rails_identity_users"[0m
|
322039
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "rails_identity_users" ("uuid", "username", "password_digest", "role", "verified", "created_at", "updated_at") VALUES ('1', 'one@example.com', '$2a$10$VITEkRHFe8telBZ6vCxa7ujte5Y0lOLPDuEyj6RVhyVcTY.BGewxy', 10, 't', '2016-04-16 04:24:39', '2016-04-16 04:24:39')
|
322040
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "rails_identity_users" ("uuid", "username", "password_digest", "role", "verified", "created_at", "updated_at") VALUES ('2', 'two@example.com', '$2a$10$pASxTRAGXlMuE493kIWfX.LaTLPXdE8ehjx2hKdp3M6QCqXClL.AO', 10, 't', '2016-04-16 04:24:39', '2016-04-16 04:24:39')[0m
|
322041
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "rails_identity_users" ("uuid", "username", "password_digest", "role", "verified", "created_at", "updated_at") VALUES ('admin_one', 'admin_one@example.com', '$2a$10$Hr0QW2X328jLo5jE6SeHHONgt9fseSm31U/m0LdZpjTUueKZEyaQm', 100, 't', '2016-04-16 04:24:39', '2016-04-16 04:24:39')
|
322042
|
+
[1m[36m (1.4ms)[0m [1mcommit transaction[0m
|
322043
|
+
[1m[35m (0.1ms)[0m begin transaction
|
322044
|
+
-----------------------------------------------------------------
|
322045
|
+
RailsIdentity::UserTest: test_user_can_issue_a_verification_token
|
322046
|
+
-----------------------------------------------------------------
|
322047
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
322048
|
+
[1m[35mRailsIdentity::User Exists (0.1ms)[0m 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
|
322049
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?)[0m [["username", "foo@example.com"], ["password_digest", "$2a$04$39aY42MmXbf8jZA/Oc3Q9.zDmK/sQhUqMamJ/boTrE6jUVDacA846"], ["role", 10], ["created_at", "2016-04-16 04:24:39.041953"], ["updated_at", "2016-04-16 04:24:39.041953"], ["uuid", "22320a80-038b-11e6-885f-6c4008a6fa2a"]]
|
322050
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
322051
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
322052
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "22320a80-038b-11e6-885f-6c4008a6fa2a"], ["uuid", "2239e9a8-038b-11e6-885f-6c4008a6fa2a"], ["secret", "0c2c6684-81c6-4a62-bbb2-e48aee3b6480"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMjMyMGE4MC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMjM5ZTlhOC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjc5LCJleHAiOjE0NjA3ODQyNzl9.lv3d3sq_yyTV1VdtkH0ZdlkuLVvnglzX7xq4kr2cvW8"], ["created_at", "2016-04-16 04:24:39.094928"], ["updated_at", "2016-04-16 04:24:39.094928"]]
|
322053
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
322054
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
322055
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
322056
|
+
----------------------------------------------------------------------
|
322057
|
+
RailsIdentity::UserTest: test_user_is_valid_with_username_and_password
|
322058
|
+
----------------------------------------------------------------------
|
322059
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
322060
|
+
[1m[36mRailsIdentity::User Exists (0.2ms)[0m [1mSELECT 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[0m
|
322061
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$2X2.UpWfypoD.mblwNIqIuInTUIOSRuuy9udHXwoUmN/mx5gM3eP2"], ["role", 10], ["created_at", "2016-04-16 04:24:39.101469"], ["updated_at", "2016-04-16 04:24:39.101469"], ["uuid", "223b2002-038b-11e6-885f-6c4008a6fa2a"]]
|
322062
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
322063
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
322064
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
322065
|
+
--------------------------------------------------------------------------
|
322066
|
+
RailsIdentity::UserTest: test_user_is_not_valid_if_username_already_exists
|
322067
|
+
--------------------------------------------------------------------------
|
322068
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
322069
|
+
[1m[36mRailsIdentity::User Exists (0.1ms)[0m [1mSELECT 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[0m
|
322070
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
322071
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
322072
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322073
|
+
------------------------------------------------------------------
|
322074
|
+
RailsIdentity::UserTest: test_user_is_not_valid_without_a_password
|
322075
|
+
------------------------------------------------------------------
|
322076
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
322077
|
+
[1m[35mRailsIdentity::User Exists (0.1ms)[0m 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
|
322078
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
322079
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
322080
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
322081
|
+
---------------------------------------------------------------
|
322082
|
+
RailsIdentity::UserTest: test_user_has_a_role_of_100_by_default
|
322083
|
+
---------------------------------------------------------------
|
322084
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
322085
|
+
[1m[36mRailsIdentity::User Exists (0.1ms)[0m [1mSELECT 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[0m
|
322086
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "new@example.com"], ["password_digest", "$2a$04$AiWDrkOSwpc0tMf8pFkm8.LzPR2oyXwNEzq2zvqVrfL6B6GoAN3pi"], ["role", 10], ["created_at", "2016-04-16 04:24:39.115287"], ["updated_at", "2016-04-16 04:24:39.115287"], ["uuid", "223d398c-038b-11e6-885f-6c4008a6fa2a"]]
|
322087
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
322088
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
322089
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
322090
|
+
---------------------------------------------------------------------------
|
322091
|
+
RailsIdentity::UserTest: test_user_is_not_valid_if_username_is_malformatted
|
322092
|
+
---------------------------------------------------------------------------
|
322093
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
322094
|
+
[1m[36mRailsIdentity::User Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1[0m
|
322095
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
322096
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
322097
|
+
[1m[35m (0.1ms)[0m begin transaction
|
322098
|
+
------------------------------------------------------------------
|
322099
|
+
RailsIdentity::UserTest: test_user_is_not_valid_without_a_username
|
322100
|
+
------------------------------------------------------------------
|
322101
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
322102
|
+
[1m[35mRailsIdentity::User Exists (0.1ms)[0m 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
|
322103
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
322104
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
322105
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
322106
|
+
----------------------------------------------------------
|
322107
|
+
RailsIdentity::UserTest: test_user_can_issue_a_reset_token
|
322108
|
+
----------------------------------------------------------
|
322109
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
322110
|
+
[1m[36mRailsIdentity::User Exists (0.1ms)[0m [1mSELECT 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[0m
|
322111
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$0nBKRAuwJ08ULtoiaKD.KeiPmJQ4ArlwONMQmsRWI89yugY0NLPEi"], ["role", 10], ["created_at", "2016-04-16 04:24:39.125122"], ["updated_at", "2016-04-16 04:24:39.125122"], ["uuid", "223eb956-038b-11e6-885f-6c4008a6fa2a"]]
|
322112
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
322113
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
322114
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["user_uuid", "223eb956-038b-11e6-885f-6c4008a6fa2a"], ["uuid", "223ee1ec-038b-11e6-885f-6c4008a6fa2a"], ["secret", "618de48b-bf8b-421a-a8f3-99650ffdad44"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMjNlYjk1Ni0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMjNlZTFlYy0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjc5LCJleHAiOjE0NjA3ODQyNzl9.-32voUPf7tG6OYfo6AygPupYsjoxxi09E2fyWEb0bbk"], ["created_at", "2016-04-16 04:24:39.127098"], ["updated_at", "2016-04-16 04:24:39.127098"]]
|
322115
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
322116
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
322117
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322118
|
+
------------------------------------------------------------
|
322119
|
+
RailsIdentity::SessionsControllerTest: test_create_a_session
|
322120
|
+
------------------------------------------------------------
|
322121
|
+
[1m[36mRailsIdentity::Session Load (0.2ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322122
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322123
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
322124
|
+
Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
|
322125
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1[0m [["username", "one@example.com"]]
|
322126
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
322127
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["user_uuid", "1"], ["uuid", "225400b8-038b-11e6-885f-6c4008a6fa2a"], ["secret", "2f40d519-4186-4351-a5a6-fd09b651d348"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjI1NDAwYjgtMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY3OSwiZXhwIjoxNDYxOTkwMjc5fQ.ZU20OM46a9ZvRj8WS3jaJLjuGUPgVaF0Q3YhoJSNGDI"], ["created_at", "2016-04-16 04:24:39.265588"], ["updated_at", "2016-04-16 04:24:39.265588"]]
|
322128
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
322129
|
+
Completed 201 Created in 65ms (Views: 0.4ms | ActiveRecord: 0.4ms)
|
322130
|
+
[1m[36m (1.2ms)[0m [1mrollback transaction[0m
|
322131
|
+
[1m[35m (0.1ms)[0m begin transaction
|
322132
|
+
----------------------------------------------------------------------
|
322133
|
+
RailsIdentity::SessionsControllerTest: test_public_cannot_show_session
|
322134
|
+
----------------------------------------------------------------------
|
322135
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322136
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
322137
|
+
Parameters: {"id"=>"1"}
|
322138
|
+
Requires a token
|
322139
|
+
Token decode error: Nil JSON web token
|
322140
|
+
Invalid token:
|
322141
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
322142
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
322143
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
322144
|
+
--------------------------------------------------------------------------
|
322145
|
+
RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions
|
322146
|
+
--------------------------------------------------------------------------
|
322147
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322148
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
322149
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA"}
|
322150
|
+
Requires a token
|
322151
|
+
Token well formatted for user 1,
|
322152
|
+
session 1
|
322153
|
+
Cache miss. Try database.
|
322154
|
+
[1m[36mRailsIdentity::User Load (0.2ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322155
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322156
|
+
Token well formatted and verified. Set cache.
|
322157
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322158
|
+
Attempting to get user
|
322159
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
|
322160
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [8a641147-7697-46f6-b1b1-198726ad6260] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
|
322161
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [8a641147-7697-46f6-b1b1-198726ad6260] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 0.11ms
|
322162
|
+
[ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: 8a641147-7697-46f6-b1b1-198726ad6260) to Inline(default)
|
322163
|
+
Completed 200 OK in 17ms (Views: 1.0ms | ActiveRecord: 0.3ms)
|
322164
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322165
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
|
322166
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322167
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
322168
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
322169
|
+
--------------------------------------------------------------------------------------
|
322170
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_a_password
|
322171
|
+
--------------------------------------------------------------------------------------
|
322172
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322173
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322174
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
322175
|
+
Parameters: {"username"=>"one@example.com"}
|
322176
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m 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"]]
|
322177
|
+
Attempting to get user
|
322178
|
+
Completed 401 Unauthorized in 66ms (Views: 0.3ms | ActiveRecord: 0.1ms)
|
322179
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
322180
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322181
|
+
----------------------------------------------------------------------------
|
322182
|
+
RailsIdentity::SessionsControllerTest: test_admin_can_delete_other's_session
|
322183
|
+
----------------------------------------------------------------------------
|
322184
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322185
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
|
322186
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
322187
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYwODMxMDc4fQ.CSDumaIQ9SroeW6Gs3tjyvRV5BkKB5uQMiGq7ObGRSk", "id"=>"1"}
|
322188
|
+
Requires a token
|
322189
|
+
Token well formatted for user admin_one,
|
322190
|
+
session session_admin_one
|
322191
|
+
Cache miss. Try database.
|
322192
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "admin_one"]]
|
322193
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
|
322194
|
+
Token well formatted and verified. Set cache.
|
322195
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "admin_one"]]
|
322196
|
+
Attempting to get RailsIdentity::Session 1
|
322197
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322198
|
+
Checking to see if authorized to access object
|
322199
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
322200
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
|
322201
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
322202
|
+
Rendered text template (0.0ms)
|
322203
|
+
Completed 204 No Content in 9ms (Views: 4.4ms | ActiveRecord: 0.4ms)
|
322204
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
322205
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
322206
|
+
------------------------------------------------------------------
|
322207
|
+
RailsIdentity::SessionsControllerTest: test_show_a_current_session
|
322208
|
+
------------------------------------------------------------------
|
322209
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322210
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
322211
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"current"}
|
322212
|
+
Requires a token
|
322213
|
+
Token well formatted for user 1,
|
322214
|
+
session 1
|
322215
|
+
Cache miss. Try database.
|
322216
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322217
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322218
|
+
Token well formatted and verified. Set cache.
|
322219
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322220
|
+
Attempting to get RailsIdentity::Session 1
|
322221
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322222
|
+
Checking to see if authorized to access object
|
322223
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322224
|
+
Completed 200 OK in 7ms (Views: 0.5ms | ActiveRecord: 0.3ms)
|
322225
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
322226
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
322227
|
+
--------------------------------------------------------------------
|
322228
|
+
RailsIdentity::SessionsControllerTest: test_delete_a_current_session
|
322229
|
+
--------------------------------------------------------------------
|
322230
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322231
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
322232
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"current"}
|
322233
|
+
Requires a token
|
322234
|
+
Token well formatted for user 1,
|
322235
|
+
session 1
|
322236
|
+
Cache miss. Try database.
|
322237
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322238
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322239
|
+
Token well formatted and verified. Set cache.
|
322240
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322241
|
+
Attempting to get RailsIdentity::Session 1
|
322242
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322243
|
+
Checking to see if authorized to access object
|
322244
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322245
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
322246
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ?[0m [["uuid", "1"]]
|
322247
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
322248
|
+
Rendered text template (0.0ms)
|
322249
|
+
Completed 204 No Content in 7ms (Views: 0.4ms | ActiveRecord: 0.6ms)
|
322250
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
322251
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322252
|
+
-----------------------------------------------------------------------------------
|
322253
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_if_not_verified
|
322254
|
+
-----------------------------------------------------------------------------------
|
322255
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322256
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322257
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
322258
|
+
[1m[35mRailsIdentity::User Exists (0.1ms)[0m 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
|
322259
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rails_identity_users" SET "verified" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["verified", "f"], ["updated_at", "2016-04-16 04:24:39.414579"], ["uuid", "1"]]
|
322260
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
322261
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
322262
|
+
Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
|
322263
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1[0m [["username", "one@example.com"]]
|
322264
|
+
RailsIdentity::Errors::UnauthorizedError
|
322265
|
+
Completed 401 Unauthorized in 66ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
322266
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
322267
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
322268
|
+
-----------------------------------------------------------------------------
|
322269
|
+
RailsIdentity::SessionsControllerTest: test_cannot_show_a_nonexisting_session
|
322270
|
+
-----------------------------------------------------------------------------
|
322271
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322272
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
322273
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"999"}
|
322274
|
+
Requires a token
|
322275
|
+
Token well formatted for user 1,
|
322276
|
+
session 1
|
322277
|
+
Cache miss. Try database.
|
322278
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322279
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322280
|
+
Token well formatted and verified. Set cache.
|
322281
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322282
|
+
Attempting to get RailsIdentity::Session 999
|
322283
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "999"]]
|
322284
|
+
RailsIdentity::Session 999 cannot be found
|
322285
|
+
Completed 404 Not Found in 6ms (Views: 0.3ms | ActiveRecord: 0.3ms)
|
322286
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
322287
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322288
|
+
------------------------------------------------------------------------------------
|
322289
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_username
|
322290
|
+
------------------------------------------------------------------------------------
|
322291
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322292
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
322293
|
+
Parameters: {"password"=>"[FILTERED]"}
|
322294
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m 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
|
322295
|
+
Attempting to get user
|
322296
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
322297
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
322298
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322299
|
+
-----------------------------------------------------------------------
|
322300
|
+
RailsIdentity::SessionsControllerTest: test_cannot_show_expired_session
|
322301
|
+
-----------------------------------------------------------------------
|
322302
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322303
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322304
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
322305
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "2278a120-038b-11e6-885f-6c4008a6fa2a"], ["secret", "8b3aaa5f-2699-4b1c-9005-fac755e19e86"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjI3OGExMjAtMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY3OSwiZXhwIjoxNDYwNzgwNjc4fQ.3ebv4RfEUtqJKaKjs3SBBGEb-rSMDoTg2e_F3iW47vI"], ["created_at", "2016-04-16 04:24:39.505554"], ["updated_at", "2016-04-16 04:24:39.505554"]]
|
322306
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
322307
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
322308
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"2278a120-038b-11e6-885f-6c4008a6fa2a"}
|
322309
|
+
Requires a token
|
322310
|
+
Token well formatted for user 1,
|
322311
|
+
session 1
|
322312
|
+
Cache miss. Try database.
|
322313
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322314
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322315
|
+
Token well formatted and verified. Set cache.
|
322316
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322317
|
+
Attempting to get RailsIdentity::Session 2278a120-038b-11e6-885f-6c4008a6fa2a
|
322318
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "2278a120-038b-11e6-885f-6c4008a6fa2a"]]
|
322319
|
+
Checking to see if authorized to access object
|
322320
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322321
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
322322
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "2278a120-038b-11e6-885f-6c4008a6fa2a"]]
|
322323
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
322324
|
+
RailsIdentity::Errors::ObjectNotFoundError
|
322325
|
+
Completed 404 Not Found in 8ms (Views: 0.2ms | ActiveRecord: 0.6ms)
|
322326
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
322327
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
322328
|
+
--------------------------------------------------------------------------------
|
322329
|
+
RailsIdentity::SessionsControllerTest: test_cannot_delete_a_non-existent_session
|
322330
|
+
--------------------------------------------------------------------------------
|
322331
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322332
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
322333
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"999"}
|
322334
|
+
Requires a token
|
322335
|
+
Token well formatted for user 1,
|
322336
|
+
session 1
|
322337
|
+
Cache miss. Try database.
|
322338
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322339
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322340
|
+
Token well formatted and verified. Set cache.
|
322341
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322342
|
+
Attempting to get RailsIdentity::Session 999
|
322343
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "999"]]
|
322344
|
+
RailsIdentity::Session 999 cannot be found
|
322345
|
+
Completed 404 Not Found in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
322346
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
322347
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322348
|
+
--------------------------------------------------------------------------
|
322349
|
+
RailsIdentity::SessionsControllerTest: test_admin_can_show_other's_session
|
322350
|
+
--------------------------------------------------------------------------
|
322351
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322352
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
|
322353
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
322354
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYwODMxMDc4fQ.CSDumaIQ9SroeW6Gs3tjyvRV5BkKB5uQMiGq7ObGRSk", "id"=>"1"}
|
322355
|
+
Requires a token
|
322356
|
+
Token well formatted for user admin_one,
|
322357
|
+
session session_admin_one
|
322358
|
+
Cache miss. Try database.
|
322359
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "admin_one"]]
|
322360
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
|
322361
|
+
Token well formatted and verified. Set cache.
|
322362
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "admin_one"]]
|
322363
|
+
Attempting to get RailsIdentity::Session 1
|
322364
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322365
|
+
Checking to see if authorized to access object
|
322366
|
+
Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms)
|
322367
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
322368
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322369
|
+
-------------------------------------------------------------------------
|
322370
|
+
RailsIdentity::SessionsControllerTest: test_public_cannot_create_sessions
|
322371
|
+
-------------------------------------------------------------------------
|
322372
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322373
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
322374
|
+
Requires a token
|
322375
|
+
Token decode error: Nil JSON web token
|
322376
|
+
Invalid token:
|
322377
|
+
Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
322378
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
322379
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
322380
|
+
-------------------------------------------------------------------------
|
322381
|
+
RailsIdentity::SessionsControllerTest: test_cannot_delete_other's_session
|
322382
|
+
-------------------------------------------------------------------------
|
322383
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322384
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
322385
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"2"}
|
322386
|
+
Requires a token
|
322387
|
+
Token well formatted for user 1,
|
322388
|
+
session 1
|
322389
|
+
Cache miss. Try database.
|
322390
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322391
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322392
|
+
Token well formatted and verified. Set cache.
|
322393
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322394
|
+
Attempting to get RailsIdentity::Session 2
|
322395
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2"]]
|
322396
|
+
Checking to see if authorized to access object
|
322397
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "2"]]
|
322398
|
+
RailsIdentity::Errors::UnauthorizedError
|
322399
|
+
Completed 401 Unauthorized in 6ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
322400
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
322401
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
322402
|
+
----------------------------------------------------------
|
322403
|
+
RailsIdentity::SessionsControllerTest: test_show_a_session
|
322404
|
+
----------------------------------------------------------
|
322405
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322406
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
322407
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
|
322408
|
+
Requires a token
|
322409
|
+
Token well formatted for user 1,
|
322410
|
+
session 1
|
322411
|
+
Cache miss. Try database.
|
322412
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322413
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322414
|
+
Token well formatted and verified. Set cache.
|
322415
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322416
|
+
Attempting to get RailsIdentity::Session 1
|
322417
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322418
|
+
Checking to see if authorized to access object
|
322419
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322420
|
+
Completed 200 OK in 38ms (Views: 0.6ms | ActiveRecord: 0.2ms)
|
322421
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
322422
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
322423
|
+
----------------------------------------------------------------------------
|
322424
|
+
RailsIdentity::SessionsControllerTest: test_user_cannot_list_expired_session
|
322425
|
+
----------------------------------------------------------------------------
|
322426
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322427
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322428
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
322429
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["user_uuid", "1"], ["uuid", "2286ce94-038b-11e6-885f-6c4008a6fa2a"], ["secret", "a0e0cfae-d6de-46ae-bc87-966e85367654"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjI4NmNlOTQtMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY3OSwiZXhwIjoxNDYwNzgwNjc4fQ.NMsntvJHQgc8-syKYAMlrYmpFPWO-fBX9x2JJwtlBWs"], ["created_at", "2016-04-16 04:24:39.598580"], ["updated_at", "2016-04-16 04:24:39.598580"]]
|
322430
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
322431
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
322432
|
+
Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA"}
|
322433
|
+
Requires a token
|
322434
|
+
Token well formatted for user 1,
|
322435
|
+
session 1
|
322436
|
+
Cache miss. Try database.
|
322437
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322438
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322439
|
+
Token well formatted and verified. Set cache.
|
322440
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322441
|
+
Attempting to get user 1
|
322442
|
+
Attempting to get RailsIdentity::User 1
|
322443
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322444
|
+
Checking to see if authorized to access object
|
322445
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'[0m
|
322446
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [3dd62964-2561-4195-af10-c85c97bd7097] Performing RailsIdentity::SessionsCleanupJob from Inline(default) with arguments: "2286ce94-038b-11e6-885f-6c4008a6fa2a"
|
322447
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [3dd62964-2561-4195-af10-c85c97bd7097] [1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2286ce94-038b-11e6-885f-6c4008a6fa2a"]]
|
322448
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [3dd62964-2561-4195-af10-c85c97bd7097] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
322449
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [3dd62964-2561-4195-af10-c85c97bd7097] [1m[35mSQL (0.2ms)[0m DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "2286ce94-038b-11e6-885f-6c4008a6fa2a"]]
|
322450
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [3dd62964-2561-4195-af10-c85c97bd7097] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
322451
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [3dd62964-2561-4195-af10-c85c97bd7097] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 1.2ms
|
322452
|
+
[ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: 3dd62964-2561-4195-af10-c85c97bd7097) to Inline(default) with arguments: "2286ce94-038b-11e6-885f-6c4008a6fa2a"
|
322453
|
+
Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 0.6ms)
|
322454
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
322455
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
322456
|
+
----------------------------------------------------------------------------------------------
|
322457
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_non-existent_username
|
322458
|
+
----------------------------------------------------------------------------------------------
|
322459
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322460
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
322461
|
+
Parameters: {"username"=>"idontexist", "password"=>"[FILTERED]"}
|
322462
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1[0m [["username", "idontexist"]]
|
322463
|
+
Attempting to get user
|
322464
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
322465
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
322466
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
322467
|
+
---------------------------------------------------------------------------------------------------
|
322468
|
+
RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions_using_user_id_in_routing
|
322469
|
+
---------------------------------------------------------------------------------------------------
|
322470
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322471
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322472
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
322473
|
+
Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA"}
|
322474
|
+
Requires a token
|
322475
|
+
Token well formatted for user 1,
|
322476
|
+
session 1
|
322477
|
+
Cache miss. Try database.
|
322478
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322479
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322480
|
+
Token well formatted and verified. Set cache.
|
322481
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322482
|
+
Attempting to get user 1
|
322483
|
+
Attempting to get RailsIdentity::User 1
|
322484
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322485
|
+
Checking to see if authorized to access object
|
322486
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
|
322487
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [cfc71991-7b24-4ae7-95f2-656539a2c684] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
|
322488
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [cfc71991-7b24-4ae7-95f2-656539a2c684] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 0.06ms
|
322489
|
+
[ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: cfc71991-7b24-4ae7-95f2-656539a2c684) to Inline(default)
|
322490
|
+
Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 0.2ms)
|
322491
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'[0m
|
322492
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322493
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
322494
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322495
|
+
-----------------------------------------------------------------------------
|
322496
|
+
RailsIdentity::SessionsControllerTest: test_user_cannot_list_other's_sessions
|
322497
|
+
-----------------------------------------------------------------------------
|
322498
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322499
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
|
322500
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
322501
|
+
Parameters: {"user_id"=>"2", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA"}
|
322502
|
+
Requires a token
|
322503
|
+
Token well formatted for user 1,
|
322504
|
+
session 1
|
322505
|
+
Cache miss. Try database.
|
322506
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322507
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322508
|
+
Token well formatted and verified. Set cache.
|
322509
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322510
|
+
Attempting to get user 2
|
322511
|
+
Attempting to get RailsIdentity::User 2
|
322512
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m 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"]]
|
322513
|
+
Checking to see if authorized to access object
|
322514
|
+
Not authorized to access user 2
|
322515
|
+
Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
322516
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
322517
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322518
|
+
------------------------------------------------------------------
|
322519
|
+
RailsIdentity::SessionsControllerTest: test_public_can_see_options
|
322520
|
+
------------------------------------------------------------------
|
322521
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322522
|
+
Processing by RailsIdentity::SessionsController#options as HTML
|
322523
|
+
Rendered text template (0.0ms)
|
322524
|
+
Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
|
322525
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
322526
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
322527
|
+
-----------------------------------------------------------------------------------------
|
322528
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_a_wrong_password
|
322529
|
+
-----------------------------------------------------------------------------------------
|
322530
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322531
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322532
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
322533
|
+
Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
|
322534
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m 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"]]
|
322535
|
+
Attempting to get user
|
322536
|
+
Completed 401 Unauthorized in 76ms (Views: 0.3ms | ActiveRecord: 0.1ms)
|
322537
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
322538
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322539
|
+
-----------------------------------------------------------------------
|
322540
|
+
RailsIdentity::SessionsControllerTest: test_cannot_show_other's_session
|
322541
|
+
-----------------------------------------------------------------------
|
322542
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322543
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
322544
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"2"}
|
322545
|
+
Requires a token
|
322546
|
+
Token well formatted for user 1,
|
322547
|
+
session 1
|
322548
|
+
Cache miss. Try database.
|
322549
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322550
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322551
|
+
Token well formatted and verified. Set cache.
|
322552
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322553
|
+
Attempting to get RailsIdentity::Session 2
|
322554
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "2"]]
|
322555
|
+
Checking to see if authorized to access object
|
322556
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m 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"]]
|
322557
|
+
RailsIdentity::Errors::UnauthorizedError
|
322558
|
+
Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
322559
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
322560
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322561
|
+
-----------------------------------------------------------------------
|
322562
|
+
RailsIdentity::SessionsControllerTest: test_public_cannot_list_sessions
|
322563
|
+
-----------------------------------------------------------------------
|
322564
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322565
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
322566
|
+
Requires a token
|
322567
|
+
Token decode error: Nil JSON web token
|
322568
|
+
Invalid token:
|
322569
|
+
Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
322570
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
322571
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
322572
|
+
------------------------------------------------------------
|
322573
|
+
RailsIdentity::SessionsControllerTest: test_delete_a_session
|
322574
|
+
------------------------------------------------------------
|
322575
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322576
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
322577
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
|
322578
|
+
Requires a token
|
322579
|
+
Token well formatted for user 1,
|
322580
|
+
session 1
|
322581
|
+
Cache miss. Try database.
|
322582
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322583
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322584
|
+
Token well formatted and verified. Set cache.
|
322585
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322586
|
+
Attempting to get RailsIdentity::Session 1
|
322587
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322588
|
+
Checking to see if authorized to access object
|
322589
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322590
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
322591
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ?[0m [["uuid", "1"]]
|
322592
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
322593
|
+
Rendered text template (0.0ms)
|
322594
|
+
Completed 204 No Content in 6ms (Views: 0.4ms | ActiveRecord: 0.4ms)
|
322595
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
322596
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322597
|
+
-------------------------------------------------------------------------
|
322598
|
+
RailsIdentity::UsersControllerTest: test_update_(issue)_a_new_reset_token
|
322599
|
+
-------------------------------------------------------------------------
|
322600
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322601
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322602
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
322603
|
+
Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
|
322604
|
+
Accepts a token
|
322605
|
+
Token decode error: Nil JSON web token
|
322606
|
+
Suppressing error: Invalid token:
|
322607
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1[0m [["username", "one@example.com"]]
|
322608
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
322609
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["user_uuid", "1"], ["uuid", "229f5fc2-038b-11e6-885f-6c4008a6fa2a"], ["secret", "a6821683-2456-4cb5-b712-67e0b1bb1fb3"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjI5ZjVmYzItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY3OSwiZXhwIjoxNDYwNzg0Mjc5fQ.9dQnlIG3F5IL8_bZz8jtfsNsRXi41fxfftzkpcr5pBg"], ["created_at", "2016-04-16 04:24:39.759789"], ["updated_at", "2016-04-16 04:24:39.759789"]]
|
322610
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
322611
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
322612
|
+
[1m[35mRailsIdentity::User Exists (0.1ms)[0m 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
|
322613
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjI5ZjVmYzItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY3OSwiZXhwIjoxNDYwNzg0Mjc5fQ.9dQnlIG3F5IL8_bZz8jtfsNsRXi41fxfftzkpcr5pBg"], ["updated_at", "2016-04-16 04:24:39.762842"], ["uuid", "1"]]
|
322614
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
322615
|
+
[ActiveJob] [1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322616
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [0ccd6ade-a9c7-4738-9b2a-5d32936b9917] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
|
322617
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [0ccd6ade-a9c7-4738-9b2a-5d32936b9917] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (1.2ms)
|
322618
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [0ccd6ade-a9c7-4738-9b2a-5d32936b9917] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (0.3ms)
|
322619
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [0ccd6ade-a9c7-4738-9b2a-5d32936b9917]
|
322620
|
+
RailsIdentity::UserMailer#password_reset: processed outbound mail in 188.5ms
|
322621
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [0ccd6ade-a9c7-4738-9b2a-5d32936b9917]
|
322622
|
+
Sent mail to one@example.com (6.1ms)
|
322623
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [0ccd6ade-a9c7-4738-9b2a-5d32936b9917] Date: Fri, 15 Apr 2016 23:24:39 -0500
|
322624
|
+
From: no-reply@rails-identity.com
|
322625
|
+
To: one@example.com
|
322626
|
+
Message-ID: <5711be87ebc28_1364d3fd924c52460741f4@galt.local.mail>
|
322627
|
+
Subject: [rails-identity] Password Reset
|
322628
|
+
Mime-Version: 1.0
|
322629
|
+
Content-Type: multipart/alternative;
|
322630
|
+
boundary="--==_mimepart_5711be87eab64_1364d3fd924c524607404";
|
322631
|
+
charset=UTF-8
|
322632
|
+
Content-Transfer-Encoding: 7bit
|
322633
|
+
|
322634
|
+
|
322635
|
+
----==_mimepart_5711be87eab64_1364d3fd924c524607404
|
322636
|
+
Content-Type: text/plain;
|
322637
|
+
charset=UTF-8
|
322638
|
+
Content-Transfer-Encoding: 7bit
|
322639
|
+
|
322640
|
+
Dear one@example.com,
|
322641
|
+
|
322642
|
+
You have requested to reset your password. Here are the user UUID and reset
|
322643
|
+
token. Make a PATCH request on the UUID with the reset token to set a new
|
322644
|
+
password. For instance,
|
322645
|
+
|
322646
|
+
http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
|
322647
|
+
|
322648
|
+
will set the password to "reallysecret" (without quotes) for the user to
|
322649
|
+
whom the reset token was issued.
|
322650
|
+
|
322651
|
+
Here is the reset token: @user.reset_token
|
322652
|
+
|
322653
|
+
Good luck! :)
|
322654
|
+
rails-identity
|
322655
|
+
|
322656
|
+
|
322657
|
+
----==_mimepart_5711be87eab64_1364d3fd924c524607404
|
322658
|
+
Content-Type: text/html;
|
322659
|
+
charset=UTF-8
|
322660
|
+
Content-Transfer-Encoding: 7bit
|
322661
|
+
|
322662
|
+
<html>
|
322663
|
+
<body>
|
322664
|
+
<p>Dear one@example.com,</p>
|
322665
|
+
|
322666
|
+
<p>You have requested to reset your password. Here are the user UUID and
|
322667
|
+
reset token. Make a PATCH request on the UUID with the reset token to set a
|
322668
|
+
new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjI5ZjVmYzItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY3OSwiZXhwIjoxNDYwNzg0Mjc5fQ.9dQnlIG3F5IL8_bZz8jtfsNsRXi41fxfftzkpcr5pBg password=reallysecret
|
322669
|
+
password_confirmation=reallysecret</pre> will set the password to
|
322670
|
+
<pre>reallysecret</pre> for the user to whom the reset token was issued.
|
322671
|
+
Here is the reset token:</p>
|
322672
|
+
|
322673
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjI5ZjVmYzItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY3OSwiZXhwIjoxNDYwNzg0Mjc5fQ.9dQnlIG3F5IL8_bZz8jtfsNsRXi41fxfftzkpcr5pBg</pre>
|
322674
|
+
|
322675
|
+
<p>Good luck! :)</p>
|
322676
|
+
<p><b>rails-identity</b></p>
|
322677
|
+
|
322678
|
+
</body>
|
322679
|
+
</html>
|
322680
|
+
|
322681
|
+
----==_mimepart_5711be87eab64_1364d3fd924c524607404--
|
322682
|
+
|
322683
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [0ccd6ade-a9c7-4738-9b2a-5d32936b9917] Performed ActionMailer::DeliveryJob from Inline(mailers) in 195.18ms
|
322684
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 0ccd6ade-a9c7-4738-9b2a-5d32936b9917) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
|
322685
|
+
Rendered text template (0.0ms)
|
322686
|
+
Completed 204 No Content in 214ms (Views: 1.7ms | ActiveRecord: 0.9ms)
|
322687
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322688
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = '1' LIMIT 1[0m
|
322689
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
322690
|
+
Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
|
322691
|
+
Accepts a token
|
322692
|
+
Token well formatted for user 1,
|
322693
|
+
session 1
|
322694
|
+
Cache miss. Try database.
|
322695
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322696
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322697
|
+
Token well formatted and verified. Set cache.
|
322698
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322699
|
+
Attempting to get RailsIdentity::User 1
|
322700
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322701
|
+
Checking to see if authorized to access object
|
322702
|
+
Unpermitted parameters: token, id
|
322703
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
322704
|
+
[1m[36mRailsIdentity::User Exists (0.1ms)[0m [1mSELECT 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[0m
|
322705
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-16 04:24:39.978196"], ["uuid", "1"]]
|
322706
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
322707
|
+
Completed 200 OK in 7ms (Views: 0.4ms | ActiveRecord: 1.4ms)
|
322708
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
322709
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
322710
|
+
-----------------------------------------------------------------------------------------------------------
|
322711
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_token_with_invalid_username
|
322712
|
+
-----------------------------------------------------------------------------------------------------------
|
322713
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322714
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
322715
|
+
Parameters: {"issue_verification_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
|
322716
|
+
Accepts a token
|
322717
|
+
Token decode error: Nil JSON web token
|
322718
|
+
Suppressing error: Invalid token:
|
322719
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1[0m [["username", "doesnotexist@example.com"]]
|
322720
|
+
RailsIdentity::Errors::ObjectNotFoundError
|
322721
|
+
Completed 404 Not Found in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
322722
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
322723
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
322724
|
+
------------------------------------------------------------
|
322725
|
+
RailsIdentity::UsersControllerTest: test_delete_current_user
|
322726
|
+
------------------------------------------------------------
|
322727
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322728
|
+
Processing by RailsIdentity::UsersController#destroy as HTML
|
322729
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"current"}
|
322730
|
+
Requires a token
|
322731
|
+
Token well formatted for user 1,
|
322732
|
+
session 1
|
322733
|
+
Cache miss. Try database.
|
322734
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322735
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322736
|
+
Token well formatted and verified. Set cache.
|
322737
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322738
|
+
Attempting to get RailsIdentity::User 1
|
322739
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322740
|
+
Checking to see if authorized to access object
|
322741
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
322742
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rails_identity_users" SET "deleted_at" = '2016-04-16 04:24:39.996679' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
|
322743
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
322744
|
+
Rendered text template (0.0ms)
|
322745
|
+
Completed 204 No Content in 5ms (Views: 0.3ms | ActiveRecord: 0.4ms)
|
322746
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
322747
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
322748
|
+
------------------------------------------------------------------
|
322749
|
+
RailsIdentity::UsersControllerTest: test_admin_can_show_other_user
|
322750
|
+
------------------------------------------------------------------
|
322751
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322752
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "session_admin_one"]]
|
322753
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
322754
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYwODMxMDc4fQ.CSDumaIQ9SroeW6Gs3tjyvRV5BkKB5uQMiGq7ObGRSk", "id"=>"1"}
|
322755
|
+
Requires a token
|
322756
|
+
Token well formatted for user admin_one,
|
322757
|
+
session session_admin_one
|
322758
|
+
Cache miss. Try database.
|
322759
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m 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"]]
|
322760
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "session_admin_one"]]
|
322761
|
+
Token well formatted and verified. Set cache.
|
322762
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m 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"]]
|
322763
|
+
Attempting to get RailsIdentity::User 1
|
322764
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322765
|
+
Checking to see if authorized to access object
|
322766
|
+
Completed 200 OK in 7ms (Views: 0.7ms | ActiveRecord: 0.3ms)
|
322767
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
322768
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
322769
|
+
------------------------------------------------------------------
|
322770
|
+
RailsIdentity::UsersControllerTest: test_public_cannot_show_a_user
|
322771
|
+
------------------------------------------------------------------
|
322772
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322773
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
322774
|
+
Parameters: {"id"=>"1"}
|
322775
|
+
Requires a token
|
322776
|
+
Token decode error: Nil JSON web token
|
322777
|
+
Invalid token:
|
322778
|
+
Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
322779
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
322780
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322781
|
+
------------------------------------------------------
|
322782
|
+
RailsIdentity::UsersControllerTest: test_delete_a_user
|
322783
|
+
------------------------------------------------------
|
322784
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322785
|
+
Processing by RailsIdentity::UsersController#destroy as HTML
|
322786
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
|
322787
|
+
Requires a token
|
322788
|
+
Token well formatted for user 1,
|
322789
|
+
session 1
|
322790
|
+
Cache miss. Try database.
|
322791
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322792
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322793
|
+
Token well formatted and verified. Set cache.
|
322794
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322795
|
+
Attempting to get RailsIdentity::User 1
|
322796
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322797
|
+
Checking to see if authorized to access object
|
322798
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
322799
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rails_identity_users" SET "deleted_at" = '2016-04-16 04:24:40.022991' WHERE "rails_identity_users"."uuid" = ?[0m [["uuid", "1"]]
|
322800
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
322801
|
+
Rendered text template (0.0ms)
|
322802
|
+
Completed 204 No Content in 5ms (Views: 0.3ms | ActiveRecord: 0.4ms)
|
322803
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
322804
|
+
[1m[35m (0.1ms)[0m begin transaction
|
322805
|
+
------------------------------------------------------------
|
322806
|
+
RailsIdentity::UsersControllerTest: test_show_a_current_user
|
322807
|
+
------------------------------------------------------------
|
322808
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322809
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
322810
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"current"}
|
322811
|
+
Requires a token
|
322812
|
+
Token well formatted for user 1,
|
322813
|
+
session 1
|
322814
|
+
Cache miss. Try database.
|
322815
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322816
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322817
|
+
Token well formatted and verified. Set cache.
|
322818
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322819
|
+
Attempting to get RailsIdentity::User 1
|
322820
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322821
|
+
Checking to see if authorized to access object
|
322822
|
+
Completed 200 OK in 7ms (Views: 0.7ms | ActiveRecord: 0.3ms)
|
322823
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322824
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
322825
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322826
|
+
----------------------------------------------------
|
322827
|
+
RailsIdentity::UsersControllerTest: test_show_a_user
|
322828
|
+
----------------------------------------------------
|
322829
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322830
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
322831
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
|
322832
|
+
Requires a token
|
322833
|
+
Token well formatted for user 1,
|
322834
|
+
session 1
|
322835
|
+
Cache miss. Try database.
|
322836
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322837
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322838
|
+
Token well formatted and verified. Set cache.
|
322839
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322840
|
+
Attempting to get RailsIdentity::User 1
|
322841
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322842
|
+
Checking to see if authorized to access object
|
322843
|
+
Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms)
|
322844
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322845
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
322846
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322847
|
+
------------------------------------------------------------------------------------
|
322848
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_password_with_a_invalid_token
|
322849
|
+
------------------------------------------------------------------------------------
|
322850
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322851
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
322852
|
+
Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
|
322853
|
+
Accepts a token
|
322854
|
+
Token well formatted for user 1,
|
322855
|
+
session 1
|
322856
|
+
Cache miss. Try database.
|
322857
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322858
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322859
|
+
Token well formatted and verified. Set cache.
|
322860
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322861
|
+
Attempting to get RailsIdentity::User 1
|
322862
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322863
|
+
Checking to see if authorized to access object
|
322864
|
+
RailsIdentity::Errors::UnauthorizedError
|
322865
|
+
Completed 401 Unauthorized in 77ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
322866
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
322867
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
322868
|
+
------------------------------------------------------------------------------------------------------
|
322869
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_with_invalid_username
|
322870
|
+
------------------------------------------------------------------------------------------------------
|
322871
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322872
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
322873
|
+
Parameters: {"issue_reset_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
|
322874
|
+
Accepts a token
|
322875
|
+
Token decode error: Nil JSON web token
|
322876
|
+
Suppressing error: Invalid token:
|
322877
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1[0m [["username", "doesnotexist@example.com"]]
|
322878
|
+
RailsIdentity::Errors::ObjectNotFoundError
|
322879
|
+
Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
322880
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
322881
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
322882
|
+
---------------------------------------------------------------------------
|
322883
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_using_no_token_payload
|
322884
|
+
---------------------------------------------------------------------------
|
322885
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322886
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
322887
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.f-TiKtiwMqWfvQDAaHR75Six53x2pK07rzxlDePfrLM", "id"=>"1"}
|
322888
|
+
Requires a token
|
322889
|
+
User UUID or session UUID is nil
|
322890
|
+
Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.f-TiKtiwMqWfvQDAaHR75Six53x2pK07rzxlDePfrLM
|
322891
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
322892
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
322893
|
+
[1m[35m (0.0ms)[0m begin transaction
|
322894
|
+
------------------------------------------------------------------------------
|
322895
|
+
RailsIdentity::UsersControllerTest: test_update_(reissue)_a_verification_token
|
322896
|
+
------------------------------------------------------------------------------
|
322897
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322898
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322899
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = '1' LIMIT 1[0m
|
322900
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322901
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
322902
|
+
Parameters: {"issue_verification_token"=>true, "username"=>"one@example.com", "id"=>"current"}
|
322903
|
+
Accepts a token
|
322904
|
+
Token decode error: Nil JSON web token
|
322905
|
+
Suppressing error: Invalid token:
|
322906
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" = ? LIMIT 1[0m [["username", "one@example.com"]]
|
322907
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
322908
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["user_uuid", "1"], ["uuid", "22da4812-038b-11e6-885f-6c4008a6fa2a"], ["secret", "16602ab6-4fdd-44be-a684-89311116a247"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjJkYTQ4MTItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.0_Mu62lNv1t4wssS7V-fn2tIghzcXlKyd0Q-CQOX4zc"], ["created_at", "2016-04-16 04:24:40.145420"], ["updated_at", "2016-04-16 04:24:40.145420"]]
|
322909
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
322910
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
322911
|
+
[1m[35mRailsIdentity::User Exists (0.1ms)[0m 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
|
322912
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjJkYTQ4MTItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.0_Mu62lNv1t4wssS7V-fn2tIghzcXlKyd0Q-CQOX4zc"], ["updated_at", "2016-04-16 04:24:40.147390"], ["uuid", "1"]]
|
322913
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
322914
|
+
[ActiveJob] [1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322915
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [2ca6a00c-ef08-4522-9ec9-ef841c1b1201] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
|
322916
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [2ca6a00c-ef08-4522-9ec9-ef841c1b1201] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.4ms)
|
322917
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [2ca6a00c-ef08-4522-9ec9-ef841c1b1201] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.3ms)
|
322918
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [2ca6a00c-ef08-4522-9ec9-ef841c1b1201]
|
322919
|
+
RailsIdentity::UserMailer#email_verification: processed outbound mail in 6.5ms
|
322920
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [2ca6a00c-ef08-4522-9ec9-ef841c1b1201]
|
322921
|
+
Sent mail to one@example.com (3.6ms)
|
322922
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [2ca6a00c-ef08-4522-9ec9-ef841c1b1201] Date: Fri, 15 Apr 2016 23:24:40 -0500
|
322923
|
+
From: no-reply@rails-identity.com
|
322924
|
+
To: one@example.com
|
322925
|
+
Message-ID: <5711be8826a8d_1364d3fd924c52460743fd@galt.local.mail>
|
322926
|
+
Subject: [rails-identity] Email Confirmation
|
322927
|
+
Mime-Version: 1.0
|
322928
|
+
Content-Type: multipart/alternative;
|
322929
|
+
boundary="--==_mimepart_5711be8826134_1364d3fd924c5246074212";
|
322930
|
+
charset=UTF-8
|
322931
|
+
Content-Transfer-Encoding: 7bit
|
322932
|
+
|
322933
|
+
|
322934
|
+
----==_mimepart_5711be8826134_1364d3fd924c5246074212
|
322935
|
+
Content-Type: text/plain;
|
322936
|
+
charset=UTF-8
|
322937
|
+
Content-Transfer-Encoding: 7bit
|
322938
|
+
|
322939
|
+
Dear one@example.com,
|
322940
|
+
|
322941
|
+
Please confirm your account with rails-identity by making a PATCH request
|
322942
|
+
on the current user with a provided verification token. For example,
|
322943
|
+
|
322944
|
+
http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjJkYTQ4MTItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.0_Mu62lNv1t4wssS7V-fn2tIghzcXlKyd0Q-CQOX4zc verified=true
|
322945
|
+
|
322946
|
+
will confirm the account. Here is the verification token:
|
322947
|
+
|
322948
|
+
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjJkYTQ4MTItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.0_Mu62lNv1t4wssS7V-fn2tIghzcXlKyd0Q-CQOX4zc
|
322949
|
+
|
322950
|
+
Thank you for using rails-identity,
|
322951
|
+
rails-identity
|
322952
|
+
|
322953
|
+
|
322954
|
+
----==_mimepart_5711be8826134_1364d3fd924c5246074212
|
322955
|
+
Content-Type: text/html;
|
322956
|
+
charset=UTF-8
|
322957
|
+
Content-Transfer-Encoding: 7bit
|
322958
|
+
|
322959
|
+
<html>
|
322960
|
+
<body>
|
322961
|
+
<p>Dear one@example.com,</p>
|
322962
|
+
|
322963
|
+
<p>Please confirm your account with rails-identity by making a PATCH request
|
322964
|
+
on the current user with a provided verification token. For example,
|
322965
|
+
<pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjJkYTQ4MTItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.0_Mu62lNv1t4wssS7V-fn2tIghzcXlKyd0Q-CQOX4zc
|
322966
|
+
verified=true</pre> will confirm the account. Here is the verification
|
322967
|
+
token:</p>
|
322968
|
+
|
322969
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjJkYTQ4MTItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.0_Mu62lNv1t4wssS7V-fn2tIghzcXlKyd0Q-CQOX4zc</pre>
|
322970
|
+
|
322971
|
+
<p>Thank you for using rails-identity</p>
|
322972
|
+
<p><b>rails-identity</b></p>
|
322973
|
+
|
322974
|
+
</body>
|
322975
|
+
</html>
|
322976
|
+
|
322977
|
+
----==_mimepart_5711be8826134_1364d3fd924c5246074212--
|
322978
|
+
|
322979
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [2ca6a00c-ef08-4522-9ec9-ef841c1b1201] Performed ActionMailer::DeliveryJob from Inline(mailers) in 10.54ms
|
322980
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 2ca6a00c-ef08-4522-9ec9-ef841c1b1201) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
|
322981
|
+
Rendered text template (0.0ms)
|
322982
|
+
Completed 204 No Content in 18ms (Views: 0.3ms | ActiveRecord: 0.6ms)
|
322983
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = '1' LIMIT 1
|
322984
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
322985
|
+
Parameters: {"verified"=>true, "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjJkYTQ4MTItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.0_Mu62lNv1t4wssS7V-fn2tIghzcXlKyd0Q-CQOX4zc", "id"=>"current"}
|
322986
|
+
Accepts a token
|
322987
|
+
Token well formatted for user 1,
|
322988
|
+
session 22da4812-038b-11e6-885f-6c4008a6fa2a
|
322989
|
+
Cache miss. Try database.
|
322990
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322991
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "22da4812-038b-11e6-885f-6c4008a6fa2a"]]
|
322992
|
+
Token well formatted and verified. Set cache.
|
322993
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
322994
|
+
Attempting to get RailsIdentity::User 1
|
322995
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
322996
|
+
Checking to see if authorized to access object
|
322997
|
+
Unpermitted parameters: token, id
|
322998
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
322999
|
+
[1m[35mRailsIdentity::User Exists (0.1ms)[0m 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
|
323000
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
323001
|
+
Completed 200 OK in 44ms (Views: 0.4ms | ActiveRecord: 1.0ms)
|
323002
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
323003
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
323004
|
+
---------------------------------------------------------------
|
323005
|
+
RailsIdentity::UsersControllerTest: test_public_can_see_options
|
323006
|
+
---------------------------------------------------------------
|
323007
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323008
|
+
Processing by RailsIdentity::UsersController#options as HTML
|
323009
|
+
Rendered text template (0.0ms)
|
323010
|
+
Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
|
323011
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
323012
|
+
[1m[35m (0.0ms)[0m begin transaction
|
323013
|
+
--------------------------------------------------------------------
|
323014
|
+
RailsIdentity::UsersControllerTest: test_non-admin_cannot_list_users
|
323015
|
+
--------------------------------------------------------------------
|
323016
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323017
|
+
Processing by RailsIdentity::UsersController#index as HTML
|
323018
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA"}
|
323019
|
+
Requires an admin token
|
323020
|
+
Token well formatted for user 1,
|
323021
|
+
session 1
|
323022
|
+
Cache miss. Try database.
|
323023
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323024
|
+
Well-formed but invalid user token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA
|
323025
|
+
Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
323026
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
323027
|
+
[1m[35m (0.0ms)[0m begin transaction
|
323028
|
+
------------------------------------------------------
|
323029
|
+
RailsIdentity::UsersControllerTest: test_update_a_user
|
323030
|
+
------------------------------------------------------
|
323031
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323032
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323033
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
323034
|
+
Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
|
323035
|
+
Accepts a token
|
323036
|
+
Token well formatted for user 1,
|
323037
|
+
session 1
|
323038
|
+
Cache miss. Try database.
|
323039
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323040
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323041
|
+
Token well formatted and verified. Set cache.
|
323042
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323043
|
+
Attempting to get RailsIdentity::User 1
|
323044
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323045
|
+
Checking to see if authorized to access object
|
323046
|
+
Unpermitted parameters: token, id
|
323047
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
323048
|
+
[1m[35mRailsIdentity::User Exists (0.1ms)[0m 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
|
323049
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["username", "foo@example.com"], ["updated_at", "2016-04-16 04:24:40.230105"], ["uuid", "1"]]
|
323050
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
323051
|
+
Completed 200 OK in 8ms (Views: 0.6ms | ActiveRecord: 0.5ms)
|
323052
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
323053
|
+
[1m[35m (0.0ms)[0m begin transaction
|
323054
|
+
---------------------------------------------------------------------------------------------
|
323055
|
+
RailsIdentity::UsersControllerTest: test_update_a_user_with_a_new_password_using_old_password
|
323056
|
+
---------------------------------------------------------------------------------------------
|
323057
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323058
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323059
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
323060
|
+
Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
|
323061
|
+
Accepts a token
|
323062
|
+
Token well formatted for user 1,
|
323063
|
+
session 1
|
323064
|
+
Cache miss. Try database.
|
323065
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323066
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323067
|
+
Token well formatted and verified. Set cache.
|
323068
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323069
|
+
Attempting to get RailsIdentity::User 1
|
323070
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323071
|
+
Checking to see if authorized to access object
|
323072
|
+
Unpermitted parameters: old_password, token, id
|
323073
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
323074
|
+
[1m[35mRailsIdentity::User Exists (0.1ms)[0m 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
|
323075
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["password_digest", "$2a$04$3XEnAz4xDVJFm3Nv3v7vNeUD5lLpmvBkt.eflVwbl/BvSxAPn6mMW"], ["updated_at", "2016-04-16 04:24:40.310192"], ["uuid", "1"]]
|
323076
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
323077
|
+
Completed 200 OK in 74ms (Views: 0.4ms | ActiveRecord: 0.6ms)
|
323078
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323079
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
323080
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
323081
|
+
-----------------------------------------------------------------------
|
323082
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_a_nonexisting_user
|
323083
|
+
-----------------------------------------------------------------------
|
323084
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323085
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
323086
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"999"}
|
323087
|
+
Requires a token
|
323088
|
+
Token well formatted for user 1,
|
323089
|
+
session 1
|
323090
|
+
Cache miss. Try database.
|
323091
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323092
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323093
|
+
Token well formatted and verified. Set cache.
|
323094
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323095
|
+
Attempting to get RailsIdentity::User 999
|
323096
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m 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"]]
|
323097
|
+
RailsIdentity::User 999 cannot be found
|
323098
|
+
Completed 404 Not Found in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
323099
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
323100
|
+
[1m[35m (0.0ms)[0m begin transaction
|
323101
|
+
---------------------------------------------------------------------
|
323102
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_using_ill-formed
|
323103
|
+
---------------------------------------------------------------------
|
323104
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323105
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323106
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
323107
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzgwNzQwfQ.9IKk6s1MipkssieOmDI9sSOuu0xeolByoWjTmp3isjQ", "id"=>"1"}
|
323108
|
+
Requires a token
|
323109
|
+
User UUID or session UUID is nil
|
323110
|
+
Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzgwNzQwfQ.9IKk6s1MipkssieOmDI9sSOuu0xeolByoWjTmp3isjQ
|
323111
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
323112
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
323113
|
+
[1m[35m (0.0ms)[0m begin transaction
|
323114
|
+
------------------------------------------------------------------------------
|
323115
|
+
RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_username
|
323116
|
+
------------------------------------------------------------------------------
|
323117
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323118
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
323119
|
+
Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
|
323120
|
+
Accepts a token
|
323121
|
+
Token decode error: Nil JSON web token
|
323122
|
+
Suppressing error: Invalid token:
|
323123
|
+
Create new user
|
323124
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
323125
|
+
[1m[36mRailsIdentity::User Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" IS NULL AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1[0m
|
323126
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
323127
|
+
Completed 400 Bad Request in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
323128
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
323129
|
+
[1m[35m (0.0ms)[0m begin transaction
|
323130
|
+
---------------------------------------------------------------------------------------------
|
323131
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_non-existing_token
|
323132
|
+
---------------------------------------------------------------------------------------------
|
323133
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323134
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323135
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
323136
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjA3ODA2ODAsImV4cCI6MTQ2MDc4MDc0MH0.qMEzChqewjLJOnAyir010GUvdMMeDS3C4PuOS9e22x0", "id"=>"1"}
|
323137
|
+
Requires a token
|
323138
|
+
Token well formatted for user 1,
|
323139
|
+
session 1
|
323140
|
+
Cache miss. Try database.
|
323141
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323142
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323143
|
+
Signature verification raised
|
323144
|
+
Cannot verify token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjA3ODA2ODAsImV4cCI6MTQ2MDc4MDc0MH0.qMEzChqewjLJOnAyir010GUvdMMeDS3C4PuOS9e22x0
|
323145
|
+
Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
323146
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
323147
|
+
[1m[35m (0.0ms)[0m begin transaction
|
323148
|
+
-----------------------------------------------------------------
|
323149
|
+
RailsIdentity::UsersControllerTest: test_admin_can_list_all_users
|
323150
|
+
-----------------------------------------------------------------
|
323151
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323152
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
|
323153
|
+
Processing by RailsIdentity::UsersController#index as HTML
|
323154
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYwODMxMDc4fQ.CSDumaIQ9SroeW6Gs3tjyvRV5BkKB5uQMiGq7ObGRSk"}
|
323155
|
+
Requires an admin token
|
323156
|
+
Token well formatted for user admin_one,
|
323157
|
+
session session_admin_one
|
323158
|
+
Cache miss. Try database.
|
323159
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "admin_one"]]
|
323160
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
|
323161
|
+
Token well formatted and verified. Set cache.
|
323162
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "admin_one"]]
|
323163
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL
|
323164
|
+
Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 0.3ms)
|
323165
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "rails_identity_sessions"[0m
|
323166
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
323167
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
323168
|
+
--------------------------------------------------------------------------------
|
323169
|
+
RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_a_password
|
323170
|
+
--------------------------------------------------------------------------------
|
323171
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323172
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
323173
|
+
Parameters: {"username"=>"foo@example.com"}
|
323174
|
+
Accepts a token
|
323175
|
+
Token decode error: Nil JSON web token
|
323176
|
+
Suppressing error: Invalid token:
|
323177
|
+
Create new user
|
323178
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
323179
|
+
[1m[35mRailsIdentity::User Exists (0.1ms)[0m 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
|
323180
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
323181
|
+
Completed 400 Bad Request in 3ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
323182
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
323183
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
323184
|
+
----------------------------------------------------------------------------------------
|
323185
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_bogus_payload
|
323186
|
+
----------------------------------------------------------------------------------------
|
323187
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323188
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323189
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
323190
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzgwNzQwfQ.6MuWIFw9QnjdwWtjIVXJ3NqaeV_0BHtejRe2HXNR8NA", "id"=>"1"}
|
323191
|
+
Requires a token
|
323192
|
+
Token well formatted for user 1,
|
323193
|
+
session doesnotexist
|
323194
|
+
Cache miss. Try database.
|
323195
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323196
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "doesnotexist"]]
|
323197
|
+
Well-formed but invalid session token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzgwNzQwfQ.6MuWIFw9QnjdwWtjIVXJ3NqaeV_0BHtejRe2HXNR8NA
|
323198
|
+
Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
323199
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
323200
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
323201
|
+
-------------------------------------------------------------------------
|
323202
|
+
RailsIdentity::UsersControllerTest: test_user_cannot_create_an_admin_user
|
323203
|
+
-------------------------------------------------------------------------
|
323204
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323205
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
323206
|
+
Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100"}
|
323207
|
+
Accepts a token
|
323208
|
+
Token decode error: Nil JSON web token
|
323209
|
+
Suppressing error: Invalid token:
|
323210
|
+
Create new user
|
323211
|
+
Unpermitted parameter: role
|
323212
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
323213
|
+
[1m[35mRailsIdentity::User Exists (0.1ms)[0m 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
|
323214
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?)[0m [["username", "foo@example.com"], ["password_digest", "$2a$04$izvABSMysLN.fWLVvLhonuIApPBhXcBO4cqCT9vgPU1eO2kUSruYC"], ["role", 10], ["created_at", "2016-04-16 04:24:40.374315"], ["updated_at", "2016-04-16 04:24:40.374315"], ["uuid", "22fd57c6-038b-11e6-885f-6c4008a6fa2a"]]
|
323215
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
323216
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
323217
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "22fd57c6-038b-11e6-885f-6c4008a6fa2a"], ["uuid", "22fd9696-038b-11e6-885f-6c4008a6fa2a"], ["secret", "6bc089e1-c405-49ab-b1ae-6645a4e1c564"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMmZkNTdjNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMmZkOTY5Ni0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.alJh9gdFI_ZVBjLbyzxqxcLeRMBsYr3cPQHwOLwl8Xs"], ["created_at", "2016-04-16 04:24:40.376768"], ["updated_at", "2016-04-16 04:24:40.376768"]]
|
323218
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
323219
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
323220
|
+
[1m[36mRailsIdentity::User Exists (0.1ms)[0m [1mSELECT 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" != '22fd57c6-038b-11e6-885f-6c4008a6fa2a') LIMIT 1[0m
|
323221
|
+
[1m[35mSQL (0.0ms)[0m UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMmZkNTdjNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMmZkOTY5Ni0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.alJh9gdFI_ZVBjLbyzxqxcLeRMBsYr3cPQHwOLwl8Xs"], ["updated_at", "2016-04-16 04:24:40.378471"], ["uuid", "22fd57c6-038b-11e6-885f-6c4008a6fa2a"]]
|
323222
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
323223
|
+
[ActiveJob] [1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "22fd57c6-038b-11e6-885f-6c4008a6fa2a"]]
|
323224
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [054d5900-4b5f-4f35-87a1-312e73c9655d] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/22fd57c6-038b-11e6-885f-6c4008a6fa2a
|
323225
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [054d5900-4b5f-4f35-87a1-312e73c9655d] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
|
323226
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [054d5900-4b5f-4f35-87a1-312e73c9655d] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
|
323227
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [054d5900-4b5f-4f35-87a1-312e73c9655d]
|
323228
|
+
RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.4ms
|
323229
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [054d5900-4b5f-4f35-87a1-312e73c9655d]
|
323230
|
+
Sent mail to foo@example.com (3.9ms)
|
323231
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [054d5900-4b5f-4f35-87a1-312e73c9655d] Date: Fri, 15 Apr 2016 23:24:40 -0500
|
323232
|
+
From: no-reply@rails-identity.com
|
323233
|
+
To: foo@example.com
|
323234
|
+
Message-ID: <5711be885e15f_1364d3fd924c52460745d8@galt.local.mail>
|
323235
|
+
Subject: [rails-identity] Email Confirmation
|
323236
|
+
Mime-Version: 1.0
|
323237
|
+
Content-Type: multipart/alternative;
|
323238
|
+
boundary="--==_mimepart_5711be885d772_1364d3fd924c524607449e";
|
323239
|
+
charset=UTF-8
|
323240
|
+
Content-Transfer-Encoding: 7bit
|
323241
|
+
|
323242
|
+
|
323243
|
+
----==_mimepart_5711be885d772_1364d3fd924c524607449e
|
323244
|
+
Content-Type: text/plain;
|
323245
|
+
charset=UTF-8
|
323246
|
+
Content-Transfer-Encoding: 7bit
|
323247
|
+
|
323248
|
+
Dear foo@example.com,
|
323249
|
+
|
323250
|
+
Please confirm your account with rails-identity by making a PATCH request
|
323251
|
+
on the current user with a provided verification token. For example,
|
323252
|
+
|
323253
|
+
http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMmZkNTdjNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMmZkOTY5Ni0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.alJh9gdFI_ZVBjLbyzxqxcLeRMBsYr3cPQHwOLwl8Xs verified=true
|
323254
|
+
|
323255
|
+
will confirm the account. Here is the verification token:
|
323256
|
+
|
323257
|
+
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMmZkNTdjNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMmZkOTY5Ni0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.alJh9gdFI_ZVBjLbyzxqxcLeRMBsYr3cPQHwOLwl8Xs
|
323258
|
+
|
323259
|
+
Thank you for using rails-identity,
|
323260
|
+
rails-identity
|
323261
|
+
|
323262
|
+
|
323263
|
+
----==_mimepart_5711be885d772_1364d3fd924c524607449e
|
323264
|
+
Content-Type: text/html;
|
323265
|
+
charset=UTF-8
|
323266
|
+
Content-Transfer-Encoding: 7bit
|
323267
|
+
|
323268
|
+
<html>
|
323269
|
+
<body>
|
323270
|
+
<p>Dear foo@example.com,</p>
|
323271
|
+
|
323272
|
+
<p>Please confirm your account with rails-identity by making a PATCH request
|
323273
|
+
on the current user with a provided verification token. For example,
|
323274
|
+
<pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMmZkNTdjNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMmZkOTY5Ni0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.alJh9gdFI_ZVBjLbyzxqxcLeRMBsYr3cPQHwOLwl8Xs
|
323275
|
+
verified=true</pre> will confirm the account. Here is the verification
|
323276
|
+
token:</p>
|
323277
|
+
|
323278
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMmZkNTdjNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMmZkOTY5Ni0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.alJh9gdFI_ZVBjLbyzxqxcLeRMBsYr3cPQHwOLwl8Xs</pre>
|
323279
|
+
|
323280
|
+
<p>Thank you for using rails-identity</p>
|
323281
|
+
<p><b>rails-identity</b></p>
|
323282
|
+
|
323283
|
+
</body>
|
323284
|
+
</html>
|
323285
|
+
|
323286
|
+
----==_mimepart_5711be885d772_1364d3fd924c524607449e--
|
323287
|
+
|
323288
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [054d5900-4b5f-4f35-87a1-312e73c9655d] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.8ms
|
323289
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 054d5900-4b5f-4f35-87a1-312e73c9655d) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/22fd57c6-038b-11e6-885f-6c4008a6fa2a
|
323290
|
+
Completed 201 Created in 17ms (Views: 0.3ms | ActiveRecord: 0.8ms)
|
323291
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
323292
|
+
[1m[35m (0.1ms)[0m begin transaction
|
323293
|
+
------------------------------------------------------------------------------------
|
323294
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_password_with_non-reset_token
|
323295
|
+
------------------------------------------------------------------------------------
|
323296
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323297
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
323298
|
+
Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
|
323299
|
+
Accepts a token
|
323300
|
+
Token well formatted for user 1,
|
323301
|
+
session 1
|
323302
|
+
Cache miss. Try database.
|
323303
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323304
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323305
|
+
Token well formatted and verified. Set cache.
|
323306
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323307
|
+
Attempting to get RailsIdentity::User 1
|
323308
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323309
|
+
Checking to see if authorized to access object
|
323310
|
+
RailsIdentity::Errors::UnauthorizedError
|
323311
|
+
Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
323312
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
323313
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
323314
|
+
--------------------------------------------------------------------
|
323315
|
+
RailsIdentity::UsersControllerTest: test_admin_can_delete_other_user
|
323316
|
+
--------------------------------------------------------------------
|
323317
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323318
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "session_admin_one"]]
|
323319
|
+
Processing by RailsIdentity::UsersController#destroy as HTML
|
323320
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYwODMxMDc4fQ.CSDumaIQ9SroeW6Gs3tjyvRV5BkKB5uQMiGq7ObGRSk", "id"=>"1"}
|
323321
|
+
Requires a token
|
323322
|
+
Token well formatted for user admin_one,
|
323323
|
+
session session_admin_one
|
323324
|
+
Cache miss. Try database.
|
323325
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m 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"]]
|
323326
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "session_admin_one"]]
|
323327
|
+
Token well formatted and verified. Set cache.
|
323328
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m 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"]]
|
323329
|
+
Attempting to get RailsIdentity::User 1
|
323330
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323331
|
+
Checking to see if authorized to access object
|
323332
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
323333
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rails_identity_users" SET "deleted_at" = '2016-04-16 04:24:40.408586' WHERE "rails_identity_users"."uuid" = ?[0m [["uuid", "1"]]
|
323334
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
323335
|
+
Rendered text template (0.0ms)
|
323336
|
+
Completed 204 No Content in 6ms (Views: 0.4ms | ActiveRecord: 0.5ms)
|
323337
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
323338
|
+
[1m[35m (0.1ms)[0m begin transaction
|
323339
|
+
---------------------------------------------------------------
|
323340
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_other_user
|
323341
|
+
---------------------------------------------------------------
|
323342
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323343
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
323344
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"2"}
|
323345
|
+
Requires a token
|
323346
|
+
Token well formatted for user 1,
|
323347
|
+
session 1
|
323348
|
+
Cache miss. Try database.
|
323349
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323350
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323351
|
+
Token well formatted and verified. Set cache.
|
323352
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323353
|
+
Attempting to get RailsIdentity::User 2
|
323354
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "2"]]
|
323355
|
+
Checking to see if authorized to access object
|
323356
|
+
RailsIdentity::Errors::UnauthorizedError
|
323357
|
+
Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
323358
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
323359
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
323360
|
+
-------------------------------------------------------------------
|
323361
|
+
RailsIdentity::UsersControllerTest: test_cannot_delete_another_user
|
323362
|
+
-------------------------------------------------------------------
|
323363
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323364
|
+
Processing by RailsIdentity::UsersController#destroy as HTML
|
323365
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"2"}
|
323366
|
+
Requires a token
|
323367
|
+
Token well formatted for user 1,
|
323368
|
+
session 1
|
323369
|
+
Cache miss. Try database.
|
323370
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323371
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323372
|
+
Token well formatted and verified. Set cache.
|
323373
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323374
|
+
Attempting to get RailsIdentity::User 2
|
323375
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m 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"]]
|
323376
|
+
Checking to see if authorized to access object
|
323377
|
+
RailsIdentity::Errors::UnauthorizedError
|
323378
|
+
Completed 401 Unauthorized in 7ms (Views: 0.3ms | ActiveRecord: 0.3ms)
|
323379
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
323380
|
+
[1m[35m (0.0ms)[0m begin transaction
|
323381
|
+
--------------------------------------------------------------------------
|
323382
|
+
RailsIdentity::UsersControllerTest: test_update_password_using_reset_token
|
323383
|
+
--------------------------------------------------------------------------
|
323384
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323385
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323386
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323387
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
323388
|
+
Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
|
323389
|
+
Accepts a token
|
323390
|
+
Token decode error: Nil JSON web token
|
323391
|
+
Suppressing error: Invalid token:
|
323392
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m 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"]]
|
323393
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
323394
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "230748c6-038b-11e6-885f-6c4008a6fa2a"], ["secret", "f47636e0-4251-4e72-b34b-5c3d248389e7"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjMwNzQ4YzYtMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.PoB-xp586ySejISisvL7k6BoGO3lo8KDI2e2t_ZB9_o"], ["created_at", "2016-04-16 04:24:40.440349"], ["updated_at", "2016-04-16 04:24:40.440349"]]
|
323395
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
323396
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
323397
|
+
[1m[36mRailsIdentity::User Exists (0.1ms)[0m [1mSELECT 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[0m
|
323398
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjMwNzQ4YzYtMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.PoB-xp586ySejISisvL7k6BoGO3lo8KDI2e2t_ZB9_o"], ["updated_at", "2016-04-16 04:24:40.442384"], ["uuid", "1"]]
|
323399
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
323400
|
+
[ActiveJob] [1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323401
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [c00e879c-a466-4bd0-a897-0ff94aebf2b3] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
|
323402
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [c00e879c-a466-4bd0-a897-0ff94aebf2b3] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (0.2ms)
|
323403
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [c00e879c-a466-4bd0-a897-0ff94aebf2b3] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (0.1ms)
|
323404
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [c00e879c-a466-4bd0-a897-0ff94aebf2b3]
|
323405
|
+
RailsIdentity::UserMailer#password_reset: processed outbound mail in 4.3ms
|
323406
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [c00e879c-a466-4bd0-a897-0ff94aebf2b3]
|
323407
|
+
Sent mail to one@example.com (4.9ms)
|
323408
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [c00e879c-a466-4bd0-a897-0ff94aebf2b3] Date: Fri, 15 Apr 2016 23:24:40 -0500
|
323409
|
+
From: no-reply@rails-identity.com
|
323410
|
+
To: one@example.com
|
323411
|
+
Message-ID: <5711be886e584_1364d3fd924c5246074716@galt.local.mail>
|
323412
|
+
Subject: [rails-identity] Password Reset
|
323413
|
+
Mime-Version: 1.0
|
323414
|
+
Content-Type: multipart/alternative;
|
323415
|
+
boundary="--==_mimepart_5711be886d736_1364d3fd924c52460746de";
|
323416
|
+
charset=UTF-8
|
323417
|
+
Content-Transfer-Encoding: 7bit
|
323418
|
+
|
323419
|
+
|
323420
|
+
----==_mimepart_5711be886d736_1364d3fd924c52460746de
|
323421
|
+
Content-Type: text/plain;
|
323422
|
+
charset=UTF-8
|
323423
|
+
Content-Transfer-Encoding: 7bit
|
323424
|
+
|
323425
|
+
Dear one@example.com,
|
323426
|
+
|
323427
|
+
You have requested to reset your password. Here are the user UUID and reset
|
323428
|
+
token. Make a PATCH request on the UUID with the reset token to set a new
|
323429
|
+
password. For instance,
|
323430
|
+
|
323431
|
+
http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
|
323432
|
+
|
323433
|
+
will set the password to "reallysecret" (without quotes) for the user to
|
323434
|
+
whom the reset token was issued.
|
323435
|
+
|
323436
|
+
Here is the reset token: @user.reset_token
|
323437
|
+
|
323438
|
+
Good luck! :)
|
323439
|
+
rails-identity
|
323440
|
+
|
323441
|
+
|
323442
|
+
----==_mimepart_5711be886d736_1364d3fd924c52460746de
|
323443
|
+
Content-Type: text/html;
|
323444
|
+
charset=UTF-8
|
323445
|
+
Content-Transfer-Encoding: 7bit
|
323446
|
+
|
323447
|
+
<html>
|
323448
|
+
<body>
|
323449
|
+
<p>Dear one@example.com,</p>
|
323450
|
+
|
323451
|
+
<p>You have requested to reset your password. Here are the user UUID and
|
323452
|
+
reset token. Make a PATCH request on the UUID with the reset token to set a
|
323453
|
+
new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjMwNzQ4YzYtMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.PoB-xp586ySejISisvL7k6BoGO3lo8KDI2e2t_ZB9_o password=reallysecret
|
323454
|
+
password_confirmation=reallysecret</pre> will set the password to
|
323455
|
+
<pre>reallysecret</pre> for the user to whom the reset token was issued.
|
323456
|
+
Here is the reset token:</p>
|
323457
|
+
|
323458
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjMwNzQ4YzYtMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.PoB-xp586ySejISisvL7k6BoGO3lo8KDI2e2t_ZB9_o</pre>
|
323459
|
+
|
323460
|
+
<p>Good luck! :)</p>
|
323461
|
+
<p><b>rails-identity</b></p>
|
323462
|
+
|
323463
|
+
</body>
|
323464
|
+
</html>
|
323465
|
+
|
323466
|
+
----==_mimepart_5711be886d736_1364d3fd924c52460746de--
|
323467
|
+
|
323468
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [c00e879c-a466-4bd0-a897-0ff94aebf2b3] Performed ActionMailer::DeliveryJob from Inline(mailers) in 9.94ms
|
323469
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: c00e879c-a466-4bd0-a897-0ff94aebf2b3) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
|
323470
|
+
Rendered text template (0.0ms)
|
323471
|
+
Completed 204 No Content in 17ms (Views: 0.4ms | ActiveRecord: 0.5ms)
|
323472
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323473
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
323474
|
+
Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjMwNzQ4YzYtMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.PoB-xp586ySejISisvL7k6BoGO3lo8KDI2e2t_ZB9_o", "id"=>"1"}
|
323475
|
+
Accepts a token
|
323476
|
+
Token well formatted for user 1,
|
323477
|
+
session 230748c6-038b-11e6-885f-6c4008a6fa2a
|
323478
|
+
Cache miss. Try database.
|
323479
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323480
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "230748c6-038b-11e6-885f-6c4008a6fa2a"]]
|
323481
|
+
Token well formatted and verified. Set cache.
|
323482
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323483
|
+
Attempting to get RailsIdentity::User 1
|
323484
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323485
|
+
Checking to see if authorized to access object
|
323486
|
+
Unpermitted parameters: token, id
|
323487
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
323488
|
+
[1m[36mRailsIdentity::User Exists (0.1ms)[0m [1mSELECT 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[0m
|
323489
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["password_digest", "$2a$04$XRsnTur4cOE0dEeesv66KeOR91rquoAwCUZ04YdTpxsUrtHwVj9X2"], ["updated_at", "2016-04-16 04:24:40.463655"], ["uuid", "1"]]
|
323490
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
323491
|
+
Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 1.0ms)
|
323492
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323493
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
323494
|
+
[1m[35m (0.0ms)[0m begin transaction
|
323495
|
+
------------------------------------------------------------
|
323496
|
+
RailsIdentity::UsersControllerTest: test_update_current_user
|
323497
|
+
------------------------------------------------------------
|
323498
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323499
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
323500
|
+
Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"current"}
|
323501
|
+
Accepts a token
|
323502
|
+
Token well formatted for user 1,
|
323503
|
+
session 1
|
323504
|
+
Cache miss. Try database.
|
323505
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323506
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323507
|
+
Token well formatted and verified. Set cache.
|
323508
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323509
|
+
Attempting to get RailsIdentity::User 1
|
323510
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323511
|
+
Checking to see if authorized to access object
|
323512
|
+
Unpermitted parameters: token, id
|
323513
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
323514
|
+
[1m[36mRailsIdentity::User Exists (0.1ms)[0m [1mSELECT 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[0m
|
323515
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-16 04:24:40.477913"], ["uuid", "1"]]
|
323516
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
323517
|
+
Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 0.5ms)
|
323518
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
323519
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
323520
|
+
-----------------------------------------------------------------------
|
323521
|
+
RailsIdentity::UsersControllerTest: test_admin_can_create_an_admin_user
|
323522
|
+
-----------------------------------------------------------------------
|
323523
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323524
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "session_admin_one"]]
|
323525
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
323526
|
+
Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYwODMxMDc4fQ.CSDumaIQ9SroeW6Gs3tjyvRV5BkKB5uQMiGq7ObGRSk"}
|
323527
|
+
Accepts a token
|
323528
|
+
Token well formatted for user admin_one,
|
323529
|
+
session session_admin_one
|
323530
|
+
Cache miss. Try database.
|
323531
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m 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"]]
|
323532
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "session_admin_one"]]
|
323533
|
+
Token well formatted and verified. Set cache.
|
323534
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m 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"]]
|
323535
|
+
Create new user
|
323536
|
+
Unpermitted parameter: token
|
323537
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
323538
|
+
[1m[35mRailsIdentity::User Exists (0.1ms)[0m 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
|
323539
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?)[0m [["username", "foo@example.com"], ["password_digest", "$2a$04$yWM.HlfqnooOrrEBpN.C7OBQ12Gz1x96/fQ4Rj88lZ0ORzaU6yK0e"], ["role", 100], ["created_at", "2016-04-16 04:24:40.492358"], ["updated_at", "2016-04-16 04:24:40.492358"], ["uuid", "230f5a70-038b-11e6-885f-6c4008a6fa2a"]]
|
323540
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
323541
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
323542
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "230f5a70-038b-11e6-885f-6c4008a6fa2a"], ["uuid", "230f9436-038b-11e6-885f-6c4008a6fa2a"], ["secret", "8b1f8498-5b48-4aa6-a8e5-034eba7e41e2"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzBmNWE3MC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzBmOTQzNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.bsNjvjNmLljU_uckRuoi1fFDcJaO-2r1RgaKpMNDmgg"], ["created_at", "2016-04-16 04:24:40.494617"], ["updated_at", "2016-04-16 04:24:40.494617"]]
|
323543
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
323544
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
323545
|
+
[1m[36mRailsIdentity::User Exists (0.1ms)[0m [1mSELECT 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" != '230f5a70-038b-11e6-885f-6c4008a6fa2a') LIMIT 1[0m
|
323546
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzBmNWE3MC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzBmOTQzNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.bsNjvjNmLljU_uckRuoi1fFDcJaO-2r1RgaKpMNDmgg"], ["updated_at", "2016-04-16 04:24:40.496281"], ["uuid", "230f5a70-038b-11e6-885f-6c4008a6fa2a"]]
|
323547
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
323548
|
+
[ActiveJob] [1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "230f5a70-038b-11e6-885f-6c4008a6fa2a"]]
|
323549
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [728d4c2a-870f-41a5-accc-676cd07822e7] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/230f5a70-038b-11e6-885f-6c4008a6fa2a
|
323550
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [728d4c2a-870f-41a5-accc-676cd07822e7] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
|
323551
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [728d4c2a-870f-41a5-accc-676cd07822e7] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.1ms)
|
323552
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [728d4c2a-870f-41a5-accc-676cd07822e7]
|
323553
|
+
RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.8ms
|
323554
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [728d4c2a-870f-41a5-accc-676cd07822e7]
|
323555
|
+
Sent mail to foo@example.com (3.6ms)
|
323556
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [728d4c2a-870f-41a5-accc-676cd07822e7] Date: Fri, 15 Apr 2016 23:24:40 -0500
|
323557
|
+
From: no-reply@rails-identity.com
|
323558
|
+
To: foo@example.com
|
323559
|
+
Message-ID: <5711be887af66_1364d3fd924c52460749ca@galt.local.mail>
|
323560
|
+
Subject: [rails-identity] Email Confirmation
|
323561
|
+
Mime-Version: 1.0
|
323562
|
+
Content-Type: multipart/alternative;
|
323563
|
+
boundary="--==_mimepart_5711be887a601_1364d3fd924c52460748f8";
|
323564
|
+
charset=UTF-8
|
323565
|
+
Content-Transfer-Encoding: 7bit
|
323566
|
+
|
323567
|
+
|
323568
|
+
----==_mimepart_5711be887a601_1364d3fd924c52460748f8
|
323569
|
+
Content-Type: text/plain;
|
323570
|
+
charset=UTF-8
|
323571
|
+
Content-Transfer-Encoding: 7bit
|
323572
|
+
|
323573
|
+
Dear foo@example.com,
|
323574
|
+
|
323575
|
+
Please confirm your account with rails-identity by making a PATCH request
|
323576
|
+
on the current user with a provided verification token. For example,
|
323577
|
+
|
323578
|
+
http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzBmNWE3MC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzBmOTQzNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.bsNjvjNmLljU_uckRuoi1fFDcJaO-2r1RgaKpMNDmgg verified=true
|
323579
|
+
|
323580
|
+
will confirm the account. Here is the verification token:
|
323581
|
+
|
323582
|
+
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzBmNWE3MC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzBmOTQzNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.bsNjvjNmLljU_uckRuoi1fFDcJaO-2r1RgaKpMNDmgg
|
323583
|
+
|
323584
|
+
Thank you for using rails-identity,
|
323585
|
+
rails-identity
|
323586
|
+
|
323587
|
+
|
323588
|
+
----==_mimepart_5711be887a601_1364d3fd924c52460748f8
|
323589
|
+
Content-Type: text/html;
|
323590
|
+
charset=UTF-8
|
323591
|
+
Content-Transfer-Encoding: 7bit
|
323592
|
+
|
323593
|
+
<html>
|
323594
|
+
<body>
|
323595
|
+
<p>Dear foo@example.com,</p>
|
323596
|
+
|
323597
|
+
<p>Please confirm your account with rails-identity by making a PATCH request
|
323598
|
+
on the current user with a provided verification token. For example,
|
323599
|
+
<pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzBmNWE3MC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzBmOTQzNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.bsNjvjNmLljU_uckRuoi1fFDcJaO-2r1RgaKpMNDmgg
|
323600
|
+
verified=true</pre> will confirm the account. Here is the verification
|
323601
|
+
token:</p>
|
323602
|
+
|
323603
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzBmNWE3MC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzBmOTQzNi0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYwNzg0MjgwfQ.bsNjvjNmLljU_uckRuoi1fFDcJaO-2r1RgaKpMNDmgg</pre>
|
323604
|
+
|
323605
|
+
<p>Thank you for using rails-identity</p>
|
323606
|
+
<p><b>rails-identity</b></p>
|
323607
|
+
|
323608
|
+
</body>
|
323609
|
+
</html>
|
323610
|
+
|
323611
|
+
----==_mimepart_5711be887a601_1364d3fd924c52460748f8--
|
323612
|
+
|
323613
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [728d4c2a-870f-41a5-accc-676cd07822e7] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.9ms
|
323614
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 728d4c2a-870f-41a5-accc-676cd07822e7) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/230f5a70-038b-11e6-885f-6c4008a6fa2a
|
323615
|
+
Completed 201 Created in 20ms (Views: 0.3ms | ActiveRecord: 0.9ms)
|
323616
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
323617
|
+
[1m[35m (0.1ms)[0m begin transaction
|
323618
|
+
------------------------------------------------------------------------------------------------------------
|
323619
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_reset_token_without_username
|
323620
|
+
------------------------------------------------------------------------------------------------------------
|
323621
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323622
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
323623
|
+
Parameters: {"issue_verification_token"=>true, "id"=>"current"}
|
323624
|
+
Accepts a token
|
323625
|
+
Token decode error: Nil JSON web token
|
323626
|
+
Suppressing error: Invalid token:
|
323627
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m 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
|
323628
|
+
RailsIdentity::Errors::ObjectNotFoundError
|
323629
|
+
Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
323630
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
323631
|
+
[1m[35m (0.1ms)[0m begin transaction
|
323632
|
+
------------------------------------------------------
|
323633
|
+
RailsIdentity::UsersControllerTest: test_create_a_user
|
323634
|
+
------------------------------------------------------
|
323635
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323636
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
323637
|
+
Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
|
323638
|
+
Accepts a token
|
323639
|
+
Token decode error: Nil JSON web token
|
323640
|
+
Suppressing error: Invalid token:
|
323641
|
+
Create new user
|
323642
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
323643
|
+
[1m[36mRailsIdentity::User Exists (0.1ms)[0m [1mSELECT 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[0m
|
323644
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$uDjSyvMv1Jfs8A0UImwN/OpKxquVBpxjfYne9RdroBm2E2baKIwQO"], ["role", 10], ["created_at", "2016-04-16 04:24:40.520266"], ["updated_at", "2016-04-16 04:24:40.520266"], ["uuid", "23139cde-038b-11e6-885f-6c4008a6fa2a"]]
|
323645
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
323646
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
323647
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["user_uuid", "23139cde-038b-11e6-885f-6c4008a6fa2a"], ["uuid", "2313e414-038b-11e6-885f-6c4008a6fa2a"], ["secret", "928508ba-9a32-455c-88b5-72e81cfd0baf"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzEzOWNkZS0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzEzZTQxNC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.b3_T87EhQkiUqg03bvM2eSzYMMmBPcwocShc1Lbky0o"], ["created_at", "2016-04-16 04:24:40.523023"], ["updated_at", "2016-04-16 04:24:40.523023"]]
|
323648
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
323649
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
323650
|
+
[1m[35mRailsIdentity::User Exists (0.1ms)[0m 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" != '23139cde-038b-11e6-885f-6c4008a6fa2a') LIMIT 1
|
323651
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzEzOWNkZS0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzEzZTQxNC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.b3_T87EhQkiUqg03bvM2eSzYMMmBPcwocShc1Lbky0o"], ["updated_at", "2016-04-16 04:24:40.524829"], ["uuid", "23139cde-038b-11e6-885f-6c4008a6fa2a"]]
|
323652
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
323653
|
+
[ActiveJob] [1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "23139cde-038b-11e6-885f-6c4008a6fa2a"]]
|
323654
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [f2442736-9fff-4271-b5fc-b22e2bbf4c98] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/23139cde-038b-11e6-885f-6c4008a6fa2a
|
323655
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [f2442736-9fff-4271-b5fc-b22e2bbf4c98] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
|
323656
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [f2442736-9fff-4271-b5fc-b22e2bbf4c98] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
|
323657
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [f2442736-9fff-4271-b5fc-b22e2bbf4c98]
|
323658
|
+
RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.5ms
|
323659
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [f2442736-9fff-4271-b5fc-b22e2bbf4c98]
|
323660
|
+
Sent mail to foo@example.com (4.5ms)
|
323661
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [f2442736-9fff-4271-b5fc-b22e2bbf4c98] Date: Fri, 15 Apr 2016 23:24:40 -0500
|
323662
|
+
From: no-reply@rails-identity.com
|
323663
|
+
To: foo@example.com
|
323664
|
+
Message-ID: <5711be8882158_1364d3fd924c524607518b@galt.local.mail>
|
323665
|
+
Subject: [rails-identity] Email Confirmation
|
323666
|
+
Mime-Version: 1.0
|
323667
|
+
Content-Type: multipart/alternative;
|
323668
|
+
boundary="--==_mimepart_5711be888163b_1364d3fd924c5246075042";
|
323669
|
+
charset=UTF-8
|
323670
|
+
Content-Transfer-Encoding: 7bit
|
323671
|
+
|
323672
|
+
|
323673
|
+
----==_mimepart_5711be888163b_1364d3fd924c5246075042
|
323674
|
+
Content-Type: text/plain;
|
323675
|
+
charset=UTF-8
|
323676
|
+
Content-Transfer-Encoding: 7bit
|
323677
|
+
|
323678
|
+
Dear foo@example.com,
|
323679
|
+
|
323680
|
+
Please confirm your account with rails-identity by making a PATCH request
|
323681
|
+
on the current user with a provided verification token. For example,
|
323682
|
+
|
323683
|
+
http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzEzOWNkZS0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzEzZTQxNC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.b3_T87EhQkiUqg03bvM2eSzYMMmBPcwocShc1Lbky0o verified=true
|
323684
|
+
|
323685
|
+
will confirm the account. Here is the verification token:
|
323686
|
+
|
323687
|
+
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzEzOWNkZS0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzEzZTQxNC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.b3_T87EhQkiUqg03bvM2eSzYMMmBPcwocShc1Lbky0o
|
323688
|
+
|
323689
|
+
Thank you for using rails-identity,
|
323690
|
+
rails-identity
|
323691
|
+
|
323692
|
+
|
323693
|
+
----==_mimepart_5711be888163b_1364d3fd924c5246075042
|
323694
|
+
Content-Type: text/html;
|
323695
|
+
charset=UTF-8
|
323696
|
+
Content-Transfer-Encoding: 7bit
|
323697
|
+
|
323698
|
+
<html>
|
323699
|
+
<body>
|
323700
|
+
<p>Dear foo@example.com,</p>
|
323701
|
+
|
323702
|
+
<p>Please confirm your account with rails-identity by making a PATCH request
|
323703
|
+
on the current user with a provided verification token. For example,
|
323704
|
+
<pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzEzOWNkZS0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzEzZTQxNC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.b3_T87EhQkiUqg03bvM2eSzYMMmBPcwocShc1Lbky0o
|
323705
|
+
verified=true</pre> will confirm the account. Here is the verification
|
323706
|
+
token:</p>
|
323707
|
+
|
323708
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIyMzEzOWNkZS0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiIyMzEzZTQxNC0wMzhiLTExZTYtODg1Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYwNzgwNjgwLCJleHAiOjE0NjA3ODQyODB9.b3_T87EhQkiUqg03bvM2eSzYMMmBPcwocShc1Lbky0o</pre>
|
323709
|
+
|
323710
|
+
<p>Thank you for using rails-identity</p>
|
323711
|
+
<p><b>rails-identity</b></p>
|
323712
|
+
|
323713
|
+
</body>
|
323714
|
+
</html>
|
323715
|
+
|
323716
|
+
----==_mimepart_5711be888163b_1364d3fd924c5246075042--
|
323717
|
+
|
323718
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [f2442736-9fff-4271-b5fc-b22e2bbf4c98] Performed ActionMailer::DeliveryJob from Inline(mailers) in 7.6ms
|
323719
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: f2442736-9fff-4271-b5fc-b22e2bbf4c98) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/23139cde-038b-11e6-885f-6c4008a6fa2a
|
323720
|
+
Completed 201 Created in 20ms (Views: 0.4ms | ActiveRecord: 1.0ms)
|
323721
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
323722
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
323723
|
+
-------------------------------------------------------------------
|
323724
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_another_user
|
323725
|
+
-------------------------------------------------------------------
|
323726
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323727
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
323728
|
+
Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"2"}
|
323729
|
+
Accepts a token
|
323730
|
+
Token well formatted for user 1,
|
323731
|
+
session 1
|
323732
|
+
Cache miss. Try database.
|
323733
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323734
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323735
|
+
Token well formatted and verified. Set cache.
|
323736
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323737
|
+
Attempting to get RailsIdentity::User 2
|
323738
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m 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"]]
|
323739
|
+
Checking to see if authorized to access object
|
323740
|
+
RailsIdentity::Errors::UnauthorizedError
|
323741
|
+
Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
323742
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
323743
|
+
[1m[35m (0.0ms)[0m begin transaction
|
323744
|
+
-------------------------------------------------------------------------------------------------
|
323745
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_without_username
|
323746
|
+
-------------------------------------------------------------------------------------------------
|
323747
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323748
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
323749
|
+
Parameters: {"issue_reset_token"=>true, "id"=>"current"}
|
323750
|
+
Accepts a token
|
323751
|
+
Token decode error: Nil JSON web token
|
323752
|
+
Suppressing error: Invalid token:
|
323753
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m 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
|
323754
|
+
RailsIdentity::Errors::ObjectNotFoundError
|
323755
|
+
Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
323756
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
323757
|
+
[1m[35m (0.0ms)[0m begin transaction
|
323758
|
+
--------------------------------------------------------------------
|
323759
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_invalid_email
|
323760
|
+
--------------------------------------------------------------------
|
323761
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323762
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
323763
|
+
Parameters: {"username"=>"foobar", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjA4MzEwNzh9.YBBQCMEnQtqf9F9PBCT8NDtrt4sDEVNKAvOXZlxYMBA", "id"=>"1"}
|
323764
|
+
Accepts a token
|
323765
|
+
Token well formatted for user 1,
|
323766
|
+
session 1
|
323767
|
+
Cache miss. Try database.
|
323768
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323769
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323770
|
+
Token well formatted and verified. Set cache.
|
323771
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323772
|
+
Attempting to get RailsIdentity::User 1
|
323773
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323774
|
+
Checking to see if authorized to access object
|
323775
|
+
Unpermitted parameters: token, id
|
323776
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
323777
|
+
[1m[36mRailsIdentity::User Exists (0.1ms)[0m [1mSELECT 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[0m
|
323778
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
323779
|
+
Completed 400 Bad Request in 6ms (Views: 0.2ms | ActiveRecord: 0.3ms)
|
323780
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
323781
|
+
[1m[35m (0.0ms)[0m begin transaction
|
323782
|
+
--------------------------------------------------------------------------
|
323783
|
+
RailsIdentity::SessionTest: test_session_has_token_and_secret_when_created
|
323784
|
+
--------------------------------------------------------------------------
|
323785
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
323786
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
323787
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
323788
|
+
-----------------------------------------------
|
323789
|
+
RailsIdentity::SessionTest: test_save_a_session
|
323790
|
+
-----------------------------------------------
|
323791
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
323792
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
323793
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "231a7b12-038b-11e6-885f-6c4008a6fa2a"], ["secret", "552c2e56-5de2-4f18-aa51-e051e692c084"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMjMxYTdiMTItMDM4Yi0xMWU2LTg4NWYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MDc4MDY4MCwiZXhwIjoxNDYxOTkwMjgwfQ.oX6MKVSjQIYWDGNKjGKv6wiAFkOjjWAKGFMC6wgYh8M"], ["created_at", "2016-04-16 04:24:40.566052"], ["updated_at", "2016-04-16 04:24:40.566052"]]
|
323794
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
323795
|
+
[1m[35m (1.4ms)[0m rollback transaction
|
323796
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
323797
|
+
---------------------------------------------------------------------
|
323798
|
+
RailsIdentity::SessionTest: test_cannot_save_a_session_without_a_user
|
323799
|
+
---------------------------------------------------------------------
|
323800
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
323801
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
323802
|
+
-----------------------------
|
323803
|
+
RailsIdentityTest: test_truth
|
323804
|
+
-----------------------------
|
323805
|
+
[1m[35m (0.0ms)[0m rollback transaction
|