rails-identity 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/rails_identity/application_helper.rb +95 -92
- data/lib/rails_identity/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +3548 -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: 04340e224eabb69e7b951253475c1058fc7160fd
|
4
|
+
data.tar.gz: 4c5ac8a82d5bbfe3e6a488d1a315480542305794
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12cba9da032fcd952c58ad99aa54d00ecfeb155153a3349ec23a8715ef1fe2d4f78c91a28982ecef4204347ed7ee78d139e9b05cc4d8b31859a6cace02d2b4ca
|
7
|
+
data.tar.gz: ca956b4578c91158ad37de2051f84c1843e7d216aa68bf8f3ceefc6ece2270a7a32a24104760d5d1d009b564741f638faa2bf74724295c3e301898fb8ef70ddf
|
@@ -15,57 +15,107 @@ module RailsIdentity
|
|
15
15
|
render json: {errors: msgs}, status: status
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
raise Errors::UnauthorizedError,
|
38
|
-
"Not authorized to access user #{user_id}"
|
39
|
-
end
|
40
|
-
elsif fallback || user_id == "current"
|
41
|
-
@user = @auth_user
|
42
|
-
else
|
43
|
-
# :nocov:
|
44
|
-
raise Errors::ObjectNotFoundError, "User #{user_id} does not exist"
|
45
|
-
# :nocov:
|
18
|
+
##
|
19
|
+
# Helper method to get the user object in the request context. There
|
20
|
+
# are two ways to specify the user id--one in the routing or the auth
|
21
|
+
# context. Only admin can actually specify the user id in the routing.
|
22
|
+
#
|
23
|
+
# An Errors::UnauthorizedError is raised if the authenticated user is
|
24
|
+
# not authorized for the specified user information.
|
25
|
+
#
|
26
|
+
# An Errors::ObjectNotFoundError is raised if the specified user cannot
|
27
|
+
# be found.
|
28
|
+
#
|
29
|
+
def get_user(fallback: true)
|
30
|
+
user_id = params[:user_id]
|
31
|
+
logger.debug("Attempting to get user #{user_id}")
|
32
|
+
if !user_id.nil? && user_id != "current"
|
33
|
+
@user = find_object(User, params[:user_id]) # will throw error if nil
|
34
|
+
unless authorized?(@user)
|
35
|
+
raise Errors::UnauthorizedError,
|
36
|
+
"Not authorized to access user #{user_id}"
|
46
37
|
end
|
38
|
+
elsif fallback || user_id == "current"
|
39
|
+
@user = @auth_user
|
40
|
+
else
|
41
|
+
# :nocov:
|
42
|
+
raise Errors::ObjectNotFoundError, "User #{user_id} does not exist"
|
43
|
+
# :nocov:
|
47
44
|
end
|
45
|
+
end
|
48
46
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
47
|
+
##
|
48
|
+
# Finds an object by model and UUID and throws an error (which will be
|
49
|
+
# caught and re-thrown as an HTTP error.)
|
50
|
+
#
|
51
|
+
# An Errors::ObjectNotFoundError is raised if specified to do so when
|
52
|
+
# the object could not be found using the uuid.
|
53
|
+
#
|
54
|
+
def find_object(model, uuid, error: Errors::ObjectNotFoundError)
|
55
|
+
logger.debug("Attempting to get #{model.name} #{uuid}")
|
56
|
+
obj = model.find_by_uuid(uuid)
|
57
|
+
if obj.nil? && !error.nil?
|
58
|
+
raise error, "#{model.name} #{uuid} cannot be found"
|
59
|
+
end
|
60
|
+
return obj
|
61
|
+
end
|
62
|
+
|
63
|
+
##
|
64
|
+
# Requires a token.
|
65
|
+
#
|
66
|
+
def require_token
|
67
|
+
logger.debug("Requires a token")
|
68
|
+
get_token
|
69
|
+
end
|
70
|
+
|
71
|
+
##
|
72
|
+
# Accepts a token if present. If not, it's still ok. ALL errors are
|
73
|
+
# suppressed.
|
74
|
+
#
|
75
|
+
def accept_token()
|
76
|
+
logger.debug("Accepts a token")
|
77
|
+
begin
|
78
|
+
get_token()
|
79
|
+
rescue StandardError => e
|
80
|
+
logger.error("Suppressing error: #{e.message}")
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
##
|
85
|
+
# Requires an admin session. All this means is that the session is
|
86
|
+
# issued for an admin user (role == 1000).
|
87
|
+
#
|
88
|
+
def require_admin_token
|
89
|
+
logger.debug("Requires an admin token")
|
90
|
+
get_token(required_role: Roles::ADMIN)
|
91
|
+
end
|
92
|
+
|
93
|
+
##
|
94
|
+
# Determines if the user is authorized for the object.
|
95
|
+
#
|
96
|
+
def authorized?(obj)
|
97
|
+
logger.debug("Checking to see if authorized to access object")
|
98
|
+
if @auth_user.nil?
|
99
|
+
# :nocov:
|
100
|
+
return false
|
101
|
+
# :nocov:
|
102
|
+
elsif @auth_user.role >= Roles::ADMIN
|
103
|
+
return true
|
104
|
+
elsif obj.is_a? User
|
105
|
+
return obj == @auth_user
|
106
|
+
else
|
107
|
+
return obj.user == @auth_user
|
63
108
|
end
|
109
|
+
end
|
110
|
+
|
111
|
+
protected
|
64
112
|
|
65
113
|
##
|
66
114
|
# Attempts to retrieve the payload encoded in the token. It checks if
|
67
115
|
# the token is "valid" according to JWT definition and not expired.
|
68
116
|
#
|
117
|
+
# An Errors::InvalidTokenError is raised if token cannot be decoded.
|
118
|
+
#
|
69
119
|
def get_token_payload(token)
|
70
120
|
begin
|
71
121
|
decoded = JWT.decode token, nil, false
|
@@ -91,6 +141,9 @@ module RailsIdentity
|
|
91
141
|
# session specified in the token payload are indeed valid. The
|
92
142
|
# required role is also checked.
|
93
143
|
#
|
144
|
+
# An Errors::InvalidTokenError is thrown for all cases where token is
|
145
|
+
# invalid.
|
146
|
+
#
|
94
147
|
def verify_token_payload(token, payload, required_role: Roles::PUBLIC)
|
95
148
|
user_uuid = payload["user_uuid"]
|
96
149
|
session_uuid = payload["session_uuid"]
|
@@ -127,9 +180,6 @@ module RailsIdentity
|
|
127
180
|
# Attempt to get a token for the session. Token must be specified in
|
128
181
|
# query string or part of the JSON object.
|
129
182
|
#
|
130
|
-
# A Errors::InvalidTokenError is raised if the JWT is malformed or not
|
131
|
-
# valid against its secret.
|
132
|
-
#
|
133
183
|
def get_token(required_role: Roles::PUBLIC)
|
134
184
|
token = params[:token]
|
135
185
|
payload = get_token_payload(token)
|
@@ -145,52 +195,5 @@ module RailsIdentity
|
|
145
195
|
@token = @auth_session.token
|
146
196
|
end
|
147
197
|
|
148
|
-
##
|
149
|
-
# Requires a token.
|
150
|
-
#
|
151
|
-
def require_token
|
152
|
-
logger.debug("Requires a token")
|
153
|
-
get_token
|
154
|
-
end
|
155
|
-
|
156
|
-
##
|
157
|
-
# Accepts a token if present. If not, it's still ok.
|
158
|
-
#
|
159
|
-
def accept_token()
|
160
|
-
logger.debug("Accepts a token")
|
161
|
-
begin
|
162
|
-
get_token()
|
163
|
-
rescue StandardError => e
|
164
|
-
logger.error("Suppressing error: #{e.message}")
|
165
|
-
end
|
166
|
-
end
|
167
|
-
|
168
|
-
##
|
169
|
-
# Requires an admin session. All this means is that the session is
|
170
|
-
# issued for an admin user (role == 1000).
|
171
|
-
#
|
172
|
-
def require_admin_token
|
173
|
-
logger.debug("Requires an admin token")
|
174
|
-
get_token(required_role: Roles::ADMIN)
|
175
|
-
end
|
176
|
-
|
177
|
-
##
|
178
|
-
# Determines if the user is authorized for the object.
|
179
|
-
#
|
180
|
-
def authorized?(obj)
|
181
|
-
logger.debug("Checking to see if authorized to access object")
|
182
|
-
if @auth_user.nil?
|
183
|
-
# :nocov:
|
184
|
-
return false
|
185
|
-
# :nocov:
|
186
|
-
elsif @auth_user.role >= Roles::ADMIN
|
187
|
-
return true
|
188
|
-
elsif obj.is_a? User
|
189
|
-
return obj == @auth_user
|
190
|
-
else
|
191
|
-
return obj.user == @auth_user
|
192
|
-
end
|
193
|
-
end
|
194
|
-
|
195
198
|
end
|
196
199
|
end
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/test/dummy/log/test.log
CHANGED
@@ -338723,3 +338723,3551 @@ Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
|
338723
338723
|
RailsIdentityTest: test_truth
|
338724
338724
|
-----------------------------
|
338725
338725
|
[1m[35m (0.0ms)[0m rollback transaction
|
338726
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
338727
|
+
[1m[35m (0.1ms)[0m begin transaction
|
338728
|
+
[1m[36mFixture Delete (1.0ms)[0m [1mDELETE FROM "rails_identity_sessions"[0m
|
338729
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('1', '1', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU', 'secret', '2016-04-20 02:42:29', '2016-04-20 02:42:29')
|
338730
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('2', '2', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIyIiwidXNlcl91dWlkIjoiMiIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.y9NogX8zPgsZ1-Frr8pbWuhpKo1MYCliyVCpecI6pB0', 'secret', '2016-04-20 02:42:29', '2016-04-20 02:42:29')[0m
|
338731
|
+
[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.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxMTcwNTQ5fQ.kdkASSXUwR-sWonmTj1RE0ba4M4h1QI_RJ8g9Igf0fE', 'secret', '2016-04-20 02:42:29', '2016-04-20 02:42:29')
|
338732
|
+
[1m[36mFixture Delete (0.1ms)[0m [1mDELETE FROM "rails_identity_users"[0m
|
338733
|
+
[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$p4qjAJS3G6SRa.htu54LleFOU9qzD04OkUVXjM.5rFtTXnwnuqF9a', 10, 't', '2016-04-20 02:42:29', '2016-04-20 02:42:29')
|
338734
|
+
[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$biKP/LX8SHh8hp47DLkdreWsxtl23cLnxeZcCwjA8M9HySDUJAnfu', 10, 't', '2016-04-20 02:42:29', '2016-04-20 02:42:29')[0m
|
338735
|
+
[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$fvZsVId4B5kknEF19s.3Le.lTAhTSyFtPKCR1aFU6Zwls4ZRWX/.K', 100, 't', '2016-04-20 02:42:29', '2016-04-20 02:42:29')
|
338736
|
+
[1m[36m (1.2ms)[0m [1mcommit transaction[0m
|
338737
|
+
[1m[35m (0.0ms)[0m begin transaction
|
338738
|
+
-----------------------------
|
338739
|
+
RailsIdentityTest: test_truth
|
338740
|
+
-----------------------------
|
338741
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
338742
|
+
[1m[35m (0.0ms)[0m begin transaction
|
338743
|
+
------------------------------------------------------------------------------------
|
338744
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_password_with_a_invalid_token
|
338745
|
+
------------------------------------------------------------------------------------
|
338746
|
+
[1m[36mRailsIdentity::Session Load (0.3ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
338747
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
338748
|
+
Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"1"}
|
338749
|
+
Accepts a token
|
338750
|
+
Token well formatted for user 1,
|
338751
|
+
session 1
|
338752
|
+
Cache miss. Try database.
|
338753
|
+
[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"]]
|
338754
|
+
[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"]]
|
338755
|
+
Token well formatted and verified. Set cache.
|
338756
|
+
[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"]]
|
338757
|
+
Attempting to get RailsIdentity::User 1
|
338758
|
+
[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"]]
|
338759
|
+
Checking to see if authorized to access object
|
338760
|
+
RailsIdentity::Errors::UnauthorizedError
|
338761
|
+
Completed 401 Unauthorized in 91ms (Views: 0.2ms | ActiveRecord: 0.4ms)
|
338762
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
338763
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
338764
|
+
--------------------------------------------------------------------
|
338765
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_invalid_email
|
338766
|
+
--------------------------------------------------------------------
|
338767
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
338768
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
338769
|
+
Parameters: {"username"=>"foobar", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"1"}
|
338770
|
+
Accepts a token
|
338771
|
+
Token well formatted for user 1,
|
338772
|
+
session 1
|
338773
|
+
Cache miss. Try database.
|
338774
|
+
[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"]]
|
338775
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
338776
|
+
Token well formatted and verified. Set cache.
|
338777
|
+
[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"]]
|
338778
|
+
Attempting to get RailsIdentity::User 1
|
338779
|
+
[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"]]
|
338780
|
+
Checking to see if authorized to access object
|
338781
|
+
Unpermitted parameters: token, id
|
338782
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
338783
|
+
[1m[35mRailsIdentity::User Exists (0.1ms)[0m SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foobar' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
|
338784
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
338785
|
+
Completed 400 Bad Request in 44ms (Views: 0.2ms | ActiveRecord: 0.4ms)
|
338786
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
338787
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
338788
|
+
------------------------------------------------------------------------------
|
338789
|
+
RailsIdentity::UsersControllerTest: test_update_(reissue)_a_verification_token
|
338790
|
+
------------------------------------------------------------------------------
|
338791
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
338792
|
+
[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"]]
|
338793
|
+
[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
|
338794
|
+
[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"]]
|
338795
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
338796
|
+
Parameters: {"issue_verification_token"=>true, "username"=>"one@example.com", "id"=>"current"}
|
338797
|
+
Accepts a token
|
338798
|
+
Token decode error: Nil JSON web token
|
338799
|
+
Suppressing error: Invalid token:
|
338800
|
+
[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"]]
|
338801
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
338802
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "865d195a-06a1-11e6-8df6-6c4008a6fa2a"], ["secret", "4374df68-7631-4993-ae22-949c99dca420"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODY1ZDE5NWEtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.s3hd48xbghjvvD0hxro1NCc_nKTeK1W-eTW9lghoImc"], ["created_at", "2016-04-20 02:42:29.524947"], ["updated_at", "2016-04-20 02:42:29.524947"]]
|
338803
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
338804
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
338805
|
+
[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
|
338806
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODY1ZDE5NWEtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.s3hd48xbghjvvD0hxro1NCc_nKTeK1W-eTW9lghoImc"], ["updated_at", "2016-04-20 02:42:29.528073"], ["uuid", "1"]]
|
338807
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
338808
|
+
[ActiveJob] [1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
338809
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [43e44b42-f0d6-4a9e-8d96-a26853dde91b] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
|
338810
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [43e44b42-f0d6-4a9e-8d96-a26853dde91b] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (1.1ms)
|
338811
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [43e44b42-f0d6-4a9e-8d96-a26853dde91b] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.5ms)
|
338812
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [43e44b42-f0d6-4a9e-8d96-a26853dde91b]
|
338813
|
+
RailsIdentity::UserMailer#email_verification: processed outbound mail in 190.7ms
|
338814
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [43e44b42-f0d6-4a9e-8d96-a26853dde91b]
|
338815
|
+
Sent mail to one@example.com (6.1ms)
|
338816
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [43e44b42-f0d6-4a9e-8d96-a26853dde91b] Date: Tue, 19 Apr 2016 21:42:29 -0500
|
338817
|
+
From: no-reply@rails-identity.com
|
338818
|
+
To: one@example.com
|
338819
|
+
Message-ID: <5716ec95b5aa0_35f43fe130852464383e8@galt.local.mail>
|
338820
|
+
Subject: [rails-identity] Email Confirmation
|
338821
|
+
Mime-Version: 1.0
|
338822
|
+
Content-Type: multipart/alternative;
|
338823
|
+
boundary="--==_mimepart_5716ec95b49bd_35f43fe130852464382ba";
|
338824
|
+
charset=UTF-8
|
338825
|
+
Content-Transfer-Encoding: 7bit
|
338826
|
+
|
338827
|
+
|
338828
|
+
----==_mimepart_5716ec95b49bd_35f43fe130852464382ba
|
338829
|
+
Content-Type: text/plain;
|
338830
|
+
charset=UTF-8
|
338831
|
+
Content-Transfer-Encoding: 7bit
|
338832
|
+
|
338833
|
+
Dear one@example.com,
|
338834
|
+
|
338835
|
+
Please confirm your account with rails-identity by making a PATCH request
|
338836
|
+
on the current user with a provided verification token. For example,
|
338837
|
+
|
338838
|
+
http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODY1ZDE5NWEtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.s3hd48xbghjvvD0hxro1NCc_nKTeK1W-eTW9lghoImc verified=true
|
338839
|
+
|
338840
|
+
will confirm the account. Here is the verification token:
|
338841
|
+
|
338842
|
+
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODY1ZDE5NWEtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.s3hd48xbghjvvD0hxro1NCc_nKTeK1W-eTW9lghoImc
|
338843
|
+
|
338844
|
+
Thank you for using rails-identity,
|
338845
|
+
rails-identity
|
338846
|
+
|
338847
|
+
|
338848
|
+
----==_mimepart_5716ec95b49bd_35f43fe130852464382ba
|
338849
|
+
Content-Type: text/html;
|
338850
|
+
charset=UTF-8
|
338851
|
+
Content-Transfer-Encoding: 7bit
|
338852
|
+
|
338853
|
+
<html>
|
338854
|
+
<body>
|
338855
|
+
<p>Dear one@example.com,</p>
|
338856
|
+
|
338857
|
+
<p>Please confirm your account with rails-identity by making a PATCH request
|
338858
|
+
on the current user with a provided verification token. For example,
|
338859
|
+
<pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODY1ZDE5NWEtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.s3hd48xbghjvvD0hxro1NCc_nKTeK1W-eTW9lghoImc
|
338860
|
+
verified=true</pre> will confirm the account. Here is the verification
|
338861
|
+
token:</p>
|
338862
|
+
|
338863
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODY1ZDE5NWEtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.s3hd48xbghjvvD0hxro1NCc_nKTeK1W-eTW9lghoImc</pre>
|
338864
|
+
|
338865
|
+
<p>Thank you for using rails-identity</p>
|
338866
|
+
<p><b>rails-identity</b></p>
|
338867
|
+
|
338868
|
+
</body>
|
338869
|
+
</html>
|
338870
|
+
|
338871
|
+
----==_mimepart_5716ec95b49bd_35f43fe130852464382ba--
|
338872
|
+
|
338873
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [43e44b42-f0d6-4a9e-8d96-a26853dde91b] Performed ActionMailer::DeliveryJob from Inline(mailers) in 197.54ms
|
338874
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 43e44b42-f0d6-4a9e-8d96-a26853dde91b) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
|
338875
|
+
Rendered text template (0.0ms)
|
338876
|
+
Completed 204 No Content in 239ms (Views: 2.3ms | ActiveRecord: 0.9ms)
|
338877
|
+
[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
|
338878
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
338879
|
+
Parameters: {"verified"=>true, "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODY1ZDE5NWEtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.s3hd48xbghjvvD0hxro1NCc_nKTeK1W-eTW9lghoImc", "id"=>"current"}
|
338880
|
+
Accepts a token
|
338881
|
+
Token well formatted for user 1,
|
338882
|
+
session 865d195a-06a1-11e6-8df6-6c4008a6fa2a
|
338883
|
+
Cache miss. Try database.
|
338884
|
+
[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"]]
|
338885
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "865d195a-06a1-11e6-8df6-6c4008a6fa2a"]]
|
338886
|
+
Token well formatted and verified. Set cache.
|
338887
|
+
[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"]]
|
338888
|
+
Attempting to get RailsIdentity::User 1
|
338889
|
+
[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"]]
|
338890
|
+
Checking to see if authorized to access object
|
338891
|
+
Unpermitted parameters: token, id
|
338892
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
338893
|
+
[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
|
338894
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
338895
|
+
Completed 200 OK in 41ms (Views: 0.5ms | ActiveRecord: 1.3ms)
|
338896
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
338897
|
+
[1m[35m (0.1ms)[0m begin transaction
|
338898
|
+
------------------------------------------------------------
|
338899
|
+
RailsIdentity::UsersControllerTest: test_delete_current_user
|
338900
|
+
------------------------------------------------------------
|
338901
|
+
[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"]]
|
338902
|
+
Processing by RailsIdentity::UsersController#destroy as HTML
|
338903
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"current"}
|
338904
|
+
Requires a token
|
338905
|
+
Token well formatted for user 1,
|
338906
|
+
session 1
|
338907
|
+
Cache miss. Try database.
|
338908
|
+
[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"]]
|
338909
|
+
[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"]]
|
338910
|
+
Token well formatted and verified. Set cache.
|
338911
|
+
[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"]]
|
338912
|
+
Attempting to get RailsIdentity::User 1
|
338913
|
+
[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"]]
|
338914
|
+
Checking to see if authorized to access object
|
338915
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
338916
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rails_identity_users" SET "deleted_at" = '2016-04-20 02:42:29.806177' WHERE "rails_identity_users"."uuid" = ?[0m [["uuid", "1"]]
|
338917
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
338918
|
+
Rendered text template (0.0ms)
|
338919
|
+
Completed 204 No Content in 7ms (Views: 0.3ms | ActiveRecord: 0.6ms)
|
338920
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
338921
|
+
[1m[35m (0.0ms)[0m begin transaction
|
338922
|
+
------------------------------------------------------------------------------
|
338923
|
+
RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_username
|
338924
|
+
------------------------------------------------------------------------------
|
338925
|
+
[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"]]
|
338926
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
338927
|
+
Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
|
338928
|
+
Accepts a token
|
338929
|
+
Token decode error: Nil JSON web token
|
338930
|
+
Suppressing error: Invalid token:
|
338931
|
+
Create new user
|
338932
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
338933
|
+
[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
|
338934
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
338935
|
+
Completed 400 Bad Request in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
338936
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
338937
|
+
[1m[35m (0.0ms)[0m begin transaction
|
338938
|
+
------------------------------------------------------
|
338939
|
+
RailsIdentity::UsersControllerTest: test_create_a_user
|
338940
|
+
------------------------------------------------------
|
338941
|
+
[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"]]
|
338942
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
338943
|
+
Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
|
338944
|
+
Accepts a token
|
338945
|
+
Token decode error: Nil JSON web token
|
338946
|
+
Suppressing error: Invalid token:
|
338947
|
+
Create new user
|
338948
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
338949
|
+
[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
|
338950
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "foo@example.com"], ["password_digest", "$2a$04$XkOlixMo0Tco7QExefa2gejmRBFuObHONGy2EoSWC2yFqXHchmDrS"], ["role", 10], ["created_at", "2016-04-20 02:42:29.822388"], ["updated_at", "2016-04-20 02:42:29.822388"], ["uuid", "868c5cec-06a1-11e6-8df6-6c4008a6fa2a"]]
|
338951
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
338952
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
338953
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["user_uuid", "868c5cec-06a1-11e6-8df6-6c4008a6fa2a"], ["uuid", "868ca878-06a1-11e6-8df6-6c4008a6fa2a"], ["secret", "47ac25f3-c31b-48e7-859e-3611e2dee2ba"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NjhjNWNlYy0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NjhjYTg3OC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMTIwMTQ5LCJleHAiOjE0NjExMjM3NDl9.ZUMWbPs7MHPk3jHwokbEvlSu_w-_QkH-rbtURkwzCms"], ["created_at", "2016-04-20 02:42:29.825228"], ["updated_at", "2016-04-20 02:42:29.825228"]]
|
338954
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
338955
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
338956
|
+
[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" != '868c5cec-06a1-11e6-8df6-6c4008a6fa2a') LIMIT 1
|
338957
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NjhjNWNlYy0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NjhjYTg3OC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMTIwMTQ5LCJleHAiOjE0NjExMjM3NDl9.ZUMWbPs7MHPk3jHwokbEvlSu_w-_QkH-rbtURkwzCms"], ["updated_at", "2016-04-20 02:42:29.827005"], ["uuid", "868c5cec-06a1-11e6-8df6-6c4008a6fa2a"]]
|
338958
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
338959
|
+
[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", "868c5cec-06a1-11e6-8df6-6c4008a6fa2a"]]
|
338960
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [a8b80a7c-600b-4367-a1b7-c70a975da154] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/868c5cec-06a1-11e6-8df6-6c4008a6fa2a
|
338961
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [a8b80a7c-600b-4367-a1b7-c70a975da154] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
|
338962
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [a8b80a7c-600b-4367-a1b7-c70a975da154] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
|
338963
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [a8b80a7c-600b-4367-a1b7-c70a975da154]
|
338964
|
+
RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.4ms
|
338965
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [a8b80a7c-600b-4367-a1b7-c70a975da154]
|
338966
|
+
Sent mail to foo@example.com (3.6ms)
|
338967
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [a8b80a7c-600b-4367-a1b7-c70a975da154] Date: Tue, 19 Apr 2016 21:42:29 -0500
|
338968
|
+
From: no-reply@rails-identity.com
|
338969
|
+
To: foo@example.com
|
338970
|
+
Message-ID: <5716ec95cb936_35f43fe130852464385f8@galt.local.mail>
|
338971
|
+
Subject: [rails-identity] Email Confirmation
|
338972
|
+
Mime-Version: 1.0
|
338973
|
+
Content-Type: multipart/alternative;
|
338974
|
+
boundary="--==_mimepart_5716ec95cb00f_35f43fe1308524643841f";
|
338975
|
+
charset=UTF-8
|
338976
|
+
Content-Transfer-Encoding: 7bit
|
338977
|
+
|
338978
|
+
|
338979
|
+
----==_mimepart_5716ec95cb00f_35f43fe1308524643841f
|
338980
|
+
Content-Type: text/plain;
|
338981
|
+
charset=UTF-8
|
338982
|
+
Content-Transfer-Encoding: 7bit
|
338983
|
+
|
338984
|
+
Dear foo@example.com,
|
338985
|
+
|
338986
|
+
Please confirm your account with rails-identity by making a PATCH request
|
338987
|
+
on the current user with a provided verification token. For example,
|
338988
|
+
|
338989
|
+
http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NjhjNWNlYy0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NjhjYTg3OC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMTIwMTQ5LCJleHAiOjE0NjExMjM3NDl9.ZUMWbPs7MHPk3jHwokbEvlSu_w-_QkH-rbtURkwzCms verified=true
|
338990
|
+
|
338991
|
+
will confirm the account. Here is the verification token:
|
338992
|
+
|
338993
|
+
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NjhjNWNlYy0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NjhjYTg3OC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMTIwMTQ5LCJleHAiOjE0NjExMjM3NDl9.ZUMWbPs7MHPk3jHwokbEvlSu_w-_QkH-rbtURkwzCms
|
338994
|
+
|
338995
|
+
Thank you for using rails-identity,
|
338996
|
+
rails-identity
|
338997
|
+
|
338998
|
+
|
338999
|
+
----==_mimepart_5716ec95cb00f_35f43fe1308524643841f
|
339000
|
+
Content-Type: text/html;
|
339001
|
+
charset=UTF-8
|
339002
|
+
Content-Transfer-Encoding: 7bit
|
339003
|
+
|
339004
|
+
<html>
|
339005
|
+
<body>
|
339006
|
+
<p>Dear foo@example.com,</p>
|
339007
|
+
|
339008
|
+
<p>Please confirm your account with rails-identity by making a PATCH request
|
339009
|
+
on the current user with a provided verification token. For example,
|
339010
|
+
<pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NjhjNWNlYy0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NjhjYTg3OC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMTIwMTQ5LCJleHAiOjE0NjExMjM3NDl9.ZUMWbPs7MHPk3jHwokbEvlSu_w-_QkH-rbtURkwzCms
|
339011
|
+
verified=true</pre> will confirm the account. Here is the verification
|
339012
|
+
token:</p>
|
339013
|
+
|
339014
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NjhjNWNlYy0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NjhjYTg3OC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMTIwMTQ5LCJleHAiOjE0NjExMjM3NDl9.ZUMWbPs7MHPk3jHwokbEvlSu_w-_QkH-rbtURkwzCms</pre>
|
339015
|
+
|
339016
|
+
<p>Thank you for using rails-identity</p>
|
339017
|
+
<p><b>rails-identity</b></p>
|
339018
|
+
|
339019
|
+
</body>
|
339020
|
+
</html>
|
339021
|
+
|
339022
|
+
----==_mimepart_5716ec95cb00f_35f43fe1308524643841f--
|
339023
|
+
|
339024
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [a8b80a7c-600b-4367-a1b7-c70a975da154] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.5ms
|
339025
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: a8b80a7c-600b-4367-a1b7-c70a975da154) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/868c5cec-06a1-11e6-8df6-6c4008a6fa2a
|
339026
|
+
Completed 201 Created in 17ms (Views: 0.4ms | ActiveRecord: 1.0ms)
|
339027
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
339028
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
339029
|
+
--------------------------------------------------------------------
|
339030
|
+
RailsIdentity::UsersControllerTest: test_non-admin_cannot_list_users
|
339031
|
+
--------------------------------------------------------------------
|
339032
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339033
|
+
Processing by RailsIdentity::UsersController#index as HTML
|
339034
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU"}
|
339035
|
+
Requires an admin token
|
339036
|
+
Token well formatted for user 1,
|
339037
|
+
session 1
|
339038
|
+
Cache miss. Try database.
|
339039
|
+
[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"]]
|
339040
|
+
Well-formed but invalid user token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU
|
339041
|
+
Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
339042
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
339043
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
339044
|
+
-------------------------------------------------------------------------------------------------
|
339045
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_without_username
|
339046
|
+
-------------------------------------------------------------------------------------------------
|
339047
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339048
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
339049
|
+
Parameters: {"issue_reset_token"=>true, "id"=>"current"}
|
339050
|
+
Accepts a token
|
339051
|
+
Token decode error: Nil JSON web token
|
339052
|
+
Suppressing error: Invalid token:
|
339053
|
+
[1m[36mRailsIdentity::User Load (0.3ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."username" IS NULL LIMIT 1[0m
|
339054
|
+
RailsIdentity::Errors::ObjectNotFoundError
|
339055
|
+
Completed 404 Not Found in 2ms (Views: 0.2ms | ActiveRecord: 0.3ms)
|
339056
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
339057
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
339058
|
+
-------------------------------------------------------------------------
|
339059
|
+
RailsIdentity::UsersControllerTest: test_user_cannot_create_an_admin_user
|
339060
|
+
-------------------------------------------------------------------------
|
339061
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339062
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
339063
|
+
Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100"}
|
339064
|
+
Accepts a token
|
339065
|
+
Token decode error: Nil JSON web token
|
339066
|
+
Suppressing error: Invalid token:
|
339067
|
+
Create new user
|
339068
|
+
Unpermitted parameter: role
|
339069
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
339070
|
+
[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
|
339071
|
+
[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$bIT5TVQjr62nuUFi56gJGO14iNBYCQo2S3RX/9VUHc4aGPT1pflpm"], ["role", 10], ["created_at", "2016-04-20 02:42:29.857496"], ["updated_at", "2016-04-20 02:42:29.857496"], ["uuid", "8691b6ec-06a1-11e6-8df6-6c4008a6fa2a"]]
|
339072
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
339073
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
339074
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "8691b6ec-06a1-11e6-8df6-6c4008a6fa2a"], ["uuid", "8691fdb4-06a1-11e6-8df6-6c4008a6fa2a"], ["secret", "9664cbf6-b72b-4762-b1cc-2041a86c47e9"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NjkxYjZlYy0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NjkxZmRiNC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMTIwMTQ5LCJleHAiOjE0NjExMjM3NDl9.Hs659K19K8QyRrWsF1OJrjTr2kbPtikoiI_AFfV-Aao"], ["created_at", "2016-04-20 02:42:29.860130"], ["updated_at", "2016-04-20 02:42:29.860130"]]
|
339075
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
339076
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
339077
|
+
[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" != '8691b6ec-06a1-11e6-8df6-6c4008a6fa2a') LIMIT 1[0m
|
339078
|
+
[1m[35mSQL (0.0ms)[0m UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NjkxYjZlYy0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NjkxZmRiNC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMTIwMTQ5LCJleHAiOjE0NjExMjM3NDl9.Hs659K19K8QyRrWsF1OJrjTr2kbPtikoiI_AFfV-Aao"], ["updated_at", "2016-04-20 02:42:29.861855"], ["uuid", "8691b6ec-06a1-11e6-8df6-6c4008a6fa2a"]]
|
339079
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
339080
|
+
[ActiveJob] [1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "8691b6ec-06a1-11e6-8df6-6c4008a6fa2a"]]
|
339081
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [1aa51c6f-9e6c-4389-918e-860b2b0496c4] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/8691b6ec-06a1-11e6-8df6-6c4008a6fa2a
|
339082
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [1aa51c6f-9e6c-4389-918e-860b2b0496c4] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
|
339083
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [1aa51c6f-9e6c-4389-918e-860b2b0496c4] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
|
339084
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [1aa51c6f-9e6c-4389-918e-860b2b0496c4]
|
339085
|
+
RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.5ms
|
339086
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [1aa51c6f-9e6c-4389-918e-860b2b0496c4]
|
339087
|
+
Sent mail to foo@example.com (3.8ms)
|
339088
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [1aa51c6f-9e6c-4389-918e-860b2b0496c4] Date: Tue, 19 Apr 2016 21:42:29 -0500
|
339089
|
+
From: no-reply@rails-identity.com
|
339090
|
+
To: foo@example.com
|
339091
|
+
Message-ID: <5716ec95d4235_35f43fe130852464387e1@galt.local.mail>
|
339092
|
+
Subject: [rails-identity] Email Confirmation
|
339093
|
+
Mime-Version: 1.0
|
339094
|
+
Content-Type: multipart/alternative;
|
339095
|
+
boundary="--==_mimepart_5716ec95d37d6_35f43fe13085246438625";
|
339096
|
+
charset=UTF-8
|
339097
|
+
Content-Transfer-Encoding: 7bit
|
339098
|
+
|
339099
|
+
|
339100
|
+
----==_mimepart_5716ec95d37d6_35f43fe13085246438625
|
339101
|
+
Content-Type: text/plain;
|
339102
|
+
charset=UTF-8
|
339103
|
+
Content-Transfer-Encoding: 7bit
|
339104
|
+
|
339105
|
+
Dear foo@example.com,
|
339106
|
+
|
339107
|
+
Please confirm your account with rails-identity by making a PATCH request
|
339108
|
+
on the current user with a provided verification token. For example,
|
339109
|
+
|
339110
|
+
http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NjkxYjZlYy0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NjkxZmRiNC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMTIwMTQ5LCJleHAiOjE0NjExMjM3NDl9.Hs659K19K8QyRrWsF1OJrjTr2kbPtikoiI_AFfV-Aao verified=true
|
339111
|
+
|
339112
|
+
will confirm the account. Here is the verification token:
|
339113
|
+
|
339114
|
+
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NjkxYjZlYy0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NjkxZmRiNC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMTIwMTQ5LCJleHAiOjE0NjExMjM3NDl9.Hs659K19K8QyRrWsF1OJrjTr2kbPtikoiI_AFfV-Aao
|
339115
|
+
|
339116
|
+
Thank you for using rails-identity,
|
339117
|
+
rails-identity
|
339118
|
+
|
339119
|
+
|
339120
|
+
----==_mimepart_5716ec95d37d6_35f43fe13085246438625
|
339121
|
+
Content-Type: text/html;
|
339122
|
+
charset=UTF-8
|
339123
|
+
Content-Transfer-Encoding: 7bit
|
339124
|
+
|
339125
|
+
<html>
|
339126
|
+
<body>
|
339127
|
+
<p>Dear foo@example.com,</p>
|
339128
|
+
|
339129
|
+
<p>Please confirm your account with rails-identity by making a PATCH request
|
339130
|
+
on the current user with a provided verification token. For example,
|
339131
|
+
<pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NjkxYjZlYy0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NjkxZmRiNC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMTIwMTQ5LCJleHAiOjE0NjExMjM3NDl9.Hs659K19K8QyRrWsF1OJrjTr2kbPtikoiI_AFfV-Aao
|
339132
|
+
verified=true</pre> will confirm the account. Here is the verification
|
339133
|
+
token:</p>
|
339134
|
+
|
339135
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NjkxYjZlYy0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NjkxZmRiNC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMTIwMTQ5LCJleHAiOjE0NjExMjM3NDl9.Hs659K19K8QyRrWsF1OJrjTr2kbPtikoiI_AFfV-Aao</pre>
|
339136
|
+
|
339137
|
+
<p>Thank you for using rails-identity</p>
|
339138
|
+
<p><b>rails-identity</b></p>
|
339139
|
+
|
339140
|
+
</body>
|
339141
|
+
</html>
|
339142
|
+
|
339143
|
+
----==_mimepart_5716ec95d37d6_35f43fe13085246438625--
|
339144
|
+
|
339145
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [1aa51c6f-9e6c-4389-918e-860b2b0496c4] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.77ms
|
339146
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 1aa51c6f-9e6c-4389-918e-860b2b0496c4) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/8691b6ec-06a1-11e6-8df6-6c4008a6fa2a
|
339147
|
+
Completed 201 Created in 18ms (Views: 0.3ms | ActiveRecord: 0.9ms)
|
339148
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
339149
|
+
[1m[35m (0.1ms)[0m begin transaction
|
339150
|
+
---------------------------------------------------------------------
|
339151
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_using_ill-formed
|
339152
|
+
---------------------------------------------------------------------
|
339153
|
+
[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"]]
|
339154
|
+
[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"]]
|
339155
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
339156
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIwMjA5fQ.47H3UFK2AQS7jYcP5DydCioWiFRrzFlUOG41-jPld-I", "id"=>"1"}
|
339157
|
+
Requires a token
|
339158
|
+
User UUID or session UUID is nil
|
339159
|
+
Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIwMjA5fQ.47H3UFK2AQS7jYcP5DydCioWiFRrzFlUOG41-jPld-I
|
339160
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
339161
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
339162
|
+
[1m[35m (0.0ms)[0m begin transaction
|
339163
|
+
-------------------------------------------------------------------------
|
339164
|
+
RailsIdentity::UsersControllerTest: test_update_(issue)_a_new_reset_token
|
339165
|
+
-------------------------------------------------------------------------
|
339166
|
+
[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"]]
|
339167
|
+
[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"]]
|
339168
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
339169
|
+
Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
|
339170
|
+
Accepts a token
|
339171
|
+
Token decode error: Nil JSON web token
|
339172
|
+
Suppressing error: Invalid token:
|
339173
|
+
[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"]]
|
339174
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
339175
|
+
[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", "86965b48-06a1-11e6-8df6-6c4008a6fa2a"], ["secret", "f6f104b1-5fa1-4106-872b-31ef151880d8"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODY5NjViNDgtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.JInrPmapWNLLaTYnA4RfN8b__fq8xdS5--ZiOWvuM9M"], ["created_at", "2016-04-20 02:42:29.889195"], ["updated_at", "2016-04-20 02:42:29.889195"]]
|
339176
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
339177
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
339178
|
+
[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
|
339179
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODY5NjViNDgtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.JInrPmapWNLLaTYnA4RfN8b__fq8xdS5--ZiOWvuM9M"], ["updated_at", "2016-04-20 02:42:29.892393"], ["uuid", "1"]]
|
339180
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
339181
|
+
[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"]]
|
339182
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [2708a981-b489-4ae4-8353-06d24c173bef] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
|
339183
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [2708a981-b489-4ae4-8353-06d24c173bef] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (0.4ms)
|
339184
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [2708a981-b489-4ae4-8353-06d24c173bef] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (0.3ms)
|
339185
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [2708a981-b489-4ae4-8353-06d24c173bef]
|
339186
|
+
RailsIdentity::UserMailer#password_reset: processed outbound mail in 6.8ms
|
339187
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [2708a981-b489-4ae4-8353-06d24c173bef]
|
339188
|
+
Sent mail to one@example.com (3.5ms)
|
339189
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [2708a981-b489-4ae4-8353-06d24c173bef] Date: Tue, 19 Apr 2016 21:42:29 -0500
|
339190
|
+
From: no-reply@rails-identity.com
|
339191
|
+
To: one@example.com
|
339192
|
+
Message-ID: <5716ec95dce3f_35f43fe1308524643895f@galt.local.mail>
|
339193
|
+
Subject: [rails-identity] Password Reset
|
339194
|
+
Mime-Version: 1.0
|
339195
|
+
Content-Type: multipart/alternative;
|
339196
|
+
boundary="--==_mimepart_5716ec95dc508_35f43fe13085246438860";
|
339197
|
+
charset=UTF-8
|
339198
|
+
Content-Transfer-Encoding: 7bit
|
339199
|
+
|
339200
|
+
|
339201
|
+
----==_mimepart_5716ec95dc508_35f43fe13085246438860
|
339202
|
+
Content-Type: text/plain;
|
339203
|
+
charset=UTF-8
|
339204
|
+
Content-Transfer-Encoding: 7bit
|
339205
|
+
|
339206
|
+
Dear one@example.com,
|
339207
|
+
|
339208
|
+
You have requested to reset your password. Here are the user UUID and reset
|
339209
|
+
token. Make a PATCH request on the UUID with the reset token to set a new
|
339210
|
+
password. For instance,
|
339211
|
+
|
339212
|
+
http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
|
339213
|
+
|
339214
|
+
will set the password to "reallysecret" (without quotes) for the user to
|
339215
|
+
whom the reset token was issued.
|
339216
|
+
|
339217
|
+
Here is the reset token: @user.reset_token
|
339218
|
+
|
339219
|
+
Good luck! :)
|
339220
|
+
rails-identity
|
339221
|
+
|
339222
|
+
|
339223
|
+
----==_mimepart_5716ec95dc508_35f43fe13085246438860
|
339224
|
+
Content-Type: text/html;
|
339225
|
+
charset=UTF-8
|
339226
|
+
Content-Transfer-Encoding: 7bit
|
339227
|
+
|
339228
|
+
<html>
|
339229
|
+
<body>
|
339230
|
+
<p>Dear one@example.com,</p>
|
339231
|
+
|
339232
|
+
<p>You have requested to reset your password. Here are the user UUID and
|
339233
|
+
reset token. Make a PATCH request on the UUID with the reset token to set a
|
339234
|
+
new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODY5NjViNDgtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.JInrPmapWNLLaTYnA4RfN8b__fq8xdS5--ZiOWvuM9M password=reallysecret
|
339235
|
+
password_confirmation=reallysecret</pre> will set the password to
|
339236
|
+
<pre>reallysecret</pre> for the user to whom the reset token was issued.
|
339237
|
+
Here is the reset token:</p>
|
339238
|
+
|
339239
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODY5NjViNDgtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.JInrPmapWNLLaTYnA4RfN8b__fq8xdS5--ZiOWvuM9M</pre>
|
339240
|
+
|
339241
|
+
<p>Good luck! :)</p>
|
339242
|
+
<p><b>rails-identity</b></p>
|
339243
|
+
|
339244
|
+
</body>
|
339245
|
+
</html>
|
339246
|
+
|
339247
|
+
----==_mimepart_5716ec95dc508_35f43fe13085246438860--
|
339248
|
+
|
339249
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [2708a981-b489-4ae4-8353-06d24c173bef] Performed ActionMailer::DeliveryJob from Inline(mailers) in 10.81ms
|
339250
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 2708a981-b489-4ae4-8353-06d24c173bef) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
|
339251
|
+
Rendered text template (0.0ms)
|
339252
|
+
Completed 204 No Content in 21ms (Views: 0.3ms | ActiveRecord: 0.9ms)
|
339253
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339254
|
+
[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
|
339255
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
339256
|
+
Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"1"}
|
339257
|
+
Accepts a token
|
339258
|
+
Token well formatted for user 1,
|
339259
|
+
session 1
|
339260
|
+
Cache miss. Try database.
|
339261
|
+
[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"]]
|
339262
|
+
[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"]]
|
339263
|
+
Token well formatted and verified. Set cache.
|
339264
|
+
[1m[35mRailsIdentity::User Load (0.2ms)[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"]]
|
339265
|
+
Attempting to get RailsIdentity::User 1
|
339266
|
+
[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"]]
|
339267
|
+
Checking to see if authorized to access object
|
339268
|
+
Unpermitted parameters: token, id
|
339269
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
339270
|
+
[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
|
339271
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-20 02:42:29.917330"], ["uuid", "1"]]
|
339272
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
339273
|
+
Completed 200 OK in 9ms (Views: 0.5ms | ActiveRecord: 1.7ms)
|
339274
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
339275
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
339276
|
+
--------------------------------------------------------------------------
|
339277
|
+
RailsIdentity::UsersControllerTest: test_update_password_using_reset_token
|
339278
|
+
--------------------------------------------------------------------------
|
339279
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339280
|
+
[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"]]
|
339281
|
+
[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"]]
|
339282
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
339283
|
+
Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
|
339284
|
+
Accepts a token
|
339285
|
+
Token decode error: Nil JSON web token
|
339286
|
+
Suppressing error: Invalid token:
|
339287
|
+
[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"]]
|
339288
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
339289
|
+
[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", "869c5fc0-06a1-11e6-8df6-6c4008a6fa2a"], ["secret", "f1e21756-6431-457a-86b2-dd6949bdd672"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODY5YzVmYzAtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.k02Uc4tq6_zpVc8818agCf5MljpzvSGdeZiFpGHrV04"], ["created_at", "2016-04-20 02:42:29.928241"], ["updated_at", "2016-04-20 02:42:29.928241"]]
|
339290
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
339291
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
339292
|
+
[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
|
339293
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODY5YzVmYzAtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.k02Uc4tq6_zpVc8818agCf5MljpzvSGdeZiFpGHrV04"], ["updated_at", "2016-04-20 02:42:29.930165"], ["uuid", "1"]]
|
339294
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
339295
|
+
[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"]]
|
339296
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [88e47ee3-a856-41e8-a995-d22effa1c12c] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
|
339297
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [88e47ee3-a856-41e8-a995-d22effa1c12c] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (0.1ms)
|
339298
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [88e47ee3-a856-41e8-a995-d22effa1c12c] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (0.0ms)
|
339299
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [88e47ee3-a856-41e8-a995-d22effa1c12c]
|
339300
|
+
RailsIdentity::UserMailer#password_reset: processed outbound mail in 2.5ms
|
339301
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [88e47ee3-a856-41e8-a995-d22effa1c12c]
|
339302
|
+
Sent mail to one@example.com (3.5ms)
|
339303
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [88e47ee3-a856-41e8-a995-d22effa1c12c] Date: Tue, 19 Apr 2016 21:42:29 -0500
|
339304
|
+
From: no-reply@rails-identity.com
|
339305
|
+
To: one@example.com
|
339306
|
+
Message-ID: <5716ec95e4c3b_35f43fe130852464391c0@galt.local.mail>
|
339307
|
+
Subject: [rails-identity] Password Reset
|
339308
|
+
Mime-Version: 1.0
|
339309
|
+
Content-Type: multipart/alternative;
|
339310
|
+
boundary="--==_mimepart_5716ec95e42ef_35f43fe130852464390cc";
|
339311
|
+
charset=UTF-8
|
339312
|
+
Content-Transfer-Encoding: 7bit
|
339313
|
+
|
339314
|
+
|
339315
|
+
----==_mimepart_5716ec95e42ef_35f43fe130852464390cc
|
339316
|
+
Content-Type: text/plain;
|
339317
|
+
charset=UTF-8
|
339318
|
+
Content-Transfer-Encoding: 7bit
|
339319
|
+
|
339320
|
+
Dear one@example.com,
|
339321
|
+
|
339322
|
+
You have requested to reset your password. Here are the user UUID and reset
|
339323
|
+
token. Make a PATCH request on the UUID with the reset token to set a new
|
339324
|
+
password. For instance,
|
339325
|
+
|
339326
|
+
http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
|
339327
|
+
|
339328
|
+
will set the password to "reallysecret" (without quotes) for the user to
|
339329
|
+
whom the reset token was issued.
|
339330
|
+
|
339331
|
+
Here is the reset token: @user.reset_token
|
339332
|
+
|
339333
|
+
Good luck! :)
|
339334
|
+
rails-identity
|
339335
|
+
|
339336
|
+
|
339337
|
+
----==_mimepart_5716ec95e42ef_35f43fe130852464390cc
|
339338
|
+
Content-Type: text/html;
|
339339
|
+
charset=UTF-8
|
339340
|
+
Content-Transfer-Encoding: 7bit
|
339341
|
+
|
339342
|
+
<html>
|
339343
|
+
<body>
|
339344
|
+
<p>Dear one@example.com,</p>
|
339345
|
+
|
339346
|
+
<p>You have requested to reset your password. Here are the user UUID and
|
339347
|
+
reset token. Make a PATCH request on the UUID with the reset token to set a
|
339348
|
+
new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODY5YzVmYzAtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.k02Uc4tq6_zpVc8818agCf5MljpzvSGdeZiFpGHrV04 password=reallysecret
|
339349
|
+
password_confirmation=reallysecret</pre> will set the password to
|
339350
|
+
<pre>reallysecret</pre> for the user to whom the reset token was issued.
|
339351
|
+
Here is the reset token:</p>
|
339352
|
+
|
339353
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODY5YzVmYzAtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.k02Uc4tq6_zpVc8818agCf5MljpzvSGdeZiFpGHrV04</pre>
|
339354
|
+
|
339355
|
+
<p>Good luck! :)</p>
|
339356
|
+
<p><b>rails-identity</b></p>
|
339357
|
+
|
339358
|
+
</body>
|
339359
|
+
</html>
|
339360
|
+
|
339361
|
+
----==_mimepart_5716ec95e42ef_35f43fe130852464390cc--
|
339362
|
+
|
339363
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [88e47ee3-a856-41e8-a995-d22effa1c12c] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.43ms
|
339364
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 88e47ee3-a856-41e8-a995-d22effa1c12c) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
|
339365
|
+
Rendered text template (0.0ms)
|
339366
|
+
Completed 204 No Content in 13ms (Views: 0.3ms | ActiveRecord: 0.5ms)
|
339367
|
+
[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"]]
|
339368
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
339369
|
+
Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODY5YzVmYzAtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.k02Uc4tq6_zpVc8818agCf5MljpzvSGdeZiFpGHrV04", "id"=>"1"}
|
339370
|
+
Accepts a token
|
339371
|
+
Token well formatted for user 1,
|
339372
|
+
session 869c5fc0-06a1-11e6-8df6-6c4008a6fa2a
|
339373
|
+
Cache miss. Try database.
|
339374
|
+
[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"]]
|
339375
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "869c5fc0-06a1-11e6-8df6-6c4008a6fa2a"]]
|
339376
|
+
Token well formatted and verified. Set cache.
|
339377
|
+
[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"]]
|
339378
|
+
Attempting to get RailsIdentity::User 1
|
339379
|
+
[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"]]
|
339380
|
+
Checking to see if authorized to access object
|
339381
|
+
Unpermitted parameters: token, id
|
339382
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
339383
|
+
[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
|
339384
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["password_digest", "$2a$04$hBeRqtUi1/3YQeZon59sVu2SdHLTCHABun2Gggv3UnO4OD1uqPzrO"], ["updated_at", "2016-04-20 02:42:29.950832"], ["uuid", "1"]]
|
339385
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
339386
|
+
Completed 200 OK in 10ms (Views: 0.4ms | ActiveRecord: 1.2ms)
|
339387
|
+
[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"]]
|
339388
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
339389
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
339390
|
+
---------------------------------------------------------------
|
339391
|
+
RailsIdentity::UsersControllerTest: test_public_can_see_options
|
339392
|
+
---------------------------------------------------------------
|
339393
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339394
|
+
Processing by RailsIdentity::UsersController#options as HTML
|
339395
|
+
Rendered text template (0.0ms)
|
339396
|
+
Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
|
339397
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
339398
|
+
[1m[35m (0.1ms)[0m begin transaction
|
339399
|
+
-----------------------------------------------------------------------
|
339400
|
+
RailsIdentity::UsersControllerTest: test_admin_can_create_an_admin_user
|
339401
|
+
-----------------------------------------------------------------------
|
339402
|
+
[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"]]
|
339403
|
+
[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"]]
|
339404
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
339405
|
+
Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxMTcwNTQ5fQ.kdkASSXUwR-sWonmTj1RE0ba4M4h1QI_RJ8g9Igf0fE"}
|
339406
|
+
Accepts a token
|
339407
|
+
Token well formatted for user admin_one,
|
339408
|
+
session session_admin_one
|
339409
|
+
Cache miss. Try database.
|
339410
|
+
[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"]]
|
339411
|
+
[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"]]
|
339412
|
+
Token well formatted and verified. Set cache.
|
339413
|
+
[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"]]
|
339414
|
+
Create new user
|
339415
|
+
Unpermitted parameter: token
|
339416
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
339417
|
+
[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
|
339418
|
+
[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$uhpvCMCgsd3.d3Zax5WSSunHB.iHbheA1dk8OeZJ5mCyf0Lqzi08a"], ["role", 100], ["created_at", "2016-04-20 02:42:29.973142"], ["updated_at", "2016-04-20 02:42:29.973142"], ["uuid", "86a35dc0-06a1-11e6-8df6-6c4008a6fa2a"]]
|
339419
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
339420
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
339421
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["user_uuid", "86a35dc0-06a1-11e6-8df6-6c4008a6fa2a"], ["uuid", "86a3a424-06a1-11e6-8df6-6c4008a6fa2a"], ["secret", "e636e698-df2a-410d-8530-f4a5a2010835"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NmEzNWRjMC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NmEzYTQyNC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.1wkLsvotRy1amRfDvmQw-3jDQsTo1ea6hyZiEq6uGtw"], ["created_at", "2016-04-20 02:42:29.975829"], ["updated_at", "2016-04-20 02:42:29.975829"]]
|
339422
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
339423
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
339424
|
+
[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" != '86a35dc0-06a1-11e6-8df6-6c4008a6fa2a') LIMIT 1
|
339425
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NmEzNWRjMC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NmEzYTQyNC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.1wkLsvotRy1amRfDvmQw-3jDQsTo1ea6hyZiEq6uGtw"], ["updated_at", "2016-04-20 02:42:29.977612"], ["uuid", "86a35dc0-06a1-11e6-8df6-6c4008a6fa2a"]]
|
339426
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
339427
|
+
[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", "86a35dc0-06a1-11e6-8df6-6c4008a6fa2a"]]
|
339428
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [fbdb8d4a-cfd1-4a44-bc40-7a1c6e18f678] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/86a35dc0-06a1-11e6-8df6-6c4008a6fa2a
|
339429
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [fbdb8d4a-cfd1-4a44-bc40-7a1c6e18f678] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
|
339430
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [fbdb8d4a-cfd1-4a44-bc40-7a1c6e18f678] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
|
339431
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [fbdb8d4a-cfd1-4a44-bc40-7a1c6e18f678]
|
339432
|
+
RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.4ms
|
339433
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [fbdb8d4a-cfd1-4a44-bc40-7a1c6e18f678]
|
339434
|
+
Sent mail to foo@example.com (3.7ms)
|
339435
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [fbdb8d4a-cfd1-4a44-bc40-7a1c6e18f678] Date: Tue, 19 Apr 2016 21:42:29 -0500
|
339436
|
+
From: no-reply@rails-identity.com
|
339437
|
+
To: foo@example.com
|
339438
|
+
Message-ID: <5716ec95f05ca_35f43fe13085246439380@galt.local.mail>
|
339439
|
+
Subject: [rails-identity] Email Confirmation
|
339440
|
+
Mime-Version: 1.0
|
339441
|
+
Content-Type: multipart/alternative;
|
339442
|
+
boundary="--==_mimepart_5716ec95efc7f_35f43fe130852464392dc";
|
339443
|
+
charset=UTF-8
|
339444
|
+
Content-Transfer-Encoding: 7bit
|
339445
|
+
|
339446
|
+
|
339447
|
+
----==_mimepart_5716ec95efc7f_35f43fe130852464392dc
|
339448
|
+
Content-Type: text/plain;
|
339449
|
+
charset=UTF-8
|
339450
|
+
Content-Transfer-Encoding: 7bit
|
339451
|
+
|
339452
|
+
Dear foo@example.com,
|
339453
|
+
|
339454
|
+
Please confirm your account with rails-identity by making a PATCH request
|
339455
|
+
on the current user with a provided verification token. For example,
|
339456
|
+
|
339457
|
+
http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NmEzNWRjMC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NmEzYTQyNC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.1wkLsvotRy1amRfDvmQw-3jDQsTo1ea6hyZiEq6uGtw verified=true
|
339458
|
+
|
339459
|
+
will confirm the account. Here is the verification token:
|
339460
|
+
|
339461
|
+
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NmEzNWRjMC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NmEzYTQyNC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.1wkLsvotRy1amRfDvmQw-3jDQsTo1ea6hyZiEq6uGtw
|
339462
|
+
|
339463
|
+
Thank you for using rails-identity,
|
339464
|
+
rails-identity
|
339465
|
+
|
339466
|
+
|
339467
|
+
----==_mimepart_5716ec95efc7f_35f43fe130852464392dc
|
339468
|
+
Content-Type: text/html;
|
339469
|
+
charset=UTF-8
|
339470
|
+
Content-Transfer-Encoding: 7bit
|
339471
|
+
|
339472
|
+
<html>
|
339473
|
+
<body>
|
339474
|
+
<p>Dear foo@example.com,</p>
|
339475
|
+
|
339476
|
+
<p>Please confirm your account with rails-identity by making a PATCH request
|
339477
|
+
on the current user with a provided verification token. For example,
|
339478
|
+
<pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NmEzNWRjMC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NmEzYTQyNC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.1wkLsvotRy1amRfDvmQw-3jDQsTo1ea6hyZiEq6uGtw
|
339479
|
+
verified=true</pre> will confirm the account. Here is the verification
|
339480
|
+
token:</p>
|
339481
|
+
|
339482
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NmEzNWRjMC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NmEzYTQyNC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTEyMDE0OSwiZXhwIjoxNDYxMTIzNzQ5fQ.1wkLsvotRy1amRfDvmQw-3jDQsTo1ea6hyZiEq6uGtw</pre>
|
339483
|
+
|
339484
|
+
<p>Thank you for using rails-identity</p>
|
339485
|
+
<p><b>rails-identity</b></p>
|
339486
|
+
|
339487
|
+
</body>
|
339488
|
+
</html>
|
339489
|
+
|
339490
|
+
----==_mimepart_5716ec95efc7f_35f43fe130852464392dc--
|
339491
|
+
|
339492
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [fbdb8d4a-cfd1-4a44-bc40-7a1c6e18f678] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.57ms
|
339493
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: fbdb8d4a-cfd1-4a44-bc40-7a1c6e18f678) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/86a35dc0-06a1-11e6-8df6-6c4008a6fa2a
|
339494
|
+
Completed 201 Created in 22ms (Views: 0.4ms | ActiveRecord: 1.0ms)
|
339495
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
339496
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
339497
|
+
---------------------------------------------------------------------------
|
339498
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_using_no_token_payload
|
339499
|
+
---------------------------------------------------------------------------
|
339500
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339501
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
339502
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.nKCMvbB49P5K0s1rfV0Qz9ryxDq083WIkfx02zJvX5w", "id"=>"1"}
|
339503
|
+
Requires a token
|
339504
|
+
User UUID or session UUID is nil
|
339505
|
+
Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.nKCMvbB49P5K0s1rfV0Qz9ryxDq083WIkfx02zJvX5w
|
339506
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
339507
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
339508
|
+
[1m[35m (0.1ms)[0m begin transaction
|
339509
|
+
-----------------------------------------------------------------------
|
339510
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_a_nonexisting_user
|
339511
|
+
-----------------------------------------------------------------------
|
339512
|
+
[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"]]
|
339513
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
339514
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"999"}
|
339515
|
+
Requires a token
|
339516
|
+
Token well formatted for user 1,
|
339517
|
+
session 1
|
339518
|
+
Cache miss. Try database.
|
339519
|
+
[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"]]
|
339520
|
+
[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"]]
|
339521
|
+
Token well formatted and verified. Set cache.
|
339522
|
+
[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"]]
|
339523
|
+
Attempting to get RailsIdentity::User 999
|
339524
|
+
[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", "999"]]
|
339525
|
+
RailsIdentity::User 999 cannot be found
|
339526
|
+
Completed 404 Not Found in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
339527
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
339528
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
339529
|
+
------------------------------------------------------------
|
339530
|
+
RailsIdentity::UsersControllerTest: test_show_a_current_user
|
339531
|
+
------------------------------------------------------------
|
339532
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339533
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
339534
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"current"}
|
339535
|
+
Requires a token
|
339536
|
+
Token well formatted for user 1,
|
339537
|
+
session 1
|
339538
|
+
Cache miss. Try database.
|
339539
|
+
[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"]]
|
339540
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339541
|
+
Token well formatted and verified. Set cache.
|
339542
|
+
[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"]]
|
339543
|
+
Attempting to get RailsIdentity::User 1
|
339544
|
+
[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"]]
|
339545
|
+
Checking to see if authorized to access object
|
339546
|
+
Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.2ms)
|
339547
|
+
[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"]]
|
339548
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
339549
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
339550
|
+
------------------------------------------------------------------------------------------------------------
|
339551
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_reset_token_without_username
|
339552
|
+
------------------------------------------------------------------------------------------------------------
|
339553
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339554
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
339555
|
+
Parameters: {"issue_verification_token"=>true, "id"=>"current"}
|
339556
|
+
Accepts a token
|
339557
|
+
Token decode error: Nil JSON web token
|
339558
|
+
Suppressing error: Invalid token:
|
339559
|
+
[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" IS NULL LIMIT 1[0m
|
339560
|
+
RailsIdentity::Errors::ObjectNotFoundError
|
339561
|
+
Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
339562
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
339563
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
339564
|
+
------------------------------------------------------------
|
339565
|
+
RailsIdentity::UsersControllerTest: test_update_current_user
|
339566
|
+
------------------------------------------------------------
|
339567
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339568
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
339569
|
+
Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"current"}
|
339570
|
+
Accepts a token
|
339571
|
+
Token well formatted for user 1,
|
339572
|
+
session 1
|
339573
|
+
Cache miss. Try database.
|
339574
|
+
[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"]]
|
339575
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339576
|
+
Token well formatted and verified. Set cache.
|
339577
|
+
[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"]]
|
339578
|
+
Attempting to get RailsIdentity::User 1
|
339579
|
+
[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"]]
|
339580
|
+
Checking to see if authorized to access object
|
339581
|
+
Unpermitted parameters: token, id
|
339582
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
339583
|
+
[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
|
339584
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["username", "foo@example.com"], ["updated_at", "2016-04-20 02:42:30.028139"], ["uuid", "1"]]
|
339585
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
339586
|
+
Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 0.6ms)
|
339587
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
339588
|
+
[1m[35m (0.1ms)[0m begin transaction
|
339589
|
+
------------------------------------------------------
|
339590
|
+
RailsIdentity::UsersControllerTest: test_update_a_user
|
339591
|
+
------------------------------------------------------
|
339592
|
+
[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"]]
|
339593
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339594
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
339595
|
+
Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"1"}
|
339596
|
+
Accepts a token
|
339597
|
+
Token well formatted for user 1,
|
339598
|
+
session 1
|
339599
|
+
Cache miss. Try database.
|
339600
|
+
[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"]]
|
339601
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339602
|
+
Token well formatted and verified. Set cache.
|
339603
|
+
[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"]]
|
339604
|
+
Attempting to get RailsIdentity::User 1
|
339605
|
+
[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"]]
|
339606
|
+
Checking to see if authorized to access object
|
339607
|
+
Unpermitted parameters: token, id
|
339608
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
339609
|
+
[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
|
339610
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["username", "foo@example.com"], ["updated_at", "2016-04-20 02:42:30.044071"], ["uuid", "1"]]
|
339611
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
339612
|
+
Completed 200 OK in 10ms (Views: 0.5ms | ActiveRecord: 0.7ms)
|
339613
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
339614
|
+
[1m[35m (0.1ms)[0m begin transaction
|
339615
|
+
---------------------------------------------------------------------------------------------
|
339616
|
+
RailsIdentity::UsersControllerTest: test_update_a_user_with_a_new_password_using_old_password
|
339617
|
+
---------------------------------------------------------------------------------------------
|
339618
|
+
[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"]]
|
339619
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339620
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
339621
|
+
Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"1"}
|
339622
|
+
Accepts a token
|
339623
|
+
Token well formatted for user 1,
|
339624
|
+
session 1
|
339625
|
+
Cache miss. Try database.
|
339626
|
+
[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"]]
|
339627
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339628
|
+
Token well formatted and verified. Set cache.
|
339629
|
+
[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"]]
|
339630
|
+
Attempting to get RailsIdentity::User 1
|
339631
|
+
[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"]]
|
339632
|
+
Checking to see if authorized to access object
|
339633
|
+
Unpermitted parameters: old_password, token, id
|
339634
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
339635
|
+
[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
|
339636
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["password_digest", "$2a$04$Bb.EQuqyeiiallt8x9Cj6O9RIPaBIbLx9F4wkl9iZUtaCYpVYF8I2"], ["updated_at", "2016-04-20 02:42:30.125784"], ["uuid", "1"]]
|
339637
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
339638
|
+
Completed 200 OK in 75ms (Views: 0.4ms | ActiveRecord: 0.6ms)
|
339639
|
+
[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"]]
|
339640
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
339641
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
339642
|
+
---------------------------------------------------------------------------------------------
|
339643
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_non-existing_token
|
339644
|
+
---------------------------------------------------------------------------------------------
|
339645
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339646
|
+
[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"]]
|
339647
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
339648
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjExMjAxNTAsImV4cCI6MTQ2MTEyMDIxMH0.rus2iVhMb0g1arFi8UOb9Yv_HDnYplfQJj92k2Uo5zY", "id"=>"1"}
|
339649
|
+
Requires a token
|
339650
|
+
Token well formatted for user 1,
|
339651
|
+
session 1
|
339652
|
+
Cache miss. Try database.
|
339653
|
+
[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"]]
|
339654
|
+
[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"]]
|
339655
|
+
Signature verification raised
|
339656
|
+
Cannot verify token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjExMjAxNTAsImV4cCI6MTQ2MTEyMDIxMH0.rus2iVhMb0g1arFi8UOb9Yv_HDnYplfQJj92k2Uo5zY
|
339657
|
+
Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
339658
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
339659
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
339660
|
+
------------------------------------------------------------------------------------
|
339661
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_password_with_non-reset_token
|
339662
|
+
------------------------------------------------------------------------------------
|
339663
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339664
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
339665
|
+
Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"1"}
|
339666
|
+
Accepts a token
|
339667
|
+
Token well formatted for user 1,
|
339668
|
+
session 1
|
339669
|
+
Cache miss. Try database.
|
339670
|
+
[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"]]
|
339671
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339672
|
+
Token well formatted and verified. Set cache.
|
339673
|
+
[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"]]
|
339674
|
+
Attempting to get RailsIdentity::User 1
|
339675
|
+
[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"]]
|
339676
|
+
Checking to see if authorized to access object
|
339677
|
+
RailsIdentity::Errors::UnauthorizedError
|
339678
|
+
Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
339679
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
339680
|
+
[1m[35m (0.0ms)[0m begin transaction
|
339681
|
+
--------------------------------------------------------------------
|
339682
|
+
RailsIdentity::UsersControllerTest: test_admin_can_delete_other_user
|
339683
|
+
--------------------------------------------------------------------
|
339684
|
+
[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"]]
|
339685
|
+
[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"]]
|
339686
|
+
Processing by RailsIdentity::UsersController#destroy as HTML
|
339687
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxMTcwNTQ5fQ.kdkASSXUwR-sWonmTj1RE0ba4M4h1QI_RJ8g9Igf0fE", "id"=>"1"}
|
339688
|
+
Requires a token
|
339689
|
+
Token well formatted for user admin_one,
|
339690
|
+
session session_admin_one
|
339691
|
+
Cache miss. Try database.
|
339692
|
+
[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"]]
|
339693
|
+
[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"]]
|
339694
|
+
Token well formatted and verified. Set cache.
|
339695
|
+
[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"]]
|
339696
|
+
Attempting to get RailsIdentity::User 1
|
339697
|
+
[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"]]
|
339698
|
+
Checking to see if authorized to access object
|
339699
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
339700
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rails_identity_users" SET "deleted_at" = '2016-04-20 02:42:30.153476' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
|
339701
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
339702
|
+
Rendered text template (0.0ms)
|
339703
|
+
Completed 204 No Content in 5ms (Views: 0.4ms | ActiveRecord: 0.4ms)
|
339704
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
339705
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
339706
|
+
-----------------------------------------------------------------
|
339707
|
+
RailsIdentity::UsersControllerTest: test_admin_can_list_all_users
|
339708
|
+
-----------------------------------------------------------------
|
339709
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339710
|
+
[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"]]
|
339711
|
+
Processing by RailsIdentity::UsersController#index as HTML
|
339712
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxMTcwNTQ5fQ.kdkASSXUwR-sWonmTj1RE0ba4M4h1QI_RJ8g9Igf0fE"}
|
339713
|
+
Requires an admin token
|
339714
|
+
Token well formatted for user admin_one,
|
339715
|
+
session session_admin_one
|
339716
|
+
Cache miss. Try database.
|
339717
|
+
[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"]]
|
339718
|
+
[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"]]
|
339719
|
+
Token well formatted and verified. Set cache.
|
339720
|
+
[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"]]
|
339721
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL[0m
|
339722
|
+
Completed 200 OK in 53ms (Views: 1.2ms | ActiveRecord: 0.3ms)
|
339723
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "rails_identity_sessions"
|
339724
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
339725
|
+
[1m[35m (0.0ms)[0m begin transaction
|
339726
|
+
--------------------------------------------------------------------------------
|
339727
|
+
RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_a_password
|
339728
|
+
--------------------------------------------------------------------------------
|
339729
|
+
[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"]]
|
339730
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
339731
|
+
Parameters: {"username"=>"foo@example.com"}
|
339732
|
+
Accepts a token
|
339733
|
+
Token decode error: Nil JSON web token
|
339734
|
+
Suppressing error: Invalid token:
|
339735
|
+
Create new user
|
339736
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
339737
|
+
[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
|
339738
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
339739
|
+
Completed 400 Bad Request in 3ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
339740
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
339741
|
+
[1m[35m (0.1ms)[0m begin transaction
|
339742
|
+
-------------------------------------------------------------------
|
339743
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_another_user
|
339744
|
+
-------------------------------------------------------------------
|
339745
|
+
[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"]]
|
339746
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
339747
|
+
Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"2"}
|
339748
|
+
Accepts a token
|
339749
|
+
Token well formatted for user 1,
|
339750
|
+
session 1
|
339751
|
+
Cache miss. Try database.
|
339752
|
+
[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"]]
|
339753
|
+
[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"]]
|
339754
|
+
Token well formatted and verified. Set cache.
|
339755
|
+
[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"]]
|
339756
|
+
Attempting to get RailsIdentity::User 2
|
339757
|
+
[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"]]
|
339758
|
+
Checking to see if authorized to access object
|
339759
|
+
RailsIdentity::Errors::UnauthorizedError
|
339760
|
+
Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
339761
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
339762
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
339763
|
+
-----------------------------------------------------------------------------------------------------------
|
339764
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_token_with_invalid_username
|
339765
|
+
-----------------------------------------------------------------------------------------------------------
|
339766
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339767
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
339768
|
+
Parameters: {"issue_verification_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
|
339769
|
+
Accepts a token
|
339770
|
+
Token decode error: Nil JSON web token
|
339771
|
+
Suppressing error: Invalid token:
|
339772
|
+
[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"]]
|
339773
|
+
RailsIdentity::Errors::ObjectNotFoundError
|
339774
|
+
Completed 404 Not Found in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)
|
339775
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
339776
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
339777
|
+
------------------------------------------------------------------------------------------------------
|
339778
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_with_invalid_username
|
339779
|
+
------------------------------------------------------------------------------------------------------
|
339780
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339781
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
339782
|
+
Parameters: {"issue_reset_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
|
339783
|
+
Accepts a token
|
339784
|
+
Token decode error: Nil JSON web token
|
339785
|
+
Suppressing error: Invalid token:
|
339786
|
+
[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"]]
|
339787
|
+
RailsIdentity::Errors::ObjectNotFoundError
|
339788
|
+
Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
339789
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
339790
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
339791
|
+
------------------------------------------------------------------
|
339792
|
+
RailsIdentity::UsersControllerTest: test_public_cannot_show_a_user
|
339793
|
+
------------------------------------------------------------------
|
339794
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339795
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
339796
|
+
Parameters: {"id"=>"1"}
|
339797
|
+
Requires a token
|
339798
|
+
Token decode error: Nil JSON web token
|
339799
|
+
Invalid token:
|
339800
|
+
Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
339801
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
339802
|
+
[1m[35m (0.1ms)[0m begin transaction
|
339803
|
+
------------------------------------------------------
|
339804
|
+
RailsIdentity::UsersControllerTest: test_delete_a_user
|
339805
|
+
------------------------------------------------------
|
339806
|
+
[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"]]
|
339807
|
+
Processing by RailsIdentity::UsersController#destroy as HTML
|
339808
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"1"}
|
339809
|
+
Requires a token
|
339810
|
+
Token well formatted for user 1,
|
339811
|
+
session 1
|
339812
|
+
Cache miss. Try database.
|
339813
|
+
[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"]]
|
339814
|
+
[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"]]
|
339815
|
+
Token well formatted and verified. Set cache.
|
339816
|
+
[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"]]
|
339817
|
+
Attempting to get RailsIdentity::User 1
|
339818
|
+
[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"]]
|
339819
|
+
Checking to see if authorized to access object
|
339820
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
339821
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "rails_identity_users" SET "deleted_at" = '2016-04-20 02:42:30.251826' WHERE "rails_identity_users"."uuid" = ?[0m [["uuid", "1"]]
|
339822
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
339823
|
+
Rendered text template (0.0ms)
|
339824
|
+
Completed 204 No Content in 6ms (Views: 0.4ms | ActiveRecord: 0.6ms)
|
339825
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
339826
|
+
[1m[35m (0.0ms)[0m begin transaction
|
339827
|
+
----------------------------------------------------------------------------------------
|
339828
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_bogus_payload
|
339829
|
+
----------------------------------------------------------------------------------------
|
339830
|
+
[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"]]
|
339831
|
+
[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"]]
|
339832
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
339833
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE1MCwiZXhwIjoxNDYxMTIwMjEwfQ.91u_cAg0AfnlU-_F-f_UMczzZ7fjC3Gj07pZYbTm404", "id"=>"1"}
|
339834
|
+
Requires a token
|
339835
|
+
Token well formatted for user 1,
|
339836
|
+
session doesnotexist
|
339837
|
+
Cache miss. Try database.
|
339838
|
+
[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"]]
|
339839
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "doesnotexist"]]
|
339840
|
+
Well-formed but invalid session token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE1MCwiZXhwIjoxNDYxMTIwMjEwfQ.91u_cAg0AfnlU-_F-f_UMczzZ7fjC3Gj07pZYbTm404
|
339841
|
+
Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
339842
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
339843
|
+
[1m[35m (0.0ms)[0m begin transaction
|
339844
|
+
----------------------------------------------------
|
339845
|
+
RailsIdentity::UsersControllerTest: test_show_a_user
|
339846
|
+
----------------------------------------------------
|
339847
|
+
[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"]]
|
339848
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
339849
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"1"}
|
339850
|
+
Requires a token
|
339851
|
+
Token well formatted for user 1,
|
339852
|
+
session 1
|
339853
|
+
Cache miss. Try database.
|
339854
|
+
[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"]]
|
339855
|
+
[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"]]
|
339856
|
+
Token well formatted and verified. Set cache.
|
339857
|
+
[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"]]
|
339858
|
+
Attempting to get RailsIdentity::User 1
|
339859
|
+
[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"]]
|
339860
|
+
Checking to see if authorized to access object
|
339861
|
+
Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms)
|
339862
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339863
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
339864
|
+
[1m[35m (0.0ms)[0m begin transaction
|
339865
|
+
---------------------------------------------------------------
|
339866
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_other_user
|
339867
|
+
---------------------------------------------------------------
|
339868
|
+
[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"]]
|
339869
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
339870
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"2"}
|
339871
|
+
Requires a token
|
339872
|
+
Token well formatted for user 1,
|
339873
|
+
session 1
|
339874
|
+
Cache miss. Try database.
|
339875
|
+
[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"]]
|
339876
|
+
[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"]]
|
339877
|
+
Token well formatted and verified. Set cache.
|
339878
|
+
[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"]]
|
339879
|
+
Attempting to get RailsIdentity::User 2
|
339880
|
+
[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"]]
|
339881
|
+
Checking to see if authorized to access object
|
339882
|
+
RailsIdentity::Errors::UnauthorizedError
|
339883
|
+
Completed 401 Unauthorized in 4ms (Views: 0.1ms | ActiveRecord: 0.2ms)
|
339884
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
339885
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
339886
|
+
------------------------------------------------------------------
|
339887
|
+
RailsIdentity::UsersControllerTest: test_admin_can_show_other_user
|
339888
|
+
------------------------------------------------------------------
|
339889
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339890
|
+
[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"]]
|
339891
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
339892
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxMTcwNTQ5fQ.kdkASSXUwR-sWonmTj1RE0ba4M4h1QI_RJ8g9Igf0fE", "id"=>"1"}
|
339893
|
+
Requires a token
|
339894
|
+
Token well formatted for user admin_one,
|
339895
|
+
session session_admin_one
|
339896
|
+
Cache miss. Try database.
|
339897
|
+
[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"]]
|
339898
|
+
[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"]]
|
339899
|
+
Token well formatted and verified. Set cache.
|
339900
|
+
[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"]]
|
339901
|
+
Attempting to get RailsIdentity::User 1
|
339902
|
+
[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"]]
|
339903
|
+
Checking to see if authorized to access object
|
339904
|
+
Completed 200 OK in 4ms (Views: 0.4ms | ActiveRecord: 0.1ms)
|
339905
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
339906
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
339907
|
+
-------------------------------------------------------------------
|
339908
|
+
RailsIdentity::UsersControllerTest: test_cannot_delete_another_user
|
339909
|
+
-------------------------------------------------------------------
|
339910
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339911
|
+
Processing by RailsIdentity::UsersController#destroy as HTML
|
339912
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"2"}
|
339913
|
+
Requires a token
|
339914
|
+
Token well formatted for user 1,
|
339915
|
+
session 1
|
339916
|
+
Cache miss. Try database.
|
339917
|
+
[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"]]
|
339918
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339919
|
+
Token well formatted and verified. Set cache.
|
339920
|
+
[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"]]
|
339921
|
+
Attempting to get RailsIdentity::User 2
|
339922
|
+
[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"]]
|
339923
|
+
Checking to see if authorized to access object
|
339924
|
+
RailsIdentity::Errors::UnauthorizedError
|
339925
|
+
Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
339926
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
339927
|
+
[1m[35m (0.0ms)[0m begin transaction
|
339928
|
+
----------------------------------------------------------------------------
|
339929
|
+
RailsIdentity::SessionsControllerTest: test_admin_can_delete_other's_session
|
339930
|
+
----------------------------------------------------------------------------
|
339931
|
+
[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"]]
|
339932
|
+
[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"]]
|
339933
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
339934
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxMTcwNTQ5fQ.kdkASSXUwR-sWonmTj1RE0ba4M4h1QI_RJ8g9Igf0fE", "id"=>"1"}
|
339935
|
+
Requires a token
|
339936
|
+
Token well formatted for user admin_one,
|
339937
|
+
session session_admin_one
|
339938
|
+
Cache miss. Try database.
|
339939
|
+
[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"]]
|
339940
|
+
[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"]]
|
339941
|
+
Token well formatted and verified. Set cache.
|
339942
|
+
[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"]]
|
339943
|
+
Attempting to get RailsIdentity::Session 1
|
339944
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339945
|
+
Checking to see if authorized to access object
|
339946
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
339947
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
|
339948
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
339949
|
+
Rendered text template (0.0ms)
|
339950
|
+
Completed 204 No Content in 8ms (Views: 2.2ms | ActiveRecord: 0.5ms)
|
339951
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
339952
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
339953
|
+
-------------------------------------------------------------------------
|
339954
|
+
RailsIdentity::SessionsControllerTest: test_cannot_delete_other's_session
|
339955
|
+
-------------------------------------------------------------------------
|
339956
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339957
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
339958
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"2"}
|
339959
|
+
Requires a token
|
339960
|
+
Token well formatted for user 1,
|
339961
|
+
session 1
|
339962
|
+
Cache miss. Try database.
|
339963
|
+
[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"]]
|
339964
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339965
|
+
Token well formatted and verified. Set cache.
|
339966
|
+
[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"]]
|
339967
|
+
Attempting to get RailsIdentity::Session 2
|
339968
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2"]]
|
339969
|
+
Checking to see if authorized to access object
|
339970
|
+
[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"]]
|
339971
|
+
RailsIdentity::Errors::UnauthorizedError
|
339972
|
+
Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
339973
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
339974
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
339975
|
+
-----------------------------------------------------------------------------
|
339976
|
+
RailsIdentity::SessionsControllerTest: test_cannot_show_a_nonexisting_session
|
339977
|
+
-----------------------------------------------------------------------------
|
339978
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339979
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
339980
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"999"}
|
339981
|
+
Requires a token
|
339982
|
+
Token well formatted for user 1,
|
339983
|
+
session 1
|
339984
|
+
Cache miss. Try database.
|
339985
|
+
[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"]]
|
339986
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
339987
|
+
Token well formatted and verified. Set cache.
|
339988
|
+
[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"]]
|
339989
|
+
Attempting to get RailsIdentity::Session 999
|
339990
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "999"]]
|
339991
|
+
RailsIdentity::Session 999 cannot be found
|
339992
|
+
Completed 404 Not Found in 4ms (Views: 0.1ms | ActiveRecord: 0.1ms)
|
339993
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
339994
|
+
[1m[35m (0.1ms)[0m begin transaction
|
339995
|
+
----------------------------------------------------------------------------
|
339996
|
+
RailsIdentity::SessionsControllerTest: test_user_cannot_list_expired_session
|
339997
|
+
----------------------------------------------------------------------------
|
339998
|
+
[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"]]
|
339999
|
+
[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"]]
|
340000
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
340001
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "86da06ae-06a1-11e6-8df6-6c4008a6fa2a"], ["secret", "809242e7-f02e-4fd6-ba36-e104e1ec41c7"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODZkYTA2YWUtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE1MCwiZXhwIjoxNDYxMTIwMTQ5fQ.nNIRs7lOoSD5EZb5is_sOwU8C5uH72tXz0P5HSOnFOU"], ["created_at", "2016-04-20 02:42:30.332302"], ["updated_at", "2016-04-20 02:42:30.332302"]]
|
340002
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
340003
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
340004
|
+
Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU"}
|
340005
|
+
Requires a token
|
340006
|
+
Token well formatted for user 1,
|
340007
|
+
session 1
|
340008
|
+
Cache miss. Try database.
|
340009
|
+
[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"]]
|
340010
|
+
[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"]]
|
340011
|
+
Token well formatted and verified. Set cache.
|
340012
|
+
[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"]]
|
340013
|
+
Attempting to get user 1
|
340014
|
+
Attempting to get RailsIdentity::User 1
|
340015
|
+
[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"]]
|
340016
|
+
Checking to see if authorized to access object
|
340017
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
|
340018
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [9f9560aa-8f2f-405c-b478-4875271e72c2] Performing RailsIdentity::SessionsCleanupJob from Inline(default) with arguments: "86da06ae-06a1-11e6-8df6-6c4008a6fa2a"
|
340019
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [9f9560aa-8f2f-405c-b478-4875271e72c2] [1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "86da06ae-06a1-11e6-8df6-6c4008a6fa2a"]]
|
340020
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [9f9560aa-8f2f-405c-b478-4875271e72c2] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
340021
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [9f9560aa-8f2f-405c-b478-4875271e72c2] [1m[36mSQL (0.2ms)[0m [1mDELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ?[0m [["uuid", "86da06ae-06a1-11e6-8df6-6c4008a6fa2a"]]
|
340022
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [9f9560aa-8f2f-405c-b478-4875271e72c2] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
340023
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [9f9560aa-8f2f-405c-b478-4875271e72c2] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 1.27ms
|
340024
|
+
[ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: 9f9560aa-8f2f-405c-b478-4875271e72c2) to Inline(default) with arguments: "86da06ae-06a1-11e6-8df6-6c4008a6fa2a"
|
340025
|
+
Completed 200 OK in 8ms (Views: 0.5ms | ActiveRecord: 0.6ms)
|
340026
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
340027
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340028
|
+
---------------------------------------------------------------------------------------------------
|
340029
|
+
RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions_using_user_id_in_routing
|
340030
|
+
---------------------------------------------------------------------------------------------------
|
340031
|
+
[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"]]
|
340032
|
+
[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"]]
|
340033
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
340034
|
+
Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU"}
|
340035
|
+
Requires a token
|
340036
|
+
Token well formatted for user 1,
|
340037
|
+
session 1
|
340038
|
+
Cache miss. Try database.
|
340039
|
+
[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"]]
|
340040
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340041
|
+
Token well formatted and verified. Set cache.
|
340042
|
+
[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"]]
|
340043
|
+
Attempting to get user 1
|
340044
|
+
Attempting to get RailsIdentity::User 1
|
340045
|
+
[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"]]
|
340046
|
+
Checking to see if authorized to access object
|
340047
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'[0m
|
340048
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [1ab507a9-d527-483f-9513-38cc9b754ed5] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
|
340049
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [1ab507a9-d527-483f-9513-38cc9b754ed5] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 0.07ms
|
340050
|
+
[ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: 1ab507a9-d527-483f-9513-38cc9b754ed5) to Inline(default)
|
340051
|
+
Completed 200 OK in 6ms (Views: 0.6ms | ActiveRecord: 0.2ms)
|
340052
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
|
340053
|
+
[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"]]
|
340054
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
340055
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340056
|
+
-------------------------------------------------------------------------
|
340057
|
+
RailsIdentity::SessionsControllerTest: test_public_cannot_create_sessions
|
340058
|
+
-------------------------------------------------------------------------
|
340059
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340060
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
340061
|
+
Requires a token
|
340062
|
+
Token decode error: Nil JSON web token
|
340063
|
+
Invalid token:
|
340064
|
+
Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
340065
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
340066
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340067
|
+
------------------------------------------------------------------------------------
|
340068
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_username
|
340069
|
+
------------------------------------------------------------------------------------
|
340070
|
+
[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"]]
|
340071
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
340072
|
+
Parameters: {"password"=>"[FILTERED]"}
|
340073
|
+
[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
|
340074
|
+
Attempting to get user
|
340075
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
340076
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
340077
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340078
|
+
-----------------------------------------------------------------------
|
340079
|
+
RailsIdentity::SessionsControllerTest: test_public_cannot_list_sessions
|
340080
|
+
-----------------------------------------------------------------------
|
340081
|
+
[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"]]
|
340082
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
340083
|
+
Requires a token
|
340084
|
+
Token decode error: Nil JSON web token
|
340085
|
+
Invalid token:
|
340086
|
+
Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
340087
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
340088
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340089
|
+
--------------------------------------------------------------------
|
340090
|
+
RailsIdentity::SessionsControllerTest: test_delete_a_current_session
|
340091
|
+
--------------------------------------------------------------------
|
340092
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340093
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
340094
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"current"}
|
340095
|
+
Requires a token
|
340096
|
+
Token well formatted for user 1,
|
340097
|
+
session 1
|
340098
|
+
Cache miss. Try database.
|
340099
|
+
[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"]]
|
340100
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340101
|
+
Token well formatted and verified. Set cache.
|
340102
|
+
[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"]]
|
340103
|
+
Attempting to get RailsIdentity::Session 1
|
340104
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340105
|
+
Checking to see if authorized to access object
|
340106
|
+
[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"]]
|
340107
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
340108
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ?[0m [["uuid", "1"]]
|
340109
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
340110
|
+
Rendered text template (0.0ms)
|
340111
|
+
Completed 204 No Content in 6ms (Views: 0.3ms | ActiveRecord: 0.4ms)
|
340112
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
340113
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340114
|
+
-----------------------------------------------------------------------------------
|
340115
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_if_not_verified
|
340116
|
+
-----------------------------------------------------------------------------------
|
340117
|
+
[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"]]
|
340118
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340119
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
340120
|
+
[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
|
340121
|
+
[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-20 02:42:30.385492"], ["uuid", "1"]]
|
340122
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
340123
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
340124
|
+
Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
|
340125
|
+
[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"]]
|
340126
|
+
RailsIdentity::Errors::UnauthorizedError
|
340127
|
+
Completed 401 Unauthorized in 69ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
340128
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
340129
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
340130
|
+
--------------------------------------------------------------------------
|
340131
|
+
RailsIdentity::SessionsControllerTest: test_admin_can_show_other's_session
|
340132
|
+
--------------------------------------------------------------------------
|
340133
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340134
|
+
[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"]]
|
340135
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
340136
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxMTcwNTQ5fQ.kdkASSXUwR-sWonmTj1RE0ba4M4h1QI_RJ8g9Igf0fE", "id"=>"1"}
|
340137
|
+
Requires a token
|
340138
|
+
Token well formatted for user admin_one,
|
340139
|
+
session session_admin_one
|
340140
|
+
Cache miss. Try database.
|
340141
|
+
[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"]]
|
340142
|
+
[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"]]
|
340143
|
+
Token well formatted and verified. Set cache.
|
340144
|
+
[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"]]
|
340145
|
+
Attempting to get RailsIdentity::Session 1
|
340146
|
+
[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"]]
|
340147
|
+
Checking to see if authorized to access object
|
340148
|
+
Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 0.2ms)
|
340149
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
340150
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340151
|
+
-----------------------------------------------------------------------
|
340152
|
+
RailsIdentity::SessionsControllerTest: test_cannot_show_other's_session
|
340153
|
+
-----------------------------------------------------------------------
|
340154
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340155
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
340156
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"2"}
|
340157
|
+
Requires a token
|
340158
|
+
Token well formatted for user 1,
|
340159
|
+
session 1
|
340160
|
+
Cache miss. Try database.
|
340161
|
+
[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"]]
|
340162
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340163
|
+
Token well formatted and verified. Set cache.
|
340164
|
+
[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"]]
|
340165
|
+
Attempting to get RailsIdentity::Session 2
|
340166
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2"]]
|
340167
|
+
Checking to see if authorized to access object
|
340168
|
+
[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"]]
|
340169
|
+
RailsIdentity::Errors::UnauthorizedError
|
340170
|
+
Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
340171
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
340172
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
340173
|
+
------------------------------------------------------------
|
340174
|
+
RailsIdentity::SessionsControllerTest: test_delete_a_session
|
340175
|
+
------------------------------------------------------------
|
340176
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340177
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
340178
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"1"}
|
340179
|
+
Requires a token
|
340180
|
+
Token well formatted for user 1,
|
340181
|
+
session 1
|
340182
|
+
Cache miss. Try database.
|
340183
|
+
[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"]]
|
340184
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340185
|
+
Token well formatted and verified. Set cache.
|
340186
|
+
[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"]]
|
340187
|
+
Attempting to get RailsIdentity::Session 1
|
340188
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340189
|
+
Checking to see if authorized to access object
|
340190
|
+
[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"]]
|
340191
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
340192
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ?[0m [["uuid", "1"]]
|
340193
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
340194
|
+
Rendered text template (0.0ms)
|
340195
|
+
Completed 204 No Content in 6ms (Views: 0.3ms | ActiveRecord: 0.4ms)
|
340196
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
340197
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340198
|
+
------------------------------------------------------------------
|
340199
|
+
RailsIdentity::SessionsControllerTest: test_show_a_current_session
|
340200
|
+
------------------------------------------------------------------
|
340201
|
+
[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"]]
|
340202
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
340203
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"current"}
|
340204
|
+
Requires a token
|
340205
|
+
Token well formatted for user 1,
|
340206
|
+
session 1
|
340207
|
+
Cache miss. Try database.
|
340208
|
+
[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"]]
|
340209
|
+
[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"]]
|
340210
|
+
Token well formatted and verified. Set cache.
|
340211
|
+
[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"]]
|
340212
|
+
Attempting to get RailsIdentity::Session 1
|
340213
|
+
[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"]]
|
340214
|
+
Checking to see if authorized to access object
|
340215
|
+
[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"]]
|
340216
|
+
Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 0.2ms)
|
340217
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
340218
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340219
|
+
-----------------------------------------------------------------------------
|
340220
|
+
RailsIdentity::SessionsControllerTest: test_user_cannot_list_other's_sessions
|
340221
|
+
-----------------------------------------------------------------------------
|
340222
|
+
[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"]]
|
340223
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
|
340224
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
340225
|
+
Parameters: {"user_id"=>"2", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU"}
|
340226
|
+
Requires a token
|
340227
|
+
Token well formatted for user 1,
|
340228
|
+
session 1
|
340229
|
+
Cache miss. Try database.
|
340230
|
+
[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"]]
|
340231
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340232
|
+
Token well formatted and verified. Set cache.
|
340233
|
+
[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"]]
|
340234
|
+
Attempting to get user 2
|
340235
|
+
Attempting to get RailsIdentity::User 2
|
340236
|
+
[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"]]
|
340237
|
+
Checking to see if authorized to access object
|
340238
|
+
Not authorized to access user 2
|
340239
|
+
Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
340240
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
340241
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340242
|
+
------------------------------------------------------------------
|
340243
|
+
RailsIdentity::SessionsControllerTest: test_public_can_see_options
|
340244
|
+
------------------------------------------------------------------
|
340245
|
+
[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"]]
|
340246
|
+
Processing by RailsIdentity::SessionsController#options as HTML
|
340247
|
+
Rendered text template (0.0ms)
|
340248
|
+
Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
|
340249
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
340250
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340251
|
+
-----------------------------------------------------------------------
|
340252
|
+
RailsIdentity::SessionsControllerTest: test_cannot_show_expired_session
|
340253
|
+
-----------------------------------------------------------------------
|
340254
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340255
|
+
[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"]]
|
340256
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
340257
|
+
[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", "86f63bf8-06a1-11e6-8df6-6c4008a6fa2a"], ["secret", "abf84d34-ec15-4c90-a102-c311d87dea50"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODZmNjNiZjgtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE1MCwiZXhwIjoxNDYxMTIwMTQ5fQ.2ROdGH9PhnXtG9wqUqQV9JEmRjFENwvw2FsoEaxUMww"], ["created_at", "2016-04-20 02:42:30.517154"], ["updated_at", "2016-04-20 02:42:30.517154"]]
|
340258
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
340259
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
340260
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"86f63bf8-06a1-11e6-8df6-6c4008a6fa2a"}
|
340261
|
+
Requires a token
|
340262
|
+
Token well formatted for user 1,
|
340263
|
+
session 1
|
340264
|
+
Cache miss. Try database.
|
340265
|
+
[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"]]
|
340266
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340267
|
+
Token well formatted and verified. Set cache.
|
340268
|
+
[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"]]
|
340269
|
+
Attempting to get RailsIdentity::Session 86f63bf8-06a1-11e6-8df6-6c4008a6fa2a
|
340270
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "86f63bf8-06a1-11e6-8df6-6c4008a6fa2a"]]
|
340271
|
+
Checking to see if authorized to access object
|
340272
|
+
[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"]]
|
340273
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
340274
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ?[0m [["uuid", "86f63bf8-06a1-11e6-8df6-6c4008a6fa2a"]]
|
340275
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
340276
|
+
RailsIdentity::Errors::ObjectNotFoundError
|
340277
|
+
Completed 404 Not Found in 7ms (Views: 0.2ms | ActiveRecord: 0.6ms)
|
340278
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
340279
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340280
|
+
--------------------------------------------------------------------------------------
|
340281
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_a_password
|
340282
|
+
--------------------------------------------------------------------------------------
|
340283
|
+
[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"]]
|
340284
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340285
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
340286
|
+
Parameters: {"username"=>"one@example.com"}
|
340287
|
+
[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"]]
|
340288
|
+
Attempting to get user
|
340289
|
+
Completed 401 Unauthorized in 64ms (Views: 0.3ms | ActiveRecord: 0.1ms)
|
340290
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
340291
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340292
|
+
------------------------------------------------------------
|
340293
|
+
RailsIdentity::SessionsControllerTest: test_create_a_session
|
340294
|
+
------------------------------------------------------------
|
340295
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340296
|
+
[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"]]
|
340297
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
340298
|
+
Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
|
340299
|
+
[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"]]
|
340300
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
340301
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "870d77a0-06a1-11e6-8df6-6c4008a6fa2a"], ["secret", "6fd37376-4f6b-4790-b9cb-625bc21f99d8"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODcwZDc3YTAtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE1MCwiZXhwIjoxNDYyMzI5NzUwfQ.CCmN_HhbBM4RqOqiQONcXnR-S0wbATkd2VUiacib-b0"], ["created_at", "2016-04-20 02:42:30.669796"], ["updated_at", "2016-04-20 02:42:30.669796"]]
|
340302
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
340303
|
+
Completed 201 Created in 68ms (Views: 0.4ms | ActiveRecord: 0.5ms)
|
340304
|
+
[1m[35m (1.1ms)[0m rollback transaction
|
340305
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
340306
|
+
----------------------------------------------------------------------
|
340307
|
+
RailsIdentity::SessionsControllerTest: test_public_cannot_show_session
|
340308
|
+
----------------------------------------------------------------------
|
340309
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340310
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
340311
|
+
Parameters: {"id"=>"1"}
|
340312
|
+
Requires a token
|
340313
|
+
Token decode error: Nil JSON web token
|
340314
|
+
Invalid token:
|
340315
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
340316
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
340317
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340318
|
+
--------------------------------------------------------------------------------
|
340319
|
+
RailsIdentity::SessionsControllerTest: test_cannot_delete_a_non-existent_session
|
340320
|
+
--------------------------------------------------------------------------------
|
340321
|
+
[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"]]
|
340322
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
340323
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"999"}
|
340324
|
+
Requires a token
|
340325
|
+
Token well formatted for user 1,
|
340326
|
+
session 1
|
340327
|
+
Cache miss. Try database.
|
340328
|
+
[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"]]
|
340329
|
+
[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"]]
|
340330
|
+
Token well formatted and verified. Set cache.
|
340331
|
+
[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"]]
|
340332
|
+
Attempting to get RailsIdentity::Session 999
|
340333
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "999"]]
|
340334
|
+
RailsIdentity::Session 999 cannot be found
|
340335
|
+
Completed 404 Not Found in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
340336
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
340337
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
340338
|
+
--------------------------------------------------------------------------
|
340339
|
+
RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions
|
340340
|
+
--------------------------------------------------------------------------
|
340341
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340342
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
340343
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU"}
|
340344
|
+
Requires a token
|
340345
|
+
Token well formatted for user 1,
|
340346
|
+
session 1
|
340347
|
+
Cache miss. Try database.
|
340348
|
+
[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"]]
|
340349
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340350
|
+
Token well formatted and verified. Set cache.
|
340351
|
+
[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"]]
|
340352
|
+
Attempting to get user
|
340353
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
|
340354
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [7329e716-93c4-4ebb-bf8b-7eef5f978109] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
|
340355
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [7329e716-93c4-4ebb-bf8b-7eef5f978109] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 0.06ms
|
340356
|
+
[ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: 7329e716-93c4-4ebb-bf8b-7eef5f978109) to Inline(default)
|
340357
|
+
Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 0.2ms)
|
340358
|
+
[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"]]
|
340359
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
|
340360
|
+
[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"]]
|
340361
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
340362
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
340363
|
+
-----------------------------------------------------------------------------------------
|
340364
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_a_wrong_password
|
340365
|
+
-----------------------------------------------------------------------------------------
|
340366
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340367
|
+
[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"]]
|
340368
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
340369
|
+
Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
|
340370
|
+
[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"]]
|
340371
|
+
Attempting to get user
|
340372
|
+
Completed 401 Unauthorized in 64ms (Views: 0.3ms | ActiveRecord: 0.0ms)
|
340373
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
340374
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340375
|
+
----------------------------------------------------------
|
340376
|
+
RailsIdentity::SessionsControllerTest: test_show_a_session
|
340377
|
+
----------------------------------------------------------
|
340378
|
+
[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"]]
|
340379
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
340380
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjExNzA1NDl9.2H12-mcuKeYTIAoqKmgj2AnZXqFFE9ZxpIeGWcBmYfU", "id"=>"1"}
|
340381
|
+
Requires a token
|
340382
|
+
Token well formatted for user 1,
|
340383
|
+
session 1
|
340384
|
+
Cache miss. Try database.
|
340385
|
+
[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"]]
|
340386
|
+
[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"]]
|
340387
|
+
Token well formatted and verified. Set cache.
|
340388
|
+
[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"]]
|
340389
|
+
Attempting to get RailsIdentity::Session 1
|
340390
|
+
[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"]]
|
340391
|
+
Checking to see if authorized to access object
|
340392
|
+
[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"]]
|
340393
|
+
Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 0.2ms)
|
340394
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
340395
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340396
|
+
----------------------------------------------------------------------------------------------
|
340397
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_non-existent_username
|
340398
|
+
----------------------------------------------------------------------------------------------
|
340399
|
+
[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"]]
|
340400
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
340401
|
+
Parameters: {"username"=>"idontexist", "password"=>"[FILTERED]"}
|
340402
|
+
[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", "idontexist"]]
|
340403
|
+
Attempting to get user
|
340404
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
340405
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
340406
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340407
|
+
----------------------------------------------------------------------
|
340408
|
+
RailsIdentity::UserTest: test_user_is_valid_with_username_and_password
|
340409
|
+
----------------------------------------------------------------------
|
340410
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
340411
|
+
[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
|
340412
|
+
[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$Uqe/dKVD2fW6CjteQv42TekHdcP5rglHHkdVy65wyMV2ZTnn9oKQW"], ["role", 10], ["created_at", "2016-04-20 02:42:30.829301"], ["updated_at", "2016-04-20 02:42:30.829301"], ["uuid", "8725ff28-06a1-11e6-8df6-6c4008a6fa2a"]]
|
340413
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
340414
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
340415
|
+
[1m[35m (0.1ms)[0m begin transaction
|
340416
|
+
-----------------------------------------------------------------
|
340417
|
+
RailsIdentity::UserTest: test_user_can_issue_a_verification_token
|
340418
|
+
-----------------------------------------------------------------
|
340419
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
340420
|
+
[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
|
340421
|
+
[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$AOy0SVJE4a21dpaw91x1Iu7b5LPEvQ0z5o32ziSdomJJ1PgUperva"], ["role", 10], ["created_at", "2016-04-20 02:42:30.834024"], ["updated_at", "2016-04-20 02:42:30.834024"], ["uuid", "8726b6fc-06a1-11e6-8df6-6c4008a6fa2a"]]
|
340422
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
340423
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
340424
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "8726b6fc-06a1-11e6-8df6-6c4008a6fa2a"], ["uuid", "8726ecb2-06a1-11e6-8df6-6c4008a6fa2a"], ["secret", "695c7893-37b8-4f22-8f4f-68e36ad98dd8"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NzI2YjZmYy0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NzI2ZWNiMi0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMTIwMTUwLCJleHAiOjE0NjExMjM3NTB9.FezjSQSJ2tmTkaHTuVKw7aiwhNezP7O1JvR056RqKsE"], ["created_at", "2016-04-20 02:42:30.836382"], ["updated_at", "2016-04-20 02:42:30.836382"]]
|
340425
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
340426
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
340427
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340428
|
+
------------------------------------------------------------------
|
340429
|
+
RailsIdentity::UserTest: test_user_is_not_valid_without_a_password
|
340430
|
+
------------------------------------------------------------------
|
340431
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
340432
|
+
[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
|
340433
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
340434
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
340435
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340436
|
+
---------------------------------------------------------------------------
|
340437
|
+
RailsIdentity::UserTest: test_user_is_not_valid_if_username_is_malformatted
|
340438
|
+
---------------------------------------------------------------------------
|
340439
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
340440
|
+
[1m[35mRailsIdentity::User Exists (0.1ms)[0m SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
|
340441
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
340442
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
340443
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340444
|
+
----------------------------------------------------------
|
340445
|
+
RailsIdentity::UserTest: test_user_can_issue_a_reset_token
|
340446
|
+
----------------------------------------------------------
|
340447
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
340448
|
+
[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
|
340449
|
+
[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$3ogkUmOwkRlSlOHoRBmACu0diriJqT5Zqin1oBkGjyjo2e2Ttal5i"], ["role", 10], ["created_at", "2016-04-20 02:42:30.848162"], ["updated_at", "2016-04-20 02:42:30.848162"], ["uuid", "8728e044-06a1-11e6-8df6-6c4008a6fa2a"]]
|
340450
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
340451
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
340452
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["user_uuid", "8728e044-06a1-11e6-8df6-6c4008a6fa2a"], ["uuid", "87291578-06a1-11e6-8df6-6c4008a6fa2a"], ["secret", "6924fcb7-e0cb-4ca1-8444-4ddade2cdddf"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI4NzI4ZTA0NC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI4NzI5MTU3OC0wNmExLTExZTYtOGRmNi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMTIwMTUwLCJleHAiOjE0NjExMjM3NTB9.sRUB6xSBDyVkaLis_WghvkWVIUIn3r_PrqLGo8s9Jy8"], ["created_at", "2016-04-20 02:42:30.850371"], ["updated_at", "2016-04-20 02:42:30.850371"]]
|
340453
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
340454
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
340455
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340456
|
+
------------------------------------------------------------------
|
340457
|
+
RailsIdentity::UserTest: test_user_is_not_valid_without_a_username
|
340458
|
+
------------------------------------------------------------------
|
340459
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
340460
|
+
[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
|
340461
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
340462
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
340463
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340464
|
+
---------------------------------------------------------------
|
340465
|
+
RailsIdentity::UserTest: test_user_has_a_role_of_100_by_default
|
340466
|
+
---------------------------------------------------------------
|
340467
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
340468
|
+
[1m[36mRailsIdentity::User Exists (0.2ms)[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
|
340469
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?) [["username", "new@example.com"], ["password_digest", "$2a$04$LcUEr6ca5wbwG2s/LC.mNeJiB5lbV4Wbf3N43sUTkfaJR2u.EQO2u"], ["role", 10], ["created_at", "2016-04-20 02:42:30.860145"], ["updated_at", "2016-04-20 02:42:30.860145"], ["uuid", "872ab694-06a1-11e6-8df6-6c4008a6fa2a"]]
|
340470
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
340471
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
340472
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340473
|
+
--------------------------------------------------------------------------
|
340474
|
+
RailsIdentity::UserTest: test_user_is_not_valid_if_username_already_exists
|
340475
|
+
--------------------------------------------------------------------------
|
340476
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
340477
|
+
[1m[36mRailsIdentity::User Exists (0.3ms)[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
|
340478
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
340479
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
340480
|
+
[1m[35m (0.1ms)[0m begin transaction
|
340481
|
+
---------------------------------------------------------------------
|
340482
|
+
RailsIdentity::SessionTest: test_cannot_save_a_session_without_a_user
|
340483
|
+
---------------------------------------------------------------------
|
340484
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
340485
|
+
[1m[35m (0.1ms)[0m begin transaction
|
340486
|
+
--------------------------------------------------------------------------
|
340487
|
+
RailsIdentity::SessionTest: test_session_has_token_and_secret_when_created
|
340488
|
+
--------------------------------------------------------------------------
|
340489
|
+
[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"]]
|
340490
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
340491
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340492
|
+
-----------------------------------------------
|
340493
|
+
RailsIdentity::SessionTest: test_save_a_session
|
340494
|
+
-----------------------------------------------
|
340495
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340496
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
340497
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "872cd46a-06a1-11e6-8df6-6c4008a6fa2a"], ["secret", "db2f9e2d-9843-4951-9aba-648e1c558133"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiODcyY2Q0NmEtMDZhMS0xMWU2LThkZjYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTEyMDE1MCwiZXhwIjoxNDYyMzI5NzUwfQ.sajhAXE6pNd_yKAy8Ub2pjKLKImz1AjhRnmA-1i98p0"], ["created_at", "2016-04-20 02:42:30.875120"], ["updated_at", "2016-04-20 02:42:30.875120"]]
|
340498
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
340499
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
340500
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
340501
|
+
[1m[35m (0.1ms)[0m begin transaction
|
340502
|
+
[1m[36mFixture Delete (1.5ms)[0m [1mDELETE FROM "rails_identity_sessions"[0m
|
340503
|
+
[1m[35mFixture Insert (0.7ms)[0m INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('1', '1', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw', 'secret', '2016-04-21 04:44:54', '2016-04-21 04:44:54')
|
340504
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('2', '2', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIyIiwidXNlcl91dWlkIjoiMiIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.83Eoy5TTYDz9za8Kf0svcM_DErqLDl5P_KOS1AIXyk8', 'secret', '2016-04-21 04:44:54', '2016-04-21 04:44:54')[0m
|
340505
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('session_admin_one', 'admin_one', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxMjY0Mjk0fQ.qNOse99aMF7xKNCROHVO4gXtw3UJJcubxNfw5UB7m0M', 'secret', '2016-04-21 04:44:54', '2016-04-21 04:44:54')
|
340506
|
+
[1m[36mFixture Delete (0.8ms)[0m [1mDELETE FROM "rails_identity_users"[0m
|
340507
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "rails_identity_users" ("uuid", "username", "password_digest", "role", "verified", "created_at", "updated_at") VALUES ('1', 'one@example.com', '$2a$10$wasgY6PL2O1TK5JTRHBYh.oDhbFT46MadXLnMr3Xw7kX5Y1yP9nRS', 10, 't', '2016-04-21 04:44:54', '2016-04-21 04:44:54')
|
340508
|
+
[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$AoKpPTUhg/iHYMadu6j8IucTYeJDvLNTEP2CP7mD46BC5ooq0yIZm', 10, 't', '2016-04-21 04:44:54', '2016-04-21 04:44:54')[0m
|
340509
|
+
[1m[35mFixture Insert (0.1ms)[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$lb988jmal5vuu3rKXli3XeT.G0cFRFaEUZa7KJ6P6fJN374DXeA6m', 100, 't', '2016-04-21 04:44:54', '2016-04-21 04:44:54')
|
340510
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
340511
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340512
|
+
---------------------------------------------------------------------
|
340513
|
+
RailsIdentity::SessionTest: test_cannot_save_a_session_without_a_user
|
340514
|
+
---------------------------------------------------------------------
|
340515
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
340516
|
+
[1m[35m (0.1ms)[0m begin transaction
|
340517
|
+
-----------------------------------------------
|
340518
|
+
RailsIdentity::SessionTest: test_save_a_session
|
340519
|
+
-----------------------------------------------
|
340520
|
+
[1m[36mRailsIdentity::User Load (0.4ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
340521
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
340522
|
+
[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", "cb038bd6-077b-11e6-ac7f-6c4008a6fa2a"], ["secret", "72a56b07-851b-4f93-85b1-ac0970d7281d"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2IwMzhiZDYtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NCwiZXhwIjoxNDYyNDIzNDk0fQ.bkUvniHF9MxiI8Zd7Gy5uziJMxy3gntf78kleNwcEZY"], ["created_at", "2016-04-21 04:44:54.979715"], ["updated_at", "2016-04-21 04:44:54.979715"]]
|
340523
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
340524
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
340525
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340526
|
+
--------------------------------------------------------------------------
|
340527
|
+
RailsIdentity::SessionTest: test_session_has_token_and_secret_when_created
|
340528
|
+
--------------------------------------------------------------------------
|
340529
|
+
[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"]]
|
340530
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
340531
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340532
|
+
-----------------------------------------------------------------------------
|
340533
|
+
RailsIdentity::SessionsControllerTest: test_user_cannot_list_other's_sessions
|
340534
|
+
-----------------------------------------------------------------------------
|
340535
|
+
[1m[35mRailsIdentity::Session Load (0.2ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340536
|
+
[1m[36mRailsIdentity::User Load (0.0ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1[0m [["uuid", "2"]]
|
340537
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
340538
|
+
Parameters: {"user_id"=>"2", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw"}
|
340539
|
+
Requires a token
|
340540
|
+
Token well formatted for user 1,
|
340541
|
+
session 1
|
340542
|
+
Cache miss. Try database.
|
340543
|
+
[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"]]
|
340544
|
+
[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"]]
|
340545
|
+
Token well formatted and verified. Set cache.
|
340546
|
+
[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"]]
|
340547
|
+
Attempting to get user 2
|
340548
|
+
Attempting to get RailsIdentity::User 2
|
340549
|
+
[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"]]
|
340550
|
+
Checking to see if authorized to access object
|
340551
|
+
Not authorized to access user 2
|
340552
|
+
Completed 401 Unauthorized in 11ms (Views: 0.2ms | ActiveRecord: 0.3ms)
|
340553
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
340554
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340555
|
+
----------------------------------------------------------------------------------------------
|
340556
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_non-existent_username
|
340557
|
+
----------------------------------------------------------------------------------------------
|
340558
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340559
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
340560
|
+
Parameters: {"username"=>"idontexist", "password"=>"[FILTERED]"}
|
340561
|
+
[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"]]
|
340562
|
+
Attempting to get user
|
340563
|
+
Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
340564
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
340565
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340566
|
+
------------------------------------------------------------------
|
340567
|
+
RailsIdentity::SessionsControllerTest: test_show_a_current_session
|
340568
|
+
------------------------------------------------------------------
|
340569
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340570
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
340571
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"current"}
|
340572
|
+
Requires a token
|
340573
|
+
Token well formatted for user 1,
|
340574
|
+
session 1
|
340575
|
+
Cache miss. Try database.
|
340576
|
+
[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"]]
|
340577
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340578
|
+
Token well formatted and verified. Set cache.
|
340579
|
+
[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"]]
|
340580
|
+
Attempting to get RailsIdentity::Session 1
|
340581
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340582
|
+
Checking to see if authorized to access object
|
340583
|
+
[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"]]
|
340584
|
+
Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms)
|
340585
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
340586
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340587
|
+
-----------------------------------------------------------------------------------
|
340588
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_if_not_verified
|
340589
|
+
-----------------------------------------------------------------------------------
|
340590
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340591
|
+
[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"]]
|
340592
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
340593
|
+
[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
|
340594
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rails_identity_users" SET "verified" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verified", "f"], ["updated_at", "2016-04-21 04:44:55.152690"], ["uuid", "1"]]
|
340595
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
340596
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
340597
|
+
Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
|
340598
|
+
[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"]]
|
340599
|
+
RailsIdentity::Errors::UnauthorizedError
|
340600
|
+
Completed 401 Unauthorized in 64ms (Views: 0.3ms | ActiveRecord: 0.0ms)
|
340601
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
340602
|
+
[1m[35m (0.1ms)[0m begin transaction
|
340603
|
+
----------------------------------------------------------------------
|
340604
|
+
RailsIdentity::SessionsControllerTest: test_public_cannot_show_session
|
340605
|
+
----------------------------------------------------------------------
|
340606
|
+
[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"]]
|
340607
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
340608
|
+
Parameters: {"id"=>"1"}
|
340609
|
+
Requires a token
|
340610
|
+
Token decode error: Nil JSON web token
|
340611
|
+
Invalid token:
|
340612
|
+
Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
340613
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
340614
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340615
|
+
--------------------------------------------------------------------------
|
340616
|
+
RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions
|
340617
|
+
--------------------------------------------------------------------------
|
340618
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340619
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
340620
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw"}
|
340621
|
+
Requires a token
|
340622
|
+
Token well formatted for user 1,
|
340623
|
+
session 1
|
340624
|
+
Cache miss. Try database.
|
340625
|
+
[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"]]
|
340626
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340627
|
+
Token well formatted and verified. Set cache.
|
340628
|
+
[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"]]
|
340629
|
+
Attempting to get user
|
340630
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
|
340631
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [a36dfa4d-505c-434d-8e97-5fca4eb81eb6] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
|
340632
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [a36dfa4d-505c-434d-8e97-5fca4eb81eb6] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 3.51ms
|
340633
|
+
[ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: a36dfa4d-505c-434d-8e97-5fca4eb81eb6) to Inline(default)
|
340634
|
+
Completed 200 OK in 22ms (Views: 0.6ms | ActiveRecord: 0.3ms)
|
340635
|
+
[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"]]
|
340636
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
|
340637
|
+
[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"]]
|
340638
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
340639
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340640
|
+
--------------------------------------------------------------------------------
|
340641
|
+
RailsIdentity::SessionsControllerTest: test_cannot_delete_a_non-existent_session
|
340642
|
+
--------------------------------------------------------------------------------
|
340643
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340644
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
340645
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"999"}
|
340646
|
+
Requires a token
|
340647
|
+
Token well formatted for user 1,
|
340648
|
+
session 1
|
340649
|
+
Cache miss. Try database.
|
340650
|
+
[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"]]
|
340651
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340652
|
+
Token well formatted and verified. Set cache.
|
340653
|
+
[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"]]
|
340654
|
+
Attempting to get RailsIdentity::Session 999
|
340655
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "999"]]
|
340656
|
+
RailsIdentity::Session 999 cannot be found
|
340657
|
+
Completed 404 Not Found in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
340658
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
340659
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340660
|
+
-----------------------------------------------------------------------
|
340661
|
+
RailsIdentity::SessionsControllerTest: test_public_cannot_list_sessions
|
340662
|
+
-----------------------------------------------------------------------
|
340663
|
+
[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"]]
|
340664
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
340665
|
+
Requires a token
|
340666
|
+
Token decode error: Nil JSON web token
|
340667
|
+
Invalid token:
|
340668
|
+
Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
340669
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
340670
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340671
|
+
-----------------------------------------------------------------------------------------
|
340672
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_a_wrong_password
|
340673
|
+
-----------------------------------------------------------------------------------------
|
340674
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340675
|
+
[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"]]
|
340676
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
340677
|
+
Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
|
340678
|
+
[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"]]
|
340679
|
+
Attempting to get user
|
340680
|
+
Completed 401 Unauthorized in 66ms (Views: 0.3ms | ActiveRecord: 0.1ms)
|
340681
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
340682
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340683
|
+
-------------------------------------------------------------------------
|
340684
|
+
RailsIdentity::SessionsControllerTest: test_cannot_delete_other's_session
|
340685
|
+
-------------------------------------------------------------------------
|
340686
|
+
[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"]]
|
340687
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
340688
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"2"}
|
340689
|
+
Requires a token
|
340690
|
+
Token well formatted for user 1,
|
340691
|
+
session 1
|
340692
|
+
Cache miss. Try database.
|
340693
|
+
[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"]]
|
340694
|
+
[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"]]
|
340695
|
+
Token well formatted and verified. Set cache.
|
340696
|
+
[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"]]
|
340697
|
+
Attempting to get RailsIdentity::Session 2
|
340698
|
+
[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"]]
|
340699
|
+
Checking to see if authorized to access object
|
340700
|
+
[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"]]
|
340701
|
+
RailsIdentity::Errors::UnauthorizedError
|
340702
|
+
Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
340703
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
340704
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340705
|
+
------------------------------------------------------------
|
340706
|
+
RailsIdentity::SessionsControllerTest: test_create_a_session
|
340707
|
+
------------------------------------------------------------
|
340708
|
+
[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"]]
|
340709
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340710
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
340711
|
+
Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
|
340712
|
+
[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"]]
|
340713
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
340714
|
+
[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", "cb47588e-077b-11e6-ac7f-6c4008a6fa2a"], ["secret", "4e4c65d4-6286-450f-91e3-488ec3fa2edf"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2I0NzU4OGUtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NSwiZXhwIjoxNDYyNDIzNDk1fQ.I77GDY1cDwIAhAazd4W3_WVmbjumQl9dhkN-w51FsH0"], ["created_at", "2016-04-21 04:44:55.421309"], ["updated_at", "2016-04-21 04:44:55.421309"]]
|
340715
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
340716
|
+
Completed 201 Created in 71ms (Views: 0.4ms | ActiveRecord: 0.4ms)
|
340717
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
340718
|
+
[1m[35m (0.1ms)[0m begin transaction
|
340719
|
+
-------------------------------------------------------------------------
|
340720
|
+
RailsIdentity::SessionsControllerTest: test_public_cannot_create_sessions
|
340721
|
+
-------------------------------------------------------------------------
|
340722
|
+
[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"]]
|
340723
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
340724
|
+
Requires a token
|
340725
|
+
Token decode error: Nil JSON web token
|
340726
|
+
Invalid token:
|
340727
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
340728
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
340729
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340730
|
+
------------------------------------------------------------------------------------
|
340731
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_username
|
340732
|
+
------------------------------------------------------------------------------------
|
340733
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340734
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
340735
|
+
Parameters: {"password"=>"[FILTERED]"}
|
340736
|
+
[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" IS NULL LIMIT 1[0m
|
340737
|
+
Attempting to get user
|
340738
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
340739
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
340740
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340741
|
+
----------------------------------------------------------
|
340742
|
+
RailsIdentity::SessionsControllerTest: test_show_a_session
|
340743
|
+
----------------------------------------------------------
|
340744
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340745
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
340746
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"1"}
|
340747
|
+
Requires a token
|
340748
|
+
Token well formatted for user 1,
|
340749
|
+
session 1
|
340750
|
+
Cache miss. Try database.
|
340751
|
+
[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"]]
|
340752
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340753
|
+
Token well formatted and verified. Set cache.
|
340754
|
+
[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"]]
|
340755
|
+
Attempting to get RailsIdentity::Session 1
|
340756
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340757
|
+
Checking to see if authorized to access object
|
340758
|
+
[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"]]
|
340759
|
+
Completed 200 OK in 5ms (Views: 0.4ms | ActiveRecord: 0.2ms)
|
340760
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
340761
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
340762
|
+
----------------------------------------------------------------------------
|
340763
|
+
RailsIdentity::SessionsControllerTest: test_user_cannot_list_expired_session
|
340764
|
+
----------------------------------------------------------------------------
|
340765
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340766
|
+
[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"]]
|
340767
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
340768
|
+
[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", "cb4b5376-077b-11e6-ac7f-6c4008a6fa2a"], ["secret", "33c03671-7727-4a3f-8167-9247ed95d6af"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2I0YjUzNzYtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NSwiZXhwIjoxNDYxMjEzODk0fQ.hKy10ipqOzdqDJ8aNANOh1tXyYAfx7hbB27kB-DRCk0"], ["created_at", "2016-04-21 04:44:55.446940"], ["updated_at", "2016-04-21 04:44:55.446940"]]
|
340769
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
340770
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
340771
|
+
Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw"}
|
340772
|
+
Requires a token
|
340773
|
+
Token well formatted for user 1,
|
340774
|
+
session 1
|
340775
|
+
Cache miss. Try database.
|
340776
|
+
[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"]]
|
340777
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340778
|
+
Token well formatted and verified. Set cache.
|
340779
|
+
[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"]]
|
340780
|
+
Attempting to get user 1
|
340781
|
+
Attempting to get RailsIdentity::User 1
|
340782
|
+
[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"]]
|
340783
|
+
Checking to see if authorized to access object
|
340784
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'[0m
|
340785
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [5871f25d-5570-48b3-bae1-d65a5d927b59] Performing RailsIdentity::SessionsCleanupJob from Inline(default) with arguments: "cb4b5376-077b-11e6-ac7f-6c4008a6fa2a"
|
340786
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [5871f25d-5570-48b3-bae1-d65a5d927b59] [1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "cb4b5376-077b-11e6-ac7f-6c4008a6fa2a"]]
|
340787
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [5871f25d-5570-48b3-bae1-d65a5d927b59] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
340788
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [5871f25d-5570-48b3-bae1-d65a5d927b59] [1m[35mSQL (0.4ms)[0m DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "cb4b5376-077b-11e6-ac7f-6c4008a6fa2a"]]
|
340789
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [5871f25d-5570-48b3-bae1-d65a5d927b59] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
340790
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [5871f25d-5570-48b3-bae1-d65a5d927b59] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 1.54ms
|
340791
|
+
[ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: 5871f25d-5570-48b3-bae1-d65a5d927b59) to Inline(default) with arguments: "cb4b5376-077b-11e6-ac7f-6c4008a6fa2a"
|
340792
|
+
Completed 200 OK in 10ms (Views: 0.5ms | ActiveRecord: 0.8ms)
|
340793
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
340794
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340795
|
+
------------------------------------------------------------------
|
340796
|
+
RailsIdentity::SessionsControllerTest: test_public_can_see_options
|
340797
|
+
------------------------------------------------------------------
|
340798
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340799
|
+
Processing by RailsIdentity::SessionsController#options as HTML
|
340800
|
+
Rendered text template (0.0ms)
|
340801
|
+
Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms)
|
340802
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
340803
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340804
|
+
--------------------------------------------------------------------
|
340805
|
+
RailsIdentity::SessionsControllerTest: test_delete_a_current_session
|
340806
|
+
--------------------------------------------------------------------
|
340807
|
+
[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"]]
|
340808
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
340809
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"current"}
|
340810
|
+
Requires a token
|
340811
|
+
Token well formatted for user 1,
|
340812
|
+
session 1
|
340813
|
+
Cache miss. Try database.
|
340814
|
+
[1m[35mRailsIdentity::User Load (0.2ms)[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"]]
|
340815
|
+
[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"]]
|
340816
|
+
Token well formatted and verified. Set cache.
|
340817
|
+
[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"]]
|
340818
|
+
Attempting to get RailsIdentity::Session 1
|
340819
|
+
[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"]]
|
340820
|
+
Checking to see if authorized to access object
|
340821
|
+
[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"]]
|
340822
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
340823
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
|
340824
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
340825
|
+
Rendered text template (0.0ms)
|
340826
|
+
Completed 204 No Content in 8ms (Views: 0.4ms | ActiveRecord: 0.6ms)
|
340827
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
340828
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340829
|
+
--------------------------------------------------------------------------------------
|
340830
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_a_password
|
340831
|
+
--------------------------------------------------------------------------------------
|
340832
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340833
|
+
[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"]]
|
340834
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
340835
|
+
Parameters: {"username"=>"one@example.com"}
|
340836
|
+
[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"]]
|
340837
|
+
Attempting to get user
|
340838
|
+
Completed 401 Unauthorized in 72ms (Views: 0.3ms | ActiveRecord: 0.1ms)
|
340839
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
340840
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340841
|
+
--------------------------------------------------------------------------
|
340842
|
+
RailsIdentity::SessionsControllerTest: test_admin_can_show_other's_session
|
340843
|
+
--------------------------------------------------------------------------
|
340844
|
+
[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"]]
|
340845
|
+
[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"]]
|
340846
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
340847
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxMjY0Mjk0fQ.qNOse99aMF7xKNCROHVO4gXtw3UJJcubxNfw5UB7m0M", "id"=>"1"}
|
340848
|
+
Requires a token
|
340849
|
+
Token well formatted for user admin_one,
|
340850
|
+
session session_admin_one
|
340851
|
+
Cache miss. Try database.
|
340852
|
+
[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"]]
|
340853
|
+
[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"]]
|
340854
|
+
Token well formatted and verified. Set cache.
|
340855
|
+
[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"]]
|
340856
|
+
Attempting to get RailsIdentity::Session 1
|
340857
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340858
|
+
Checking to see if authorized to access object
|
340859
|
+
Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms)
|
340860
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
340861
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340862
|
+
---------------------------------------------------------------------------------------------------
|
340863
|
+
RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions_using_user_id_in_routing
|
340864
|
+
---------------------------------------------------------------------------------------------------
|
340865
|
+
[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"]]
|
340866
|
+
[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"]]
|
340867
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
340868
|
+
Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw"}
|
340869
|
+
Requires a token
|
340870
|
+
Token well formatted for user 1,
|
340871
|
+
session 1
|
340872
|
+
Cache miss. Try database.
|
340873
|
+
[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"]]
|
340874
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340875
|
+
Token well formatted and verified. Set cache.
|
340876
|
+
[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"]]
|
340877
|
+
Attempting to get user 1
|
340878
|
+
Attempting to get RailsIdentity::User 1
|
340879
|
+
[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"]]
|
340880
|
+
Checking to see if authorized to access object
|
340881
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'[0m
|
340882
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [749c7f59-a69a-4046-b929-81ac79763daa] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
|
340883
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [749c7f59-a69a-4046-b929-81ac79763daa] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 0.08ms
|
340884
|
+
[ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: 749c7f59-a69a-4046-b929-81ac79763daa) to Inline(default)
|
340885
|
+
Completed 200 OK in 8ms (Views: 0.5ms | ActiveRecord: 0.4ms)
|
340886
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
|
340887
|
+
[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"]]
|
340888
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
340889
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340890
|
+
------------------------------------------------------------
|
340891
|
+
RailsIdentity::SessionsControllerTest: test_delete_a_session
|
340892
|
+
------------------------------------------------------------
|
340893
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340894
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
340895
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"1"}
|
340896
|
+
Requires a token
|
340897
|
+
Token well formatted for user 1,
|
340898
|
+
session 1
|
340899
|
+
Cache miss. Try database.
|
340900
|
+
[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"]]
|
340901
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340902
|
+
Token well formatted and verified. Set cache.
|
340903
|
+
[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"]]
|
340904
|
+
Attempting to get RailsIdentity::Session 1
|
340905
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340906
|
+
Checking to see if authorized to access object
|
340907
|
+
[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"]]
|
340908
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
340909
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ?[0m [["uuid", "1"]]
|
340910
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
340911
|
+
Rendered text template (0.0ms)
|
340912
|
+
Completed 204 No Content in 7ms (Views: 0.4ms | ActiveRecord: 0.5ms)
|
340913
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
340914
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340915
|
+
-----------------------------------------------------------------------------
|
340916
|
+
RailsIdentity::SessionsControllerTest: test_cannot_show_a_nonexisting_session
|
340917
|
+
-----------------------------------------------------------------------------
|
340918
|
+
[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"]]
|
340919
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
340920
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"999"}
|
340921
|
+
Requires a token
|
340922
|
+
Token well formatted for user 1,
|
340923
|
+
session 1
|
340924
|
+
Cache miss. Try database.
|
340925
|
+
[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"]]
|
340926
|
+
[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"]]
|
340927
|
+
Token well formatted and verified. Set cache.
|
340928
|
+
[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"]]
|
340929
|
+
Attempting to get RailsIdentity::Session 999
|
340930
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "999"]]
|
340931
|
+
RailsIdentity::Session 999 cannot be found
|
340932
|
+
Completed 404 Not Found in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
340933
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
340934
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
340935
|
+
----------------------------------------------------------------------------
|
340936
|
+
RailsIdentity::SessionsControllerTest: test_admin_can_delete_other's_session
|
340937
|
+
----------------------------------------------------------------------------
|
340938
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340939
|
+
[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"]]
|
340940
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
340941
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxMjY0Mjk0fQ.qNOse99aMF7xKNCROHVO4gXtw3UJJcubxNfw5UB7m0M", "id"=>"1"}
|
340942
|
+
Requires a token
|
340943
|
+
Token well formatted for user admin_one,
|
340944
|
+
session session_admin_one
|
340945
|
+
Cache miss. Try database.
|
340946
|
+
[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"]]
|
340947
|
+
[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"]]
|
340948
|
+
Token well formatted and verified. Set cache.
|
340949
|
+
[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"]]
|
340950
|
+
Attempting to get RailsIdentity::Session 1
|
340951
|
+
[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"]]
|
340952
|
+
Checking to see if authorized to access object
|
340953
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
340954
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ?[0m [["uuid", "1"]]
|
340955
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
340956
|
+
Rendered text template (0.0ms)
|
340957
|
+
Completed 204 No Content in 5ms (Views: 0.4ms | ActiveRecord: 0.4ms)
|
340958
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
340959
|
+
[1m[35m (0.0ms)[0m begin transaction
|
340960
|
+
-----------------------------------------------------------------------
|
340961
|
+
RailsIdentity::SessionsControllerTest: test_cannot_show_expired_session
|
340962
|
+
-----------------------------------------------------------------------
|
340963
|
+
[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"]]
|
340964
|
+
[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"]]
|
340965
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
340966
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "cb6ae38a-077b-11e6-ac7f-6c4008a6fa2a"], ["secret", "0e04f8e7-2486-478c-aa04-f749c19bf7c0"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2I2YWUzOGEtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NSwiZXhwIjoxNDYxMjEzODk0fQ.cO6aINzG-QVEmWMQvTPiff9k8Ax_efw1lRfuc3pRqYk"], ["created_at", "2016-04-21 04:44:55.653859"], ["updated_at", "2016-04-21 04:44:55.653859"]]
|
340967
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
340968
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
340969
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"cb6ae38a-077b-11e6-ac7f-6c4008a6fa2a"}
|
340970
|
+
Requires a token
|
340971
|
+
Token well formatted for user 1,
|
340972
|
+
session 1
|
340973
|
+
Cache miss. Try database.
|
340974
|
+
[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"]]
|
340975
|
+
[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"]]
|
340976
|
+
Token well formatted and verified. Set cache.
|
340977
|
+
[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"]]
|
340978
|
+
Attempting to get RailsIdentity::Session cb6ae38a-077b-11e6-ac7f-6c4008a6fa2a
|
340979
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "cb6ae38a-077b-11e6-ac7f-6c4008a6fa2a"]]
|
340980
|
+
Checking to see if authorized to access object
|
340981
|
+
[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"]]
|
340982
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
340983
|
+
[1m[35mSQL (0.3ms)[0m DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "cb6ae38a-077b-11e6-ac7f-6c4008a6fa2a"]]
|
340984
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
340985
|
+
RailsIdentity::Errors::ObjectNotFoundError
|
340986
|
+
Completed 404 Not Found in 8ms (Views: 0.2ms | ActiveRecord: 0.7ms)
|
340987
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
340988
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
340989
|
+
-----------------------------------------------------------------------
|
340990
|
+
RailsIdentity::SessionsControllerTest: test_cannot_show_other's_session
|
340991
|
+
-----------------------------------------------------------------------
|
340992
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
340993
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
340994
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"2"}
|
340995
|
+
Requires a token
|
340996
|
+
Token well formatted for user 1,
|
340997
|
+
session 1
|
340998
|
+
Cache miss. Try database.
|
340999
|
+
[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"]]
|
341000
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341001
|
+
Token well formatted and verified. Set cache.
|
341002
|
+
[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"]]
|
341003
|
+
Attempting to get RailsIdentity::Session 2
|
341004
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2"]]
|
341005
|
+
Checking to see if authorized to access object
|
341006
|
+
[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", "2"]]
|
341007
|
+
RailsIdentity::Errors::UnauthorizedError
|
341008
|
+
Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
341009
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
341010
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341011
|
+
-----------------------------
|
341012
|
+
RailsIdentityTest: test_truth
|
341013
|
+
-----------------------------
|
341014
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
341015
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341016
|
+
---------------------------------------------------------------------------
|
341017
|
+
RailsIdentity::UserTest: test_user_is_not_valid_if_username_is_malformatted
|
341018
|
+
---------------------------------------------------------------------------
|
341019
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
341020
|
+
[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
|
341021
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
341022
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
341023
|
+
[1m[35m (0.0ms)[0m begin transaction
|
341024
|
+
---------------------------------------------------------------
|
341025
|
+
RailsIdentity::UserTest: test_user_has_a_role_of_100_by_default
|
341026
|
+
---------------------------------------------------------------
|
341027
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
341028
|
+
[1m[35mRailsIdentity::User Exists (0.1ms)[0m SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'new@example.com' AND "rails_identity_users"."deleted_at" IS NULL) LIMIT 1
|
341029
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?)[0m [["username", "new@example.com"], ["password_digest", "$2a$04$eLZMelzvCQTmDZR2ZAsWNehRxlbmqzIQ2N8Sa6GglzE8JilazKodu"], ["role", 10], ["created_at", "2016-04-21 04:44:55.685765"], ["updated_at", "2016-04-21 04:44:55.685765"], ["uuid", "cb6fe7a4-077b-11e6-ac7f-6c4008a6fa2a"]]
|
341030
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
341031
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
341032
|
+
[1m[35m (0.0ms)[0m begin transaction
|
341033
|
+
-----------------------------------------------------------------
|
341034
|
+
RailsIdentity::UserTest: test_user_can_issue_a_verification_token
|
341035
|
+
-----------------------------------------------------------------
|
341036
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
341037
|
+
[1m[35mRailsIdentity::User Exists (0.2ms)[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
|
341038
|
+
[1m[36mSQL (0.3ms)[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$0txcnl82mTTMdZQueZAsZeZo99oni26/ZPLSojgUOpp79grTaDfLa"], ["role", 10], ["created_at", "2016-04-21 04:44:55.690609"], ["updated_at", "2016-04-21 04:44:55.690609"], ["uuid", "cb70a5d6-077b-11e6-ac7f-6c4008a6fa2a"]]
|
341039
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
341040
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
341041
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "cb70a5d6-077b-11e6-ac7f-6c4008a6fa2a"], ["uuid", "cb70ec94-077b-11e6-ac7f-6c4008a6fa2a"], ["secret", "63ec7e20-5d3b-4c2a-b243-d273724b1434"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYjcwYTVkNi0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYjcwZWM5NC0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMjEzODk1LCJleHAiOjE0NjEyMTc0OTV9.0D0ky4Cv6o7DJCAP_svTjyZcv-CyOteEs5MldKW2m4E"], ["created_at", "2016-04-21 04:44:55.693642"], ["updated_at", "2016-04-21 04:44:55.693642"]]
|
341042
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
341043
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
341044
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341045
|
+
----------------------------------------------------------
|
341046
|
+
RailsIdentity::UserTest: test_user_can_issue_a_reset_token
|
341047
|
+
----------------------------------------------------------
|
341048
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
341049
|
+
[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
|
341050
|
+
[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$YBH11n3tf0RYea1iKgDVhOTCLSdMZB/M5eLe7EqUDtSST51EsAFbi"], ["role", 10], ["created_at", "2016-04-21 04:44:55.699216"], ["updated_at", "2016-04-21 04:44:55.699216"], ["uuid", "cb71f3d2-077b-11e6-ac7f-6c4008a6fa2a"]]
|
341051
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
341052
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
341053
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["user_uuid", "cb71f3d2-077b-11e6-ac7f-6c4008a6fa2a"], ["uuid", "cb7222f8-077b-11e6-ac7f-6c4008a6fa2a"], ["secret", "6946b0bc-4876-457a-aaf0-3f15965b2e79"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYjcxZjNkMi0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYjcyMjJmOC0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMjEzODk1LCJleHAiOjE0NjEyMTc0OTV9.yNuBe8oApm8hUxHQT5bNHq-1wNT2pZowOCGqOPJ4q2c"], ["created_at", "2016-04-21 04:44:55.701187"], ["updated_at", "2016-04-21 04:44:55.701187"]]
|
341054
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
341055
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
341056
|
+
[1m[35m (0.1ms)[0m begin transaction
|
341057
|
+
------------------------------------------------------------------
|
341058
|
+
RailsIdentity::UserTest: test_user_is_not_valid_without_a_username
|
341059
|
+
------------------------------------------------------------------
|
341060
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
341061
|
+
[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
|
341062
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
341063
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
341064
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341065
|
+
--------------------------------------------------------------------------
|
341066
|
+
RailsIdentity::UserTest: test_user_is_not_valid_if_username_already_exists
|
341067
|
+
--------------------------------------------------------------------------
|
341068
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
341069
|
+
[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
|
341070
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
341071
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
341072
|
+
[1m[35m (0.0ms)[0m begin transaction
|
341073
|
+
------------------------------------------------------------------
|
341074
|
+
RailsIdentity::UserTest: test_user_is_not_valid_without_a_password
|
341075
|
+
------------------------------------------------------------------
|
341076
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
341077
|
+
[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
|
341078
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
341079
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
341080
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341081
|
+
----------------------------------------------------------------------
|
341082
|
+
RailsIdentity::UserTest: test_user_is_valid_with_username_and_password
|
341083
|
+
----------------------------------------------------------------------
|
341084
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
341085
|
+
[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
|
341086
|
+
[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$HM0JGxezIBervdi5OFvN0uusPTx/dk/6hdFif5SkCrF8.cgaA4DQ."], ["role", 10], ["created_at", "2016-04-21 04:44:55.715067"], ["updated_at", "2016-04-21 04:44:55.715067"], ["uuid", "cb745ea6-077b-11e6-ac7f-6c4008a6fa2a"]]
|
341087
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
341088
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
341089
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341090
|
+
---------------------------------------------------------------------------------------------
|
341091
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_non-existing_token
|
341092
|
+
---------------------------------------------------------------------------------------------
|
341093
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341094
|
+
[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"]]
|
341095
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
341096
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjEyMTM4OTUsImV4cCI6MTQ2MTIxMzk1NX0.AFEhgtnbs5Lc0a31GPH973klLFPc3zORXUvlP_0NJPo", "id"=>"1"}
|
341097
|
+
Requires a token
|
341098
|
+
Token well formatted for user 1,
|
341099
|
+
session 1
|
341100
|
+
Cache miss. Try database.
|
341101
|
+
[1m[35mRailsIdentity::User Load (0.4ms)[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"]]
|
341102
|
+
[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"]]
|
341103
|
+
Signature verification raised
|
341104
|
+
Cannot verify token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjEyMTM4OTUsImV4cCI6MTQ2MTIxMzk1NX0.AFEhgtnbs5Lc0a31GPH973klLFPc3zORXUvlP_0NJPo
|
341105
|
+
Completed 401 Unauthorized in 7ms (Views: 0.3ms | ActiveRecord: 0.6ms)
|
341106
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
341107
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
341108
|
+
------------------------------------------------------------------------------
|
341109
|
+
RailsIdentity::UsersControllerTest: test_update_(reissue)_a_verification_token
|
341110
|
+
------------------------------------------------------------------------------
|
341111
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341112
|
+
[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"]]
|
341113
|
+
[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
|
341114
|
+
[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"]]
|
341115
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
341116
|
+
Parameters: {"issue_verification_token"=>true, "username"=>"one@example.com", "id"=>"current"}
|
341117
|
+
Accepts a token
|
341118
|
+
Token decode error: Nil JSON web token
|
341119
|
+
Suppressing error: Invalid token:
|
341120
|
+
[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"]]
|
341121
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
341122
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "cb788d28-077b-11e6-ac7f-6c4008a6fa2a"], ["secret", "ccf46367-2b9e-444c-8b6d-2951d9d809fc"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2I3ODhkMjgtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NSwiZXhwIjoxNDYxMjE3NDk1fQ.qZIOsxoL2wpS9uCHYG_dUOBDVxgNMEqNi3pIfgIZV9Q"], ["created_at", "2016-04-21 04:44:55.743388"], ["updated_at", "2016-04-21 04:44:55.743388"]]
|
341123
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
341124
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
341125
|
+
[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
|
341126
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2I3ODhkMjgtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NSwiZXhwIjoxNDYxMjE3NDk1fQ.qZIOsxoL2wpS9uCHYG_dUOBDVxgNMEqNi3pIfgIZV9Q"], ["updated_at", "2016-04-21 04:44:55.746102"], ["uuid", "1"]]
|
341127
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
341128
|
+
[ActiveJob] [1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341129
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [e656f0e2-c89c-4ea8-86a0-7961b4779a47] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
|
341130
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [e656f0e2-c89c-4ea8-86a0-7961b4779a47] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (1.6ms)
|
341131
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [e656f0e2-c89c-4ea8-86a0-7961b4779a47] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.5ms)
|
341132
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [e656f0e2-c89c-4ea8-86a0-7961b4779a47]
|
341133
|
+
RailsIdentity::UserMailer#email_verification: processed outbound mail in 248.2ms
|
341134
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [e656f0e2-c89c-4ea8-86a0-7961b4779a47]
|
341135
|
+
Sent mail to one@example.com (12.1ms)
|
341136
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [e656f0e2-c89c-4ea8-86a0-7961b4779a47] Date: Wed, 20 Apr 2016 23:44:56 -0500
|
341137
|
+
From: no-reply@rails-identity.com
|
341138
|
+
To: one@example.com
|
341139
|
+
Message-ID: <57185ac83a42_6bbf3ff59905246c451f2@galt.local.mail>
|
341140
|
+
Subject: [rails-identity] Email Confirmation
|
341141
|
+
Mime-Version: 1.0
|
341142
|
+
Content-Type: multipart/alternative;
|
341143
|
+
boundary="--==_mimepart_57185ac81b2b_6bbf3ff59905246c450d0";
|
341144
|
+
charset=UTF-8
|
341145
|
+
Content-Transfer-Encoding: 7bit
|
341146
|
+
|
341147
|
+
|
341148
|
+
----==_mimepart_57185ac81b2b_6bbf3ff59905246c450d0
|
341149
|
+
Content-Type: text/plain;
|
341150
|
+
charset=UTF-8
|
341151
|
+
Content-Transfer-Encoding: 7bit
|
341152
|
+
|
341153
|
+
Dear one@example.com,
|
341154
|
+
|
341155
|
+
Please confirm your account with rails-identity by making a PATCH request
|
341156
|
+
on the current user with a provided verification token. For example,
|
341157
|
+
|
341158
|
+
http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2I3ODhkMjgtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NSwiZXhwIjoxNDYxMjE3NDk1fQ.qZIOsxoL2wpS9uCHYG_dUOBDVxgNMEqNi3pIfgIZV9Q verified=true
|
341159
|
+
|
341160
|
+
will confirm the account. Here is the verification token:
|
341161
|
+
|
341162
|
+
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2I3ODhkMjgtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NSwiZXhwIjoxNDYxMjE3NDk1fQ.qZIOsxoL2wpS9uCHYG_dUOBDVxgNMEqNi3pIfgIZV9Q
|
341163
|
+
|
341164
|
+
Thank you for using rails-identity,
|
341165
|
+
rails-identity
|
341166
|
+
|
341167
|
+
|
341168
|
+
----==_mimepart_57185ac81b2b_6bbf3ff59905246c450d0
|
341169
|
+
Content-Type: text/html;
|
341170
|
+
charset=UTF-8
|
341171
|
+
Content-Transfer-Encoding: 7bit
|
341172
|
+
|
341173
|
+
<html>
|
341174
|
+
<body>
|
341175
|
+
<p>Dear one@example.com,</p>
|
341176
|
+
|
341177
|
+
<p>Please confirm your account with rails-identity by making a PATCH request
|
341178
|
+
on the current user with a provided verification token. For example,
|
341179
|
+
<pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2I3ODhkMjgtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NSwiZXhwIjoxNDYxMjE3NDk1fQ.qZIOsxoL2wpS9uCHYG_dUOBDVxgNMEqNi3pIfgIZV9Q
|
341180
|
+
verified=true</pre> will confirm the account. Here is the verification
|
341181
|
+
token:</p>
|
341182
|
+
|
341183
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2I3ODhkMjgtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NSwiZXhwIjoxNDYxMjE3NDk1fQ.qZIOsxoL2wpS9uCHYG_dUOBDVxgNMEqNi3pIfgIZV9Q</pre>
|
341184
|
+
|
341185
|
+
<p>Thank you for using rails-identity</p>
|
341186
|
+
<p><b>rails-identity</b></p>
|
341187
|
+
|
341188
|
+
</body>
|
341189
|
+
</html>
|
341190
|
+
|
341191
|
+
----==_mimepart_57185ac81b2b_6bbf3ff59905246c450d0--
|
341192
|
+
|
341193
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [e656f0e2-c89c-4ea8-86a0-7961b4779a47] Performed ActionMailer::DeliveryJob from Inline(mailers) in 261.06ms
|
341194
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: e656f0e2-c89c-4ea8-86a0-7961b4779a47) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
|
341195
|
+
Rendered text template (0.0ms)
|
341196
|
+
Completed 204 No Content in 282ms (Views: 2.1ms | ActiveRecord: 0.8ms)
|
341197
|
+
[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
|
341198
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
341199
|
+
Parameters: {"verified"=>true, "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2I3ODhkMjgtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NSwiZXhwIjoxNDYxMjE3NDk1fQ.qZIOsxoL2wpS9uCHYG_dUOBDVxgNMEqNi3pIfgIZV9Q", "id"=>"current"}
|
341200
|
+
Accepts a token
|
341201
|
+
Token well formatted for user 1,
|
341202
|
+
session cb788d28-077b-11e6-ac7f-6c4008a6fa2a
|
341203
|
+
Cache miss. Try database.
|
341204
|
+
[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"]]
|
341205
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "cb788d28-077b-11e6-ac7f-6c4008a6fa2a"]]
|
341206
|
+
Token well formatted and verified. Set cache.
|
341207
|
+
[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"]]
|
341208
|
+
Attempting to get RailsIdentity::User 1
|
341209
|
+
[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"]]
|
341210
|
+
Checking to see if authorized to access object
|
341211
|
+
Unpermitted parameters: token, id
|
341212
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
341213
|
+
[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
|
341214
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
341215
|
+
Completed 200 OK in 6ms (Views: 0.4ms | ActiveRecord: 1.1ms)
|
341216
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
341217
|
+
[1m[35m (0.1ms)[0m begin transaction
|
341218
|
+
---------------------------------------------------------------
|
341219
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_other_user
|
341220
|
+
---------------------------------------------------------------
|
341221
|
+
[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"]]
|
341222
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
341223
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"2"}
|
341224
|
+
Requires a token
|
341225
|
+
Token well formatted for user 1,
|
341226
|
+
session 1
|
341227
|
+
Cache miss. Try database.
|
341228
|
+
[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"]]
|
341229
|
+
[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"]]
|
341230
|
+
Token well formatted and verified. Set cache.
|
341231
|
+
[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"]]
|
341232
|
+
Attempting to get RailsIdentity::User 2
|
341233
|
+
[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"]]
|
341234
|
+
Checking to see if authorized to access object
|
341235
|
+
RailsIdentity::Errors::UnauthorizedError
|
341236
|
+
Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
341237
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
341238
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341239
|
+
---------------------------------------------------------------
|
341240
|
+
RailsIdentity::UsersControllerTest: test_public_can_see_options
|
341241
|
+
---------------------------------------------------------------
|
341242
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341243
|
+
Processing by RailsIdentity::UsersController#options as HTML
|
341244
|
+
Rendered text template (0.0ms)
|
341245
|
+
Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
|
341246
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
341247
|
+
[1m[35m (0.1ms)[0m begin transaction
|
341248
|
+
---------------------------------------------------------------------------
|
341249
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_using_no_token_payload
|
341250
|
+
---------------------------------------------------------------------------
|
341251
|
+
[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"]]
|
341252
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
341253
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.8TRQDmXfkvlUr2MyaKskw_an4NugZL95_5tMlb9iH7o", "id"=>"1"}
|
341254
|
+
Requires a token
|
341255
|
+
User UUID or session UUID is nil
|
341256
|
+
Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.8TRQDmXfkvlUr2MyaKskw_an4NugZL95_5tMlb9iH7o
|
341257
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
341258
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
341259
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341260
|
+
---------------------------------------------------------------------
|
341261
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_using_ill-formed
|
341262
|
+
---------------------------------------------------------------------
|
341263
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341264
|
+
[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"]]
|
341265
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
341266
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjEzOTU2fQ.-fodViddgNKkEJo5dnypp9L-WSowH2A129hsudMdR4E", "id"=>"1"}
|
341267
|
+
Requires a token
|
341268
|
+
User UUID or session UUID is nil
|
341269
|
+
Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjEzOTU2fQ.-fodViddgNKkEJo5dnypp9L-WSowH2A129hsudMdR4E
|
341270
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
341271
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
341272
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341273
|
+
--------------------------------------------------------------------
|
341274
|
+
RailsIdentity::UsersControllerTest: test_non-admin_cannot_list_users
|
341275
|
+
--------------------------------------------------------------------
|
341276
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341277
|
+
Processing by RailsIdentity::UsersController#index as HTML
|
341278
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw"}
|
341279
|
+
Requires an admin token
|
341280
|
+
Token well formatted for user 1,
|
341281
|
+
session 1
|
341282
|
+
Cache miss. Try database.
|
341283
|
+
[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"]]
|
341284
|
+
Well-formed but invalid user token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw
|
341285
|
+
Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
341286
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
341287
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341288
|
+
--------------------------------------------------------------------
|
341289
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_invalid_email
|
341290
|
+
--------------------------------------------------------------------
|
341291
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341292
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
341293
|
+
Parameters: {"username"=>"foobar", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"1"}
|
341294
|
+
Accepts a token
|
341295
|
+
Token well formatted for user 1,
|
341296
|
+
session 1
|
341297
|
+
Cache miss. Try database.
|
341298
|
+
[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"]]
|
341299
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341300
|
+
Token well formatted and verified. Set cache.
|
341301
|
+
[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"]]
|
341302
|
+
Attempting to get RailsIdentity::User 1
|
341303
|
+
[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"]]
|
341304
|
+
Checking to see if authorized to access object
|
341305
|
+
Unpermitted parameters: token, id
|
341306
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
341307
|
+
[1m[35mRailsIdentity::User Exists (0.1ms)[0m SELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foobar' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1
|
341308
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
341309
|
+
Completed 400 Bad Request in 7ms (Views: 0.2ms | ActiveRecord: 0.4ms)
|
341310
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
341311
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341312
|
+
------------------------------------------------------
|
341313
|
+
RailsIdentity::UsersControllerTest: test_create_a_user
|
341314
|
+
------------------------------------------------------
|
341315
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341316
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
341317
|
+
Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
|
341318
|
+
Accepts a token
|
341319
|
+
Token decode error: Nil JSON web token
|
341320
|
+
Suppressing error: Invalid token:
|
341321
|
+
Create new user
|
341322
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
341323
|
+
[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
|
341324
|
+
[1m[36mSQL (0.5ms)[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$DIUWJsC7vjXs0EWwlYc9gOwL5OLQ4b.A4kN6rNdjIUZJezqUG8ACG"], ["role", 10], ["created_at", "2016-04-21 04:44:56.077418"], ["updated_at", "2016-04-21 04:44:56.077418"], ["uuid", "cbabae1a-077b-11e6-ac7f-6c4008a6fa2a"]]
|
341325
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
341326
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
341327
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "cbabae1a-077b-11e6-ac7f-6c4008a6fa2a"], ["uuid", "cbac6288-077b-11e6-ac7f-6c4008a6fa2a"], ["secret", "53ad3a05-2183-4ab2-8fb4-4be3b11d157c"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmFiYWUxYS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmFjNjI4OC0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMjEzODk2LCJleHAiOjE0NjEyMTc0OTZ9.O0Zdc-nHbTFitQP8aw0gTddqbDXhnrgT13IWTHTHf94"], ["created_at", "2016-04-21 04:44:56.083883"], ["updated_at", "2016-04-21 04:44:56.083883"]]
|
341328
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
341329
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
341330
|
+
[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" != 'cbabae1a-077b-11e6-ac7f-6c4008a6fa2a') LIMIT 1[0m
|
341331
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmFiYWUxYS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmFjNjI4OC0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMjEzODk2LCJleHAiOjE0NjEyMTc0OTZ9.O0Zdc-nHbTFitQP8aw0gTddqbDXhnrgT13IWTHTHf94"], ["updated_at", "2016-04-21 04:44:56.086837"], ["uuid", "cbabae1a-077b-11e6-ac7f-6c4008a6fa2a"]]
|
341332
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
341333
|
+
[ActiveJob] [1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "cbabae1a-077b-11e6-ac7f-6c4008a6fa2a"]]
|
341334
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [064e8e3b-9171-4cb0-88ab-e58e1a79fa92] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/cbabae1a-077b-11e6-ac7f-6c4008a6fa2a
|
341335
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [064e8e3b-9171-4cb0-88ab-e58e1a79fa92] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
|
341336
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [064e8e3b-9171-4cb0-88ab-e58e1a79fa92] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.1ms)
|
341337
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [064e8e3b-9171-4cb0-88ab-e58e1a79fa92]
|
341338
|
+
RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.6ms
|
341339
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [064e8e3b-9171-4cb0-88ab-e58e1a79fa92]
|
341340
|
+
Sent mail to foo@example.com (3.4ms)
|
341341
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [064e8e3b-9171-4cb0-88ab-e58e1a79fa92] Date: Wed, 20 Apr 2016 23:44:56 -0500
|
341342
|
+
From: no-reply@rails-identity.com
|
341343
|
+
To: foo@example.com
|
341344
|
+
Message-ID: <57185ac8171f9_6bbf3ff59905246c45328@galt.local.mail>
|
341345
|
+
Subject: [rails-identity] Email Confirmation
|
341346
|
+
Mime-Version: 1.0
|
341347
|
+
Content-Type: multipart/alternative;
|
341348
|
+
boundary="--==_mimepart_57185ac8168c6_6bbf3ff59905246c45277";
|
341349
|
+
charset=UTF-8
|
341350
|
+
Content-Transfer-Encoding: 7bit
|
341351
|
+
|
341352
|
+
|
341353
|
+
----==_mimepart_57185ac8168c6_6bbf3ff59905246c45277
|
341354
|
+
Content-Type: text/plain;
|
341355
|
+
charset=UTF-8
|
341356
|
+
Content-Transfer-Encoding: 7bit
|
341357
|
+
|
341358
|
+
Dear foo@example.com,
|
341359
|
+
|
341360
|
+
Please confirm your account with rails-identity by making a PATCH request
|
341361
|
+
on the current user with a provided verification token. For example,
|
341362
|
+
|
341363
|
+
http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmFiYWUxYS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmFjNjI4OC0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMjEzODk2LCJleHAiOjE0NjEyMTc0OTZ9.O0Zdc-nHbTFitQP8aw0gTddqbDXhnrgT13IWTHTHf94 verified=true
|
341364
|
+
|
341365
|
+
will confirm the account. Here is the verification token:
|
341366
|
+
|
341367
|
+
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmFiYWUxYS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmFjNjI4OC0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMjEzODk2LCJleHAiOjE0NjEyMTc0OTZ9.O0Zdc-nHbTFitQP8aw0gTddqbDXhnrgT13IWTHTHf94
|
341368
|
+
|
341369
|
+
Thank you for using rails-identity,
|
341370
|
+
rails-identity
|
341371
|
+
|
341372
|
+
|
341373
|
+
----==_mimepart_57185ac8168c6_6bbf3ff59905246c45277
|
341374
|
+
Content-Type: text/html;
|
341375
|
+
charset=UTF-8
|
341376
|
+
Content-Transfer-Encoding: 7bit
|
341377
|
+
|
341378
|
+
<html>
|
341379
|
+
<body>
|
341380
|
+
<p>Dear foo@example.com,</p>
|
341381
|
+
|
341382
|
+
<p>Please confirm your account with rails-identity by making a PATCH request
|
341383
|
+
on the current user with a provided verification token. For example,
|
341384
|
+
<pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmFiYWUxYS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmFjNjI4OC0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMjEzODk2LCJleHAiOjE0NjEyMTc0OTZ9.O0Zdc-nHbTFitQP8aw0gTddqbDXhnrgT13IWTHTHf94
|
341385
|
+
verified=true</pre> will confirm the account. Here is the verification
|
341386
|
+
token:</p>
|
341387
|
+
|
341388
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmFiYWUxYS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmFjNjI4OC0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMjEzODk2LCJleHAiOjE0NjEyMTc0OTZ9.O0Zdc-nHbTFitQP8aw0gTddqbDXhnrgT13IWTHTHf94</pre>
|
341389
|
+
|
341390
|
+
<p>Thank you for using rails-identity</p>
|
341391
|
+
<p><b>rails-identity</b></p>
|
341392
|
+
|
341393
|
+
</body>
|
341394
|
+
</html>
|
341395
|
+
|
341396
|
+
----==_mimepart_57185ac8168c6_6bbf3ff59905246c45277--
|
341397
|
+
|
341398
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [064e8e3b-9171-4cb0-88ab-e58e1a79fa92] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.46ms
|
341399
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 064e8e3b-9171-4cb0-88ab-e58e1a79fa92) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/cbabae1a-077b-11e6-ac7f-6c4008a6fa2a
|
341400
|
+
Completed 201 Created in 23ms (Views: 1.1ms | ActiveRecord: 1.7ms)
|
341401
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
341402
|
+
[1m[35m (0.0ms)[0m begin transaction
|
341403
|
+
-------------------------------------------------------------------------
|
341404
|
+
RailsIdentity::UsersControllerTest: test_update_(issue)_a_new_reset_token
|
341405
|
+
-------------------------------------------------------------------------
|
341406
|
+
[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"]]
|
341407
|
+
[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"]]
|
341408
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
341409
|
+
Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
|
341410
|
+
Accepts a token
|
341411
|
+
Token decode error: Nil JSON web token
|
341412
|
+
Suppressing error: Invalid token:
|
341413
|
+
[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"]]
|
341414
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
341415
|
+
[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", "cbb009ba-077b-11e6-ac7f-6c4008a6fa2a"], ["secret", "50d805eb-9d38-4e09-9e9d-9e5554e08ba7"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2JiMDA5YmEtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjE3NDk2fQ.UoZn_HBcj7g8S0sNntCyLCCxYMwEHIbJCJqa5NzbWJw"], ["created_at", "2016-04-21 04:44:56.107166"], ["updated_at", "2016-04-21 04:44:56.107166"]]
|
341416
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
341417
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
341418
|
+
[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
|
341419
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2JiMDA5YmEtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjE3NDk2fQ.UoZn_HBcj7g8S0sNntCyLCCxYMwEHIbJCJqa5NzbWJw"], ["updated_at", "2016-04-21 04:44:56.109604"], ["uuid", "1"]]
|
341420
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
341421
|
+
[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"]]
|
341422
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [0ec39eee-9a6b-4049-b34d-b2f3df6b0d71] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
|
341423
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [0ec39eee-9a6b-4049-b34d-b2f3df6b0d71] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (0.8ms)
|
341424
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [0ec39eee-9a6b-4049-b34d-b2f3df6b0d71] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (0.4ms)
|
341425
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [0ec39eee-9a6b-4049-b34d-b2f3df6b0d71]
|
341426
|
+
RailsIdentity::UserMailer#password_reset: processed outbound mail in 10.3ms
|
341427
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [0ec39eee-9a6b-4049-b34d-b2f3df6b0d71]
|
341428
|
+
Sent mail to one@example.com (5.0ms)
|
341429
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [0ec39eee-9a6b-4049-b34d-b2f3df6b0d71] Date: Wed, 20 Apr 2016 23:44:56 -0500
|
341430
|
+
From: no-reply@rails-identity.com
|
341431
|
+
To: one@example.com
|
341432
|
+
Message-ID: <57185ac81e986_6bbf3ff59905246c455d3@galt.local.mail>
|
341433
|
+
Subject: [rails-identity] Password Reset
|
341434
|
+
Mime-Version: 1.0
|
341435
|
+
Content-Type: multipart/alternative;
|
341436
|
+
boundary="--==_mimepart_57185ac81dad6_6bbf3ff59905246c4547f";
|
341437
|
+
charset=UTF-8
|
341438
|
+
Content-Transfer-Encoding: 7bit
|
341439
|
+
|
341440
|
+
|
341441
|
+
----==_mimepart_57185ac81dad6_6bbf3ff59905246c4547f
|
341442
|
+
Content-Type: text/plain;
|
341443
|
+
charset=UTF-8
|
341444
|
+
Content-Transfer-Encoding: 7bit
|
341445
|
+
|
341446
|
+
Dear one@example.com,
|
341447
|
+
|
341448
|
+
You have requested to reset your password. Here are the user UUID and reset
|
341449
|
+
token. Make a PATCH request on the UUID with the reset token to set a new
|
341450
|
+
password. For instance,
|
341451
|
+
|
341452
|
+
http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
|
341453
|
+
|
341454
|
+
will set the password to "reallysecret" (without quotes) for the user to
|
341455
|
+
whom the reset token was issued.
|
341456
|
+
|
341457
|
+
Here is the reset token: @user.reset_token
|
341458
|
+
|
341459
|
+
Good luck! :)
|
341460
|
+
rails-identity
|
341461
|
+
|
341462
|
+
|
341463
|
+
----==_mimepart_57185ac81dad6_6bbf3ff59905246c4547f
|
341464
|
+
Content-Type: text/html;
|
341465
|
+
charset=UTF-8
|
341466
|
+
Content-Transfer-Encoding: 7bit
|
341467
|
+
|
341468
|
+
<html>
|
341469
|
+
<body>
|
341470
|
+
<p>Dear one@example.com,</p>
|
341471
|
+
|
341472
|
+
<p>You have requested to reset your password. Here are the user UUID and
|
341473
|
+
reset token. Make a PATCH request on the UUID with the reset token to set a
|
341474
|
+
new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2JiMDA5YmEtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjE3NDk2fQ.UoZn_HBcj7g8S0sNntCyLCCxYMwEHIbJCJqa5NzbWJw password=reallysecret
|
341475
|
+
password_confirmation=reallysecret</pre> will set the password to
|
341476
|
+
<pre>reallysecret</pre> for the user to whom the reset token was issued.
|
341477
|
+
Here is the reset token:</p>
|
341478
|
+
|
341479
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2JiMDA5YmEtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjE3NDk2fQ.UoZn_HBcj7g8S0sNntCyLCCxYMwEHIbJCJqa5NzbWJw</pre>
|
341480
|
+
|
341481
|
+
<p>Good luck! :)</p>
|
341482
|
+
<p><b>rails-identity</b></p>
|
341483
|
+
|
341484
|
+
</body>
|
341485
|
+
</html>
|
341486
|
+
|
341487
|
+
----==_mimepart_57185ac81dad6_6bbf3ff59905246c4547f--
|
341488
|
+
|
341489
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [0ec39eee-9a6b-4049-b34d-b2f3df6b0d71] Performed ActionMailer::DeliveryJob from Inline(mailers) in 15.9ms
|
341490
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 0ec39eee-9a6b-4049-b34d-b2f3df6b0d71) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
|
341491
|
+
Rendered text template (0.0ms)
|
341492
|
+
Completed 204 No Content in 25ms (Views: 0.4ms | ActiveRecord: 0.6ms)
|
341493
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341494
|
+
[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
|
341495
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
341496
|
+
Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"1"}
|
341497
|
+
Accepts a token
|
341498
|
+
Token well formatted for user 1,
|
341499
|
+
session 1
|
341500
|
+
Cache miss. Try database.
|
341501
|
+
[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"]]
|
341502
|
+
[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"]]
|
341503
|
+
Token well formatted and verified. Set cache.
|
341504
|
+
[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"]]
|
341505
|
+
Attempting to get RailsIdentity::User 1
|
341506
|
+
[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"]]
|
341507
|
+
Checking to see if authorized to access object
|
341508
|
+
Unpermitted parameters: token, id
|
341509
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
341510
|
+
[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
|
341511
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-21 04:44:56.137330"], ["uuid", "1"]]
|
341512
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
341513
|
+
Completed 200 OK in 7ms (Views: 0.4ms | ActiveRecord: 1.2ms)
|
341514
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
341515
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341516
|
+
------------------------------------------------------------------
|
341517
|
+
RailsIdentity::UsersControllerTest: test_public_cannot_show_a_user
|
341518
|
+
------------------------------------------------------------------
|
341519
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341520
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
341521
|
+
Parameters: {"id"=>"1"}
|
341522
|
+
Requires a token
|
341523
|
+
Token decode error: Nil JSON web token
|
341524
|
+
Invalid token:
|
341525
|
+
Completed 401 Unauthorized in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
|
341526
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
341527
|
+
[1m[35m (0.1ms)[0m begin transaction
|
341528
|
+
--------------------------------------------------------------------------
|
341529
|
+
RailsIdentity::UsersControllerTest: test_update_password_using_reset_token
|
341530
|
+
--------------------------------------------------------------------------
|
341531
|
+
[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"]]
|
341532
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341533
|
+
[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"]]
|
341534
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
341535
|
+
Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
|
341536
|
+
Accepts a token
|
341537
|
+
Token decode error: Nil JSON web token
|
341538
|
+
Suppressing error: Invalid token:
|
341539
|
+
[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"]]
|
341540
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
341541
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "cbb773e4-077b-11e6-ac7f-6c4008a6fa2a"], ["secret", "f1fe1579-9759-4487-87b6-21fc2e3e71c4"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2JiNzczZTQtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjE3NDk2fQ.7wabMDFl67NMG7kWg5Dm-sqM5WgYBe-ol-shc3Llli8"], ["created_at", "2016-04-21 04:44:56.155958"], ["updated_at", "2016-04-21 04:44:56.155958"]]
|
341542
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
341543
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
341544
|
+
[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
|
341545
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2JiNzczZTQtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjE3NDk2fQ.7wabMDFl67NMG7kWg5Dm-sqM5WgYBe-ol-shc3Llli8"], ["updated_at", "2016-04-21 04:44:56.158801"], ["uuid", "1"]]
|
341546
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
341547
|
+
[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"]]
|
341548
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [e2d65c73-d59e-41fc-9585-a4268d02b863] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
|
341549
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [e2d65c73-d59e-41fc-9585-a4268d02b863] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (0.1ms)
|
341550
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [e2d65c73-d59e-41fc-9585-a4268d02b863] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (0.0ms)
|
341551
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [e2d65c73-d59e-41fc-9585-a4268d02b863]
|
341552
|
+
RailsIdentity::UserMailer#password_reset: processed outbound mail in 2.5ms
|
341553
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [e2d65c73-d59e-41fc-9585-a4268d02b863]
|
341554
|
+
Sent mail to one@example.com (3.7ms)
|
341555
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [e2d65c73-d59e-41fc-9585-a4268d02b863] Date: Wed, 20 Apr 2016 23:44:56 -0500
|
341556
|
+
From: no-reply@rails-identity.com
|
341557
|
+
To: one@example.com
|
341558
|
+
Message-ID: <57185ac8289fd_6bbf3ff59905246c4573@galt.local.mail>
|
341559
|
+
Subject: [rails-identity] Password Reset
|
341560
|
+
Mime-Version: 1.0
|
341561
|
+
Content-Type: multipart/alternative;
|
341562
|
+
boundary="--==_mimepart_57185ac8280c2_6bbf3ff59905246c4562d";
|
341563
|
+
charset=UTF-8
|
341564
|
+
Content-Transfer-Encoding: 7bit
|
341565
|
+
|
341566
|
+
|
341567
|
+
----==_mimepart_57185ac8280c2_6bbf3ff59905246c4562d
|
341568
|
+
Content-Type: text/plain;
|
341569
|
+
charset=UTF-8
|
341570
|
+
Content-Transfer-Encoding: 7bit
|
341571
|
+
|
341572
|
+
Dear one@example.com,
|
341573
|
+
|
341574
|
+
You have requested to reset your password. Here are the user UUID and reset
|
341575
|
+
token. Make a PATCH request on the UUID with the reset token to set a new
|
341576
|
+
password. For instance,
|
341577
|
+
|
341578
|
+
http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
|
341579
|
+
|
341580
|
+
will set the password to "reallysecret" (without quotes) for the user to
|
341581
|
+
whom the reset token was issued.
|
341582
|
+
|
341583
|
+
Here is the reset token: @user.reset_token
|
341584
|
+
|
341585
|
+
Good luck! :)
|
341586
|
+
rails-identity
|
341587
|
+
|
341588
|
+
|
341589
|
+
----==_mimepart_57185ac8280c2_6bbf3ff59905246c4562d
|
341590
|
+
Content-Type: text/html;
|
341591
|
+
charset=UTF-8
|
341592
|
+
Content-Transfer-Encoding: 7bit
|
341593
|
+
|
341594
|
+
<html>
|
341595
|
+
<body>
|
341596
|
+
<p>Dear one@example.com,</p>
|
341597
|
+
|
341598
|
+
<p>You have requested to reset your password. Here are the user UUID and
|
341599
|
+
reset token. Make a PATCH request on the UUID with the reset token to set a
|
341600
|
+
new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2JiNzczZTQtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjE3NDk2fQ.7wabMDFl67NMG7kWg5Dm-sqM5WgYBe-ol-shc3Llli8 password=reallysecret
|
341601
|
+
password_confirmation=reallysecret</pre> will set the password to
|
341602
|
+
<pre>reallysecret</pre> for the user to whom the reset token was issued.
|
341603
|
+
Here is the reset token:</p>
|
341604
|
+
|
341605
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2JiNzczZTQtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjE3NDk2fQ.7wabMDFl67NMG7kWg5Dm-sqM5WgYBe-ol-shc3Llli8</pre>
|
341606
|
+
|
341607
|
+
<p>Good luck! :)</p>
|
341608
|
+
<p><b>rails-identity</b></p>
|
341609
|
+
|
341610
|
+
</body>
|
341611
|
+
</html>
|
341612
|
+
|
341613
|
+
----==_mimepart_57185ac8280c2_6bbf3ff59905246c4562d--
|
341614
|
+
|
341615
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [e2d65c73-d59e-41fc-9585-a4268d02b863] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.66ms
|
341616
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: e2d65c73-d59e-41fc-9585-a4268d02b863) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
|
341617
|
+
Rendered text template (0.0ms)
|
341618
|
+
Completed 204 No Content in 16ms (Views: 0.2ms | ActiveRecord: 0.8ms)
|
341619
|
+
[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"]]
|
341620
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
341621
|
+
Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiY2JiNzczZTQtMDc3Yi0xMWU2LWFjN2YtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjE3NDk2fQ.7wabMDFl67NMG7kWg5Dm-sqM5WgYBe-ol-shc3Llli8", "id"=>"1"}
|
341622
|
+
Accepts a token
|
341623
|
+
Token well formatted for user 1,
|
341624
|
+
session cbb773e4-077b-11e6-ac7f-6c4008a6fa2a
|
341625
|
+
Cache miss. Try database.
|
341626
|
+
[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"]]
|
341627
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "cbb773e4-077b-11e6-ac7f-6c4008a6fa2a"]]
|
341628
|
+
Token well formatted and verified. Set cache.
|
341629
|
+
[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"]]
|
341630
|
+
Attempting to get RailsIdentity::User 1
|
341631
|
+
[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"]]
|
341632
|
+
Checking to see if authorized to access object
|
341633
|
+
Unpermitted parameters: token, id
|
341634
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
341635
|
+
[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
|
341636
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["password_digest", "$2a$04$62kAVZe2xwbZN6SX0fZBxO58pLOi/ztvc7lyTtOkRZPh8wbyzCy02"], ["updated_at", "2016-04-21 04:44:56.176611"], ["uuid", "1"]]
|
341637
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
341638
|
+
Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 1.3ms)
|
341639
|
+
[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"]]
|
341640
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
341641
|
+
[1m[35m (0.1ms)[0m begin transaction
|
341642
|
+
----------------------------------------------------------------------------------------
|
341643
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_bogus_payload
|
341644
|
+
----------------------------------------------------------------------------------------
|
341645
|
+
[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"]]
|
341646
|
+
[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"]]
|
341647
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
341648
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjEzOTU2fQ.O5ywngSbjO_E-Ei9fu9C-TTf016ItxBpL-TrM1NHei8", "id"=>"1"}
|
341649
|
+
Requires a token
|
341650
|
+
Token well formatted for user 1,
|
341651
|
+
session doesnotexist
|
341652
|
+
Cache miss. Try database.
|
341653
|
+
[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"]]
|
341654
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "doesnotexist"]]
|
341655
|
+
Well-formed but invalid session token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjEzOTU2fQ.O5ywngSbjO_E-Ei9fu9C-TTf016ItxBpL-TrM1NHei8
|
341656
|
+
Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
341657
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
341658
|
+
[1m[35m (0.0ms)[0m begin transaction
|
341659
|
+
------------------------------------------------------------------------------
|
341660
|
+
RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_username
|
341661
|
+
------------------------------------------------------------------------------
|
341662
|
+
[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"]]
|
341663
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
341664
|
+
Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
|
341665
|
+
Accepts a token
|
341666
|
+
Token decode error: Nil JSON web token
|
341667
|
+
Suppressing error: Invalid token:
|
341668
|
+
Create new user
|
341669
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
341670
|
+
[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
|
341671
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
341672
|
+
Completed 400 Bad Request in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
341673
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
341674
|
+
[1m[35m (0.0ms)[0m begin transaction
|
341675
|
+
-------------------------------------------------------------------
|
341676
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_another_user
|
341677
|
+
-------------------------------------------------------------------
|
341678
|
+
[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"]]
|
341679
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
341680
|
+
Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"2"}
|
341681
|
+
Accepts a token
|
341682
|
+
Token well formatted for user 1,
|
341683
|
+
session 1
|
341684
|
+
Cache miss. Try database.
|
341685
|
+
[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"]]
|
341686
|
+
[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"]]
|
341687
|
+
Token well formatted and verified. Set cache.
|
341688
|
+
[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"]]
|
341689
|
+
Attempting to get RailsIdentity::User 2
|
341690
|
+
[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"]]
|
341691
|
+
Checking to see if authorized to access object
|
341692
|
+
RailsIdentity::Errors::UnauthorizedError
|
341693
|
+
Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
341694
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
341695
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341696
|
+
-----------------------------------------------------------------------------------------------------------
|
341697
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_token_with_invalid_username
|
341698
|
+
-----------------------------------------------------------------------------------------------------------
|
341699
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341700
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
341701
|
+
Parameters: {"issue_verification_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
|
341702
|
+
Accepts a token
|
341703
|
+
Token decode error: Nil JSON web token
|
341704
|
+
Suppressing error: Invalid token:
|
341705
|
+
[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"]]
|
341706
|
+
RailsIdentity::Errors::ObjectNotFoundError
|
341707
|
+
Completed 404 Not Found in 1ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
341708
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
341709
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341710
|
+
-------------------------------------------------------------------------------------------------
|
341711
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_without_username
|
341712
|
+
-------------------------------------------------------------------------------------------------
|
341713
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341714
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
341715
|
+
Parameters: {"issue_reset_token"=>true, "id"=>"current"}
|
341716
|
+
Accepts a token
|
341717
|
+
Token decode error: Nil JSON web token
|
341718
|
+
Suppressing error: Invalid token:
|
341719
|
+
[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" IS NULL LIMIT 1[0m
|
341720
|
+
RailsIdentity::Errors::ObjectNotFoundError
|
341721
|
+
Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
341722
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
341723
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341724
|
+
------------------------------------------------------------
|
341725
|
+
RailsIdentity::UsersControllerTest: test_update_current_user
|
341726
|
+
------------------------------------------------------------
|
341727
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341728
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
341729
|
+
Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"current"}
|
341730
|
+
Accepts a token
|
341731
|
+
Token well formatted for user 1,
|
341732
|
+
session 1
|
341733
|
+
Cache miss. Try database.
|
341734
|
+
[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"]]
|
341735
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341736
|
+
Token well formatted and verified. Set cache.
|
341737
|
+
[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"]]
|
341738
|
+
Attempting to get RailsIdentity::User 1
|
341739
|
+
[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"]]
|
341740
|
+
Checking to see if authorized to access object
|
341741
|
+
Unpermitted parameters: token, id
|
341742
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
341743
|
+
[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
|
341744
|
+
[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-21 04:44:56.222948"], ["uuid", "1"]]
|
341745
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
341746
|
+
Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 0.5ms)
|
341747
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
341748
|
+
[1m[35m (0.1ms)[0m begin transaction
|
341749
|
+
------------------------------------------------------------------
|
341750
|
+
RailsIdentity::UsersControllerTest: test_admin_can_show_other_user
|
341751
|
+
------------------------------------------------------------------
|
341752
|
+
[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"]]
|
341753
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
|
341754
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
341755
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxMjY0Mjk0fQ.qNOse99aMF7xKNCROHVO4gXtw3UJJcubxNfw5UB7m0M", "id"=>"1"}
|
341756
|
+
Requires a token
|
341757
|
+
Token well formatted for user admin_one,
|
341758
|
+
session session_admin_one
|
341759
|
+
Cache miss. Try database.
|
341760
|
+
[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"]]
|
341761
|
+
[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"]]
|
341762
|
+
Token well formatted and verified. Set cache.
|
341763
|
+
[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"]]
|
341764
|
+
Attempting to get RailsIdentity::User 1
|
341765
|
+
[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"]]
|
341766
|
+
Checking to see if authorized to access object
|
341767
|
+
Completed 200 OK in 6ms (Views: 0.7ms | ActiveRecord: 0.3ms)
|
341768
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
341769
|
+
[1m[35m (0.0ms)[0m begin transaction
|
341770
|
+
-----------------------------------------------------------------------
|
341771
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_a_nonexisting_user
|
341772
|
+
-----------------------------------------------------------------------
|
341773
|
+
[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"]]
|
341774
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
341775
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"999"}
|
341776
|
+
Requires a token
|
341777
|
+
Token well formatted for user 1,
|
341778
|
+
session 1
|
341779
|
+
Cache miss. Try database.
|
341780
|
+
[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"]]
|
341781
|
+
[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"]]
|
341782
|
+
Token well formatted and verified. Set cache.
|
341783
|
+
[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"]]
|
341784
|
+
Attempting to get RailsIdentity::User 999
|
341785
|
+
[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", "999"]]
|
341786
|
+
RailsIdentity::User 999 cannot be found
|
341787
|
+
Completed 404 Not Found in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
341788
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
341789
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341790
|
+
----------------------------------------------------
|
341791
|
+
RailsIdentity::UsersControllerTest: test_show_a_user
|
341792
|
+
----------------------------------------------------
|
341793
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341794
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
341795
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"1"}
|
341796
|
+
Requires a token
|
341797
|
+
Token well formatted for user 1,
|
341798
|
+
session 1
|
341799
|
+
Cache miss. Try database.
|
341800
|
+
[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"]]
|
341801
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341802
|
+
Token well formatted and verified. Set cache.
|
341803
|
+
[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"]]
|
341804
|
+
Attempting to get RailsIdentity::User 1
|
341805
|
+
[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"]]
|
341806
|
+
Checking to see if authorized to access object
|
341807
|
+
Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.1ms)
|
341808
|
+
[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"]]
|
341809
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
341810
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341811
|
+
--------------------------------------------------------------------
|
341812
|
+
RailsIdentity::UsersControllerTest: test_admin_can_delete_other_user
|
341813
|
+
--------------------------------------------------------------------
|
341814
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341815
|
+
[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"]]
|
341816
|
+
Processing by RailsIdentity::UsersController#destroy as HTML
|
341817
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxMjY0Mjk0fQ.qNOse99aMF7xKNCROHVO4gXtw3UJJcubxNfw5UB7m0M", "id"=>"1"}
|
341818
|
+
Requires a token
|
341819
|
+
Token well formatted for user admin_one,
|
341820
|
+
session session_admin_one
|
341821
|
+
Cache miss. Try database.
|
341822
|
+
[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"]]
|
341823
|
+
[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"]]
|
341824
|
+
Token well formatted and verified. Set cache.
|
341825
|
+
[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"]]
|
341826
|
+
Attempting to get RailsIdentity::User 1
|
341827
|
+
[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"]]
|
341828
|
+
Checking to see if authorized to access object
|
341829
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
341830
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rails_identity_users" SET "deleted_at" = '2016-04-21 04:44:56.265464' WHERE "rails_identity_users"."uuid" = ?[0m [["uuid", "1"]]
|
341831
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
341832
|
+
Rendered text template (0.0ms)
|
341833
|
+
Completed 204 No Content in 7ms (Views: 0.5ms | ActiveRecord: 0.5ms)
|
341834
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
341835
|
+
[1m[35m (0.0ms)[0m begin transaction
|
341836
|
+
------------------------------------------------------
|
341837
|
+
RailsIdentity::UsersControllerTest: test_delete_a_user
|
341838
|
+
------------------------------------------------------
|
341839
|
+
[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"]]
|
341840
|
+
Processing by RailsIdentity::UsersController#destroy as HTML
|
341841
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"1"}
|
341842
|
+
Requires a token
|
341843
|
+
Token well formatted for user 1,
|
341844
|
+
session 1
|
341845
|
+
Cache miss. Try database.
|
341846
|
+
[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"]]
|
341847
|
+
[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"]]
|
341848
|
+
Token well formatted and verified. Set cache.
|
341849
|
+
[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"]]
|
341850
|
+
Attempting to get RailsIdentity::User 1
|
341851
|
+
[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"]]
|
341852
|
+
Checking to see if authorized to access object
|
341853
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
341854
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rails_identity_users" SET "deleted_at" = '2016-04-21 04:44:56.311780' WHERE "rails_identity_users"."uuid" = ?[0m [["uuid", "1"]]
|
341855
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
341856
|
+
Rendered text template (0.0ms)
|
341857
|
+
Completed 204 No Content in 6ms (Views: 0.3ms | ActiveRecord: 0.4ms)
|
341858
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
341859
|
+
[1m[35m (0.1ms)[0m begin transaction
|
341860
|
+
-------------------------------------------------------------------------
|
341861
|
+
RailsIdentity::UsersControllerTest: test_user_cannot_create_an_admin_user
|
341862
|
+
-------------------------------------------------------------------------
|
341863
|
+
[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"]]
|
341864
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
341865
|
+
Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100"}
|
341866
|
+
Accepts a token
|
341867
|
+
Token decode error: Nil JSON web token
|
341868
|
+
Suppressing error: Invalid token:
|
341869
|
+
Create new user
|
341870
|
+
Unpermitted parameter: role
|
341871
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
341872
|
+
[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
|
341873
|
+
[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$vpVyZyGJ4lub0/tHqh4rseIETVKMmk8bK7Y/FdkfUJq2Vv0FRYpHe"], ["role", 10], ["created_at", "2016-04-21 04:44:56.321404"], ["updated_at", "2016-04-21 04:44:56.321404"], ["uuid", "cbd0e4be-077b-11e6-ac7f-6c4008a6fa2a"]]
|
341874
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
341875
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
341876
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["user_uuid", "cbd0e4be-077b-11e6-ac7f-6c4008a6fa2a"], ["uuid", "cbd128de-077b-11e6-ac7f-6c4008a6fa2a"], ["secret", "089db990-24c0-492e-8088-da1f624b1085"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmQwZTRiZS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmQxMjhkZS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMjEzODk2LCJleHAiOjE0NjEyMTc0OTZ9.mcsc90kkglbvUhBQ0OOfTMCa8USZQQrw0TnxYkXn9AI"], ["created_at", "2016-04-21 04:44:56.323960"], ["updated_at", "2016-04-21 04:44:56.323960"]]
|
341877
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
341878
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
341879
|
+
[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" != 'cbd0e4be-077b-11e6-ac7f-6c4008a6fa2a') LIMIT 1
|
341880
|
+
[1m[36mSQL (0.0ms)[0m [1mUPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmQwZTRiZS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmQxMjhkZS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMjEzODk2LCJleHAiOjE0NjEyMTc0OTZ9.mcsc90kkglbvUhBQ0OOfTMCa8USZQQrw0TnxYkXn9AI"], ["updated_at", "2016-04-21 04:44:56.325687"], ["uuid", "cbd0e4be-077b-11e6-ac7f-6c4008a6fa2a"]]
|
341881
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
341882
|
+
[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", "cbd0e4be-077b-11e6-ac7f-6c4008a6fa2a"]]
|
341883
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [6a624565-c7e0-45aa-b7b3-9095046f9986] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/cbd0e4be-077b-11e6-ac7f-6c4008a6fa2a
|
341884
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [6a624565-c7e0-45aa-b7b3-9095046f9986] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
|
341885
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [6a624565-c7e0-45aa-b7b3-9095046f9986] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.1ms)
|
341886
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [6a624565-c7e0-45aa-b7b3-9095046f9986]
|
341887
|
+
RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.7ms
|
341888
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [6a624565-c7e0-45aa-b7b3-9095046f9986]
|
341889
|
+
Sent mail to foo@example.com (5.0ms)
|
341890
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [6a624565-c7e0-45aa-b7b3-9095046f9986] Date: Wed, 20 Apr 2016 23:44:56 -0500
|
341891
|
+
From: no-reply@rails-identity.com
|
341892
|
+
To: foo@example.com
|
341893
|
+
Message-ID: <57185ac851af0_6bbf3ff59905246c45968@galt.local.mail>
|
341894
|
+
Subject: [rails-identity] Email Confirmation
|
341895
|
+
Mime-Version: 1.0
|
341896
|
+
Content-Type: multipart/alternative;
|
341897
|
+
boundary="--==_mimepart_57185ac850da8_6bbf3ff59905246c45834";
|
341898
|
+
charset=UTF-8
|
341899
|
+
Content-Transfer-Encoding: 7bit
|
341900
|
+
|
341901
|
+
|
341902
|
+
----==_mimepart_57185ac850da8_6bbf3ff59905246c45834
|
341903
|
+
Content-Type: text/plain;
|
341904
|
+
charset=UTF-8
|
341905
|
+
Content-Transfer-Encoding: 7bit
|
341906
|
+
|
341907
|
+
Dear foo@example.com,
|
341908
|
+
|
341909
|
+
Please confirm your account with rails-identity by making a PATCH request
|
341910
|
+
on the current user with a provided verification token. For example,
|
341911
|
+
|
341912
|
+
http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmQwZTRiZS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmQxMjhkZS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMjEzODk2LCJleHAiOjE0NjEyMTc0OTZ9.mcsc90kkglbvUhBQ0OOfTMCa8USZQQrw0TnxYkXn9AI verified=true
|
341913
|
+
|
341914
|
+
will confirm the account. Here is the verification token:
|
341915
|
+
|
341916
|
+
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmQwZTRiZS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmQxMjhkZS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMjEzODk2LCJleHAiOjE0NjEyMTc0OTZ9.mcsc90kkglbvUhBQ0OOfTMCa8USZQQrw0TnxYkXn9AI
|
341917
|
+
|
341918
|
+
Thank you for using rails-identity,
|
341919
|
+
rails-identity
|
341920
|
+
|
341921
|
+
|
341922
|
+
----==_mimepart_57185ac850da8_6bbf3ff59905246c45834
|
341923
|
+
Content-Type: text/html;
|
341924
|
+
charset=UTF-8
|
341925
|
+
Content-Transfer-Encoding: 7bit
|
341926
|
+
|
341927
|
+
<html>
|
341928
|
+
<body>
|
341929
|
+
<p>Dear foo@example.com,</p>
|
341930
|
+
|
341931
|
+
<p>Please confirm your account with rails-identity by making a PATCH request
|
341932
|
+
on the current user with a provided verification token. For example,
|
341933
|
+
<pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmQwZTRiZS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmQxMjhkZS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMjEzODk2LCJleHAiOjE0NjEyMTc0OTZ9.mcsc90kkglbvUhBQ0OOfTMCa8USZQQrw0TnxYkXn9AI
|
341934
|
+
verified=true</pre> will confirm the account. Here is the verification
|
341935
|
+
token:</p>
|
341936
|
+
|
341937
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmQwZTRiZS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmQxMjhkZS0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMjEzODk2LCJleHAiOjE0NjEyMTc0OTZ9.mcsc90kkglbvUhBQ0OOfTMCa8USZQQrw0TnxYkXn9AI</pre>
|
341938
|
+
|
341939
|
+
<p>Thank you for using rails-identity</p>
|
341940
|
+
<p><b>rails-identity</b></p>
|
341941
|
+
|
341942
|
+
</body>
|
341943
|
+
</html>
|
341944
|
+
|
341945
|
+
----==_mimepart_57185ac850da8_6bbf3ff59905246c45834--
|
341946
|
+
|
341947
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [6a624565-c7e0-45aa-b7b3-9095046f9986] Performed ActionMailer::DeliveryJob from Inline(mailers) in 8.33ms
|
341948
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 6a624565-c7e0-45aa-b7b3-9095046f9986) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/cbd0e4be-077b-11e6-ac7f-6c4008a6fa2a
|
341949
|
+
Completed 201 Created in 20ms (Views: 0.4ms | ActiveRecord: 0.9ms)
|
341950
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
341951
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341952
|
+
------------------------------------------------------------------------------------------------------------
|
341953
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_reset_token_without_username
|
341954
|
+
------------------------------------------------------------------------------------------------------------
|
341955
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341956
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
341957
|
+
Parameters: {"issue_verification_token"=>true, "id"=>"current"}
|
341958
|
+
Accepts a token
|
341959
|
+
Token decode error: Nil JSON web token
|
341960
|
+
Suppressing error: Invalid token:
|
341961
|
+
[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" IS NULL LIMIT 1[0m
|
341962
|
+
RailsIdentity::Errors::ObjectNotFoundError
|
341963
|
+
Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
341964
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
341965
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
341966
|
+
------------------------------------------------------------------------------------------------------
|
341967
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_with_invalid_username
|
341968
|
+
------------------------------------------------------------------------------------------------------
|
341969
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341970
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
341971
|
+
Parameters: {"issue_reset_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
|
341972
|
+
Accepts a token
|
341973
|
+
Token decode error: Nil JSON web token
|
341974
|
+
Suppressing error: Invalid token:
|
341975
|
+
[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"]]
|
341976
|
+
RailsIdentity::Errors::ObjectNotFoundError
|
341977
|
+
Completed 404 Not Found in 1ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
341978
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
341979
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
341980
|
+
-----------------------------------------------------------------
|
341981
|
+
RailsIdentity::UsersControllerTest: test_admin_can_list_all_users
|
341982
|
+
-----------------------------------------------------------------
|
341983
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
341984
|
+
[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"]]
|
341985
|
+
Processing by RailsIdentity::UsersController#index as HTML
|
341986
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxMjY0Mjk0fQ.qNOse99aMF7xKNCROHVO4gXtw3UJJcubxNfw5UB7m0M"}
|
341987
|
+
Requires an admin token
|
341988
|
+
Token well formatted for user admin_one,
|
341989
|
+
session session_admin_one
|
341990
|
+
Cache miss. Try database.
|
341991
|
+
[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"]]
|
341992
|
+
[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"]]
|
341993
|
+
Token well formatted and verified. Set cache.
|
341994
|
+
[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"]]
|
341995
|
+
[1m[36mRailsIdentity::User Load (0.1ms)[0m [1mSELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL[0m
|
341996
|
+
Completed 200 OK in 6ms (Views: 1.4ms | ActiveRecord: 0.3ms)
|
341997
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "rails_identity_sessions"
|
341998
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
341999
|
+
[1m[35m (0.0ms)[0m begin transaction
|
342000
|
+
---------------------------------------------------------------------------------------------
|
342001
|
+
RailsIdentity::UsersControllerTest: test_update_a_user_with_a_new_password_using_old_password
|
342002
|
+
---------------------------------------------------------------------------------------------
|
342003
|
+
[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"]]
|
342004
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
342005
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
342006
|
+
Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"1"}
|
342007
|
+
Accepts a token
|
342008
|
+
Token well formatted for user 1,
|
342009
|
+
session 1
|
342010
|
+
Cache miss. Try database.
|
342011
|
+
[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"]]
|
342012
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
342013
|
+
Token well formatted and verified. Set cache.
|
342014
|
+
[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"]]
|
342015
|
+
Attempting to get RailsIdentity::User 1
|
342016
|
+
[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"]]
|
342017
|
+
Checking to see if authorized to access object
|
342018
|
+
Unpermitted parameters: old_password, token, id
|
342019
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
342020
|
+
[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
|
342021
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["password_digest", "$2a$04$AV9GGNOjOYQD4ok6kdE7EOlXiU6mhuvwaVt3r2y5YJEpIBss4M/xa"], ["updated_at", "2016-04-21 04:44:56.434905"], ["uuid", "1"]]
|
342022
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
342023
|
+
Completed 200 OK in 73ms (Views: 0.4ms | ActiveRecord: 0.5ms)
|
342024
|
+
[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"]]
|
342025
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
342026
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
342027
|
+
------------------------------------------------------------
|
342028
|
+
RailsIdentity::UsersControllerTest: test_show_a_current_user
|
342029
|
+
------------------------------------------------------------
|
342030
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
342031
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
342032
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"current"}
|
342033
|
+
Requires a token
|
342034
|
+
Token well formatted for user 1,
|
342035
|
+
session 1
|
342036
|
+
Cache miss. Try database.
|
342037
|
+
[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"]]
|
342038
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
342039
|
+
Token well formatted and verified. Set cache.
|
342040
|
+
[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"]]
|
342041
|
+
Attempting to get RailsIdentity::User 1
|
342042
|
+
[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"]]
|
342043
|
+
Checking to see if authorized to access object
|
342044
|
+
Completed 200 OK in 6ms (Views: 0.6ms | ActiveRecord: 0.2ms)
|
342045
|
+
[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"]]
|
342046
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
342047
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
342048
|
+
------------------------------------------------------------------------------------
|
342049
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_password_with_non-reset_token
|
342050
|
+
------------------------------------------------------------------------------------
|
342051
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
342052
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
342053
|
+
Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"1"}
|
342054
|
+
Accepts a token
|
342055
|
+
Token well formatted for user 1,
|
342056
|
+
session 1
|
342057
|
+
Cache miss. Try database.
|
342058
|
+
[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"]]
|
342059
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
342060
|
+
Token well formatted and verified. Set cache.
|
342061
|
+
[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"]]
|
342062
|
+
Attempting to get RailsIdentity::User 1
|
342063
|
+
[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"]]
|
342064
|
+
Checking to see if authorized to access object
|
342065
|
+
RailsIdentity::Errors::UnauthorizedError
|
342066
|
+
Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
342067
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
342068
|
+
[1m[35m (0.0ms)[0m begin transaction
|
342069
|
+
------------------------------------------------------
|
342070
|
+
RailsIdentity::UsersControllerTest: test_update_a_user
|
342071
|
+
------------------------------------------------------
|
342072
|
+
[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"]]
|
342073
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
342074
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
342075
|
+
Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"1"}
|
342076
|
+
Accepts a token
|
342077
|
+
Token well formatted for user 1,
|
342078
|
+
session 1
|
342079
|
+
Cache miss. Try database.
|
342080
|
+
[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"]]
|
342081
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
342082
|
+
Token well formatted and verified. Set cache.
|
342083
|
+
[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"]]
|
342084
|
+
Attempting to get RailsIdentity::User 1
|
342085
|
+
[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"]]
|
342086
|
+
Checking to see if authorized to access object
|
342087
|
+
Unpermitted parameters: token, id
|
342088
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
342089
|
+
[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
|
342090
|
+
[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-21 04:44:56.468613"], ["uuid", "1"]]
|
342091
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
342092
|
+
Completed 200 OK in 7ms (Views: 0.4ms | ActiveRecord: 0.5ms)
|
342093
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
342094
|
+
[1m[35m (0.0ms)[0m begin transaction
|
342095
|
+
------------------------------------------------------------
|
342096
|
+
RailsIdentity::UsersControllerTest: test_delete_current_user
|
342097
|
+
------------------------------------------------------------
|
342098
|
+
[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"]]
|
342099
|
+
Processing by RailsIdentity::UsersController#destroy as HTML
|
342100
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"current"}
|
342101
|
+
Requires a token
|
342102
|
+
Token well formatted for user 1,
|
342103
|
+
session 1
|
342104
|
+
Cache miss. Try database.
|
342105
|
+
[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"]]
|
342106
|
+
[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"]]
|
342107
|
+
Token well formatted and verified. Set cache.
|
342108
|
+
[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"]]
|
342109
|
+
Attempting to get RailsIdentity::User 1
|
342110
|
+
[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"]]
|
342111
|
+
Checking to see if authorized to access object
|
342112
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
342113
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rails_identity_users" SET "deleted_at" = '2016-04-21 04:44:56.481223' WHERE "rails_identity_users"."uuid" = ?[0m [["uuid", "1"]]
|
342114
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
342115
|
+
Rendered text template (0.0ms)
|
342116
|
+
Completed 204 No Content in 7ms (Views: 0.5ms | ActiveRecord: 0.6ms)
|
342117
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
342118
|
+
[1m[35m (0.0ms)[0m begin transaction
|
342119
|
+
-------------------------------------------------------------------
|
342120
|
+
RailsIdentity::UsersControllerTest: test_cannot_delete_another_user
|
342121
|
+
-------------------------------------------------------------------
|
342122
|
+
[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"]]
|
342123
|
+
Processing by RailsIdentity::UsersController#destroy as HTML
|
342124
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"2"}
|
342125
|
+
Requires a token
|
342126
|
+
Token well formatted for user 1,
|
342127
|
+
session 1
|
342128
|
+
Cache miss. Try database.
|
342129
|
+
[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"]]
|
342130
|
+
[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"]]
|
342131
|
+
Token well formatted and verified. Set cache.
|
342132
|
+
[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"]]
|
342133
|
+
Attempting to get RailsIdentity::User 2
|
342134
|
+
[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"]]
|
342135
|
+
Checking to see if authorized to access object
|
342136
|
+
RailsIdentity::Errors::UnauthorizedError
|
342137
|
+
Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
342138
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
342139
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
342140
|
+
------------------------------------------------------------------------------------
|
342141
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_password_with_a_invalid_token
|
342142
|
+
------------------------------------------------------------------------------------
|
342143
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
342144
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
342145
|
+
Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjEyNjQyOTR9.PisHxZfrvfLV3-rXwNjNEsUXs0pcRX8HxrXV43DEsgw", "id"=>"1"}
|
342146
|
+
Accepts a token
|
342147
|
+
Token well formatted for user 1,
|
342148
|
+
session 1
|
342149
|
+
Cache miss. Try database.
|
342150
|
+
[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"]]
|
342151
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
342152
|
+
Token well formatted and verified. Set cache.
|
342153
|
+
[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"]]
|
342154
|
+
Attempting to get RailsIdentity::User 1
|
342155
|
+
[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"]]
|
342156
|
+
Checking to see if authorized to access object
|
342157
|
+
RailsIdentity::Errors::UnauthorizedError
|
342158
|
+
Completed 401 Unauthorized in 76ms (Views: 0.3ms | ActiveRecord: 0.3ms)
|
342159
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
342160
|
+
[1m[35m (0.0ms)[0m begin transaction
|
342161
|
+
--------------------------------------------------------------------------------
|
342162
|
+
RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_a_password
|
342163
|
+
--------------------------------------------------------------------------------
|
342164
|
+
[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"]]
|
342165
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
342166
|
+
Parameters: {"username"=>"foo@example.com"}
|
342167
|
+
Accepts a token
|
342168
|
+
Token decode error: Nil JSON web token
|
342169
|
+
Suppressing error: Invalid token:
|
342170
|
+
Create new user
|
342171
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
342172
|
+
[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
|
342173
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
342174
|
+
Completed 400 Bad Request in 3ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
342175
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
342176
|
+
[1m[35m (0.0ms)[0m begin transaction
|
342177
|
+
-----------------------------------------------------------------------
|
342178
|
+
RailsIdentity::UsersControllerTest: test_admin_can_create_an_admin_user
|
342179
|
+
-----------------------------------------------------------------------
|
342180
|
+
[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"]]
|
342181
|
+
[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"]]
|
342182
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
342183
|
+
Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxMjY0Mjk0fQ.qNOse99aMF7xKNCROHVO4gXtw3UJJcubxNfw5UB7m0M"}
|
342184
|
+
Accepts a token
|
342185
|
+
Token well formatted for user admin_one,
|
342186
|
+
session session_admin_one
|
342187
|
+
Cache miss. Try database.
|
342188
|
+
[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"]]
|
342189
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "session_admin_one"]]
|
342190
|
+
Token well formatted and verified. Set cache.
|
342191
|
+
[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"]]
|
342192
|
+
Create new user
|
342193
|
+
Unpermitted parameter: token
|
342194
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
342195
|
+
[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
|
342196
|
+
[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$uHNhj5wJ7MQwrfyBmhaG..sT1bf.K7o3erQCay7HtO.B9KldtflxO"], ["role", 100], ["created_at", "2016-04-21 04:44:56.589058"], ["updated_at", "2016-04-21 04:44:56.589058"], ["uuid", "cbf9bc2c-077b-11e6-ac7f-6c4008a6fa2a"]]
|
342197
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
342198
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
342199
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["user_uuid", "cbf9bc2c-077b-11e6-ac7f-6c4008a6fa2a"], ["uuid", "cbf9fa20-077b-11e6-ac7f-6c4008a6fa2a"], ["secret", "c0e2fc5d-6ee0-4df3-9040-792b9a5b0730"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmY5YmMyYy0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmY5ZmEyMC0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjE3NDk2fQ.q0oNCNBdLb9b_aVbUQGK4xQnSEpdfkmfS_z2CG4men4"], ["created_at", "2016-04-21 04:44:56.591429"], ["updated_at", "2016-04-21 04:44:56.591429"]]
|
342200
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
342201
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
342202
|
+
[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" != 'cbf9bc2c-077b-11e6-ac7f-6c4008a6fa2a') LIMIT 1
|
342203
|
+
[1m[36mSQL (0.0ms)[0m [1mUPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmY5YmMyYy0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmY5ZmEyMC0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjE3NDk2fQ.q0oNCNBdLb9b_aVbUQGK4xQnSEpdfkmfS_z2CG4men4"], ["updated_at", "2016-04-21 04:44:56.593198"], ["uuid", "cbf9bc2c-077b-11e6-ac7f-6c4008a6fa2a"]]
|
342204
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
342205
|
+
[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", "cbf9bc2c-077b-11e6-ac7f-6c4008a6fa2a"]]
|
342206
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [db693f68-a2ee-4b56-9834-37d68fabee13] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/cbf9bc2c-077b-11e6-ac7f-6c4008a6fa2a
|
342207
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [db693f68-a2ee-4b56-9834-37d68fabee13] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
|
342208
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [db693f68-a2ee-4b56-9834-37d68fabee13] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
|
342209
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [db693f68-a2ee-4b56-9834-37d68fabee13]
|
342210
|
+
RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.4ms
|
342211
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [db693f68-a2ee-4b56-9834-37d68fabee13]
|
342212
|
+
Sent mail to foo@example.com (3.4ms)
|
342213
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [db693f68-a2ee-4b56-9834-37d68fabee13] Date: Wed, 20 Apr 2016 23:44:56 -0500
|
342214
|
+
From: no-reply@rails-identity.com
|
342215
|
+
To: foo@example.com
|
342216
|
+
Message-ID: <57185ac892792_6bbf3ff59905246c461b1@galt.local.mail>
|
342217
|
+
Subject: [rails-identity] Email Confirmation
|
342218
|
+
Mime-Version: 1.0
|
342219
|
+
Content-Type: multipart/alternative;
|
342220
|
+
boundary="--==_mimepart_57185ac891ea0_6bbf3ff59905246c4608c";
|
342221
|
+
charset=UTF-8
|
342222
|
+
Content-Transfer-Encoding: 7bit
|
342223
|
+
|
342224
|
+
|
342225
|
+
----==_mimepart_57185ac891ea0_6bbf3ff59905246c4608c
|
342226
|
+
Content-Type: text/plain;
|
342227
|
+
charset=UTF-8
|
342228
|
+
Content-Transfer-Encoding: 7bit
|
342229
|
+
|
342230
|
+
Dear foo@example.com,
|
342231
|
+
|
342232
|
+
Please confirm your account with rails-identity by making a PATCH request
|
342233
|
+
on the current user with a provided verification token. For example,
|
342234
|
+
|
342235
|
+
http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmY5YmMyYy0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmY5ZmEyMC0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjE3NDk2fQ.q0oNCNBdLb9b_aVbUQGK4xQnSEpdfkmfS_z2CG4men4 verified=true
|
342236
|
+
|
342237
|
+
will confirm the account. Here is the verification token:
|
342238
|
+
|
342239
|
+
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmY5YmMyYy0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmY5ZmEyMC0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjE3NDk2fQ.q0oNCNBdLb9b_aVbUQGK4xQnSEpdfkmfS_z2CG4men4
|
342240
|
+
|
342241
|
+
Thank you for using rails-identity,
|
342242
|
+
rails-identity
|
342243
|
+
|
342244
|
+
|
342245
|
+
----==_mimepart_57185ac891ea0_6bbf3ff59905246c4608c
|
342246
|
+
Content-Type: text/html;
|
342247
|
+
charset=UTF-8
|
342248
|
+
Content-Transfer-Encoding: 7bit
|
342249
|
+
|
342250
|
+
<html>
|
342251
|
+
<body>
|
342252
|
+
<p>Dear foo@example.com,</p>
|
342253
|
+
|
342254
|
+
<p>Please confirm your account with rails-identity by making a PATCH request
|
342255
|
+
on the current user with a provided verification token. For example,
|
342256
|
+
<pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmY5YmMyYy0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmY5ZmEyMC0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjE3NDk2fQ.q0oNCNBdLb9b_aVbUQGK4xQnSEpdfkmfS_z2CG4men4
|
342257
|
+
verified=true</pre> will confirm the account. Here is the verification
|
342258
|
+
token:</p>
|
342259
|
+
|
342260
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiJjYmY5YmMyYy0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiJjYmY5ZmEyMC0wNzdiLTExZTYtYWM3Zi02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTIxMzg5NiwiZXhwIjoxNDYxMjE3NDk2fQ.q0oNCNBdLb9b_aVbUQGK4xQnSEpdfkmfS_z2CG4men4</pre>
|
342261
|
+
|
342262
|
+
<p>Thank you for using rails-identity</p>
|
342263
|
+
<p><b>rails-identity</b></p>
|
342264
|
+
|
342265
|
+
</body>
|
342266
|
+
</html>
|
342267
|
+
|
342268
|
+
----==_mimepart_57185ac891ea0_6bbf3ff59905246c4608c--
|
342269
|
+
|
342270
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [db693f68-a2ee-4b56-9834-37d68fabee13] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.21ms
|
342271
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: db693f68-a2ee-4b56-9834-37d68fabee13) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/cbf9bc2c-077b-11e6-ac7f-6c4008a6fa2a
|
342272
|
+
Completed 201 Created in 20ms (Views: 0.4ms | ActiveRecord: 1.0ms)
|
342273
|
+
[1m[35m (0.7ms)[0m rollback transaction
|