rails-identity 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/rails_identity/application_controller.rb +1 -45
- data/app/controllers/rails_identity/sessions_controller.rb +5 -5
- data/app/controllers/rails_identity/users_controller.rb +7 -7
- data/app/helpers/rails_identity/application_helper.rb +14 -28
- data/app/models/rails_identity/session.rb +1 -1
- data/app/models/rails_identity/user.rb +1 -1
- data/lib/rails_identity.rb +0 -33
- data/lib/rails_identity/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +1774 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49e043fc9b928b2429efe5e3d6ba38dfc4f20749
|
4
|
+
data.tar.gz: 182ac29e92d3817e3e8b3336ddfb8ef8ad139f3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adefb7a0fb1afcfc7e335e8756c5516ff83c07e7edd77966375eaac4a5cfe16477c5651c87e0bd57ec28931d012d187dc89145bbb9f31a4e29f4f0fd4dfd54dd
|
7
|
+
data.tar.gz: ee2c1cdf026af3d4394f13d4101bcb283f36181c710be76dcc82ee477df458d98fe633505c5bc29add3e49be240c37b745649dc31e3b27e04a7f9456bb2e1130
|
@@ -3,51 +3,7 @@ module RailsIdentity
|
|
3
3
|
##
|
4
4
|
# The root application controller class in rails-identity.
|
5
5
|
#
|
6
|
-
class ApplicationController <
|
6
|
+
class ApplicationController < Repia::BaseController
|
7
7
|
include ApplicationHelper
|
8
|
-
|
9
|
-
# This is a catch-all.
|
10
|
-
rescue_from StandardError do |exception|
|
11
|
-
# :nocov:
|
12
|
-
logger.error exception.message
|
13
|
-
render_error 500, "Unknown error occurred: #{exception.message}"
|
14
|
-
# :nocov:
|
15
|
-
end
|
16
|
-
|
17
|
-
# Most actions require a session token. If token is invalid, rescue the
|
18
|
-
# exception and throw an HTTP 401 response.
|
19
|
-
rescue_from Errors::InvalidTokenError do |exception|
|
20
|
-
logger.error exception.message
|
21
|
-
render_error 401, "Invalid token"
|
22
|
-
end
|
23
|
-
|
24
|
-
# Some actions require a resource object via id. If no such object
|
25
|
-
# exists, throw an HTTP 404 response.
|
26
|
-
rescue_from Errors::ObjectNotFoundError do |exception|
|
27
|
-
logger.error exception.message
|
28
|
-
render_error 404, exception.message
|
29
|
-
end
|
30
|
-
|
31
|
-
# The request is authenticated but not authorized for the specified
|
32
|
-
# action. Throw an HTTP 401 response.
|
33
|
-
#
|
34
|
-
rescue_from Errors::UnauthorizedError do |exception|
|
35
|
-
logger.error exception.message
|
36
|
-
render_error 401, "Unauthorized request"
|
37
|
-
end
|
38
|
-
|
39
|
-
##
|
40
|
-
# Renders a generic OPTIONS response. The actual controller must
|
41
|
-
# override this action if desired to have specific OPTIONS handling
|
42
|
-
# logic.
|
43
|
-
#
|
44
|
-
def options()
|
45
|
-
# echo back access-control-request-headers
|
46
|
-
if request.headers["Access-Control-Request-Headers"]
|
47
|
-
response["Access-Control-Allow-Headers"] =
|
48
|
-
request.headers["Access-Control-Request-Headers"]
|
49
|
-
end
|
50
|
-
render body: "", status: 200
|
51
|
-
end
|
52
8
|
end
|
53
9
|
end
|
@@ -41,7 +41,7 @@ module RailsIdentity
|
|
41
41
|
def create
|
42
42
|
@user = User.find_by_username(session_params[:username])
|
43
43
|
if (@user && @user.authenticate(session_params[:password])) || get_user()
|
44
|
-
raise Errors::
|
44
|
+
raise Repia::Errors::Unauthorized unless @user.verified
|
45
45
|
@session = Session.new(user: @user)
|
46
46
|
if @session.save
|
47
47
|
render json: @session, except: [:secret], status: 201
|
@@ -80,10 +80,10 @@ module RailsIdentity
|
|
80
80
|
##
|
81
81
|
# Get the specified or current session.
|
82
82
|
#
|
83
|
-
# An Errors::
|
83
|
+
# An Repia::Errors::NotFound is raised if the session does not
|
84
84
|
# exist (or deleted due to expiration).
|
85
85
|
#
|
86
|
-
# An Errors::
|
86
|
+
# An Repia::Errors::Unauthorized is raised if the authenticated user
|
87
87
|
# does not have authorization for the specified session.
|
88
88
|
#
|
89
89
|
def get_session
|
@@ -93,10 +93,10 @@ module RailsIdentity
|
|
93
93
|
end
|
94
94
|
@session = find_object(Session, session_id)
|
95
95
|
if !authorized?(@session)
|
96
|
-
raise Errors::
|
96
|
+
raise Repia::Errors::Unauthorized
|
97
97
|
elsif @session.expired?
|
98
98
|
@session.destroy
|
99
|
-
raise Errors::
|
99
|
+
raise Repia::Errors::NotFound
|
100
100
|
end
|
101
101
|
end
|
102
102
|
|
@@ -73,9 +73,9 @@ module RailsIdentity
|
|
73
73
|
if params[:issue_reset_token] || params[:issue_verification_token]
|
74
74
|
# For issuing a reset token, one does not need an auth token. so do
|
75
75
|
# not authorize the request.
|
76
|
-
raise Errors::
|
76
|
+
raise Repia::Errors::Unauthorized unless params[:id] == "current"
|
77
77
|
get_user_for_token()
|
78
|
-
raise Errors::
|
78
|
+
raise Repia::Errors::Unauthorized unless params[:username] == @user.username
|
79
79
|
if params[:issue_reset_token]
|
80
80
|
update_token(:reset_token)
|
81
81
|
else
|
@@ -85,9 +85,9 @@ module RailsIdentity
|
|
85
85
|
get_user()
|
86
86
|
if params[:password]
|
87
87
|
if params[:old_password]
|
88
|
-
raise Errors::
|
88
|
+
raise Repia::Errors::Unauthorized unless @user.authenticate(params[:old_password])
|
89
89
|
else
|
90
|
-
raise Errors::
|
90
|
+
raise Repia::Errors::Unauthorized unless @token == @user.reset_token
|
91
91
|
end
|
92
92
|
end
|
93
93
|
update_user(user_params)
|
@@ -144,11 +144,11 @@ module RailsIdentity
|
|
144
144
|
#
|
145
145
|
def get_user
|
146
146
|
if params[:id] == "current"
|
147
|
-
raise Errors::
|
147
|
+
raise Repia::Errors::Unauthorized if @auth_user.nil?
|
148
148
|
params[:id] = @auth_user.uuid
|
149
149
|
end
|
150
150
|
@user = find_object(User, params[:id])
|
151
|
-
raise Errors::
|
151
|
+
raise Repia::Errors::Unauthorized unless authorized?(@user)
|
152
152
|
return @user
|
153
153
|
end
|
154
154
|
|
@@ -158,7 +158,7 @@ module RailsIdentity
|
|
158
158
|
#
|
159
159
|
def get_user_for_token
|
160
160
|
@user = User.find_by_username(params[:username])
|
161
|
-
raise Errors::
|
161
|
+
raise Repia::Errors::NotFound if @user.nil?
|
162
162
|
return @user
|
163
163
|
end
|
164
164
|
|
@@ -1,29 +1,15 @@
|
|
1
1
|
module RailsIdentity
|
2
2
|
module ApplicationHelper
|
3
3
|
|
4
|
-
##
|
5
|
-
# Renders a single error.
|
6
|
-
#
|
7
|
-
def render_error(status, msg)
|
8
|
-
render json: {errors: [msg]}, status: status
|
9
|
-
end
|
10
|
-
|
11
|
-
##
|
12
|
-
# Renders multiple errors
|
13
|
-
#
|
14
|
-
def render_errors(status, msgs)
|
15
|
-
render json: {errors: msgs}, status: status
|
16
|
-
end
|
17
|
-
|
18
4
|
##
|
19
5
|
# Helper method to get the user object in the request context. There
|
20
6
|
# are two ways to specify the user id--one in the routing or the auth
|
21
7
|
# context. Only admin can actually specify the user id in the routing.
|
22
8
|
#
|
23
|
-
# An Errors::
|
9
|
+
# An Repia::Errors::Unauthorized is raised if the authenticated user is
|
24
10
|
# not authorized for the specified user information.
|
25
11
|
#
|
26
|
-
# An Errors::
|
12
|
+
# An Repia::Errors::NotFound is raised if the specified user cannot
|
27
13
|
# be found.
|
28
14
|
#
|
29
15
|
def get_user(fallback: true)
|
@@ -32,14 +18,14 @@ module RailsIdentity
|
|
32
18
|
if !user_id.nil? && user_id != "current"
|
33
19
|
@user = find_object(User, params[:user_id]) # will throw error if nil
|
34
20
|
unless authorized?(@user)
|
35
|
-
raise Errors::
|
21
|
+
raise Repia::Errors::Unauthorized,
|
36
22
|
"Not authorized to access user #{user_id}"
|
37
23
|
end
|
38
24
|
elsif fallback || user_id == "current"
|
39
25
|
@user = @auth_user
|
40
26
|
else
|
41
27
|
# :nocov:
|
42
|
-
raise Errors::
|
28
|
+
raise Repia::Errors::NotFound, "User #{user_id} does not exist"
|
43
29
|
# :nocov:
|
44
30
|
end
|
45
31
|
end
|
@@ -48,10 +34,10 @@ module RailsIdentity
|
|
48
34
|
# Finds an object by model and UUID and throws an error (which will be
|
49
35
|
# caught and re-thrown as an HTTP error.)
|
50
36
|
#
|
51
|
-
# An Errors::
|
37
|
+
# An Repia::Errors::NotFound is raised if specified to do so when
|
52
38
|
# the object could not be found using the uuid.
|
53
39
|
#
|
54
|
-
def find_object(model, uuid, error: Errors::
|
40
|
+
def find_object(model, uuid, error: Repia::Errors::NotFound)
|
55
41
|
logger.debug("Attempting to get #{model.name} #{uuid}")
|
56
42
|
obj = model.find_by_uuid(uuid)
|
57
43
|
if obj.nil? && !error.nil?
|
@@ -114,14 +100,14 @@ module RailsIdentity
|
|
114
100
|
# Attempts to retrieve the payload encoded in the token. It checks if
|
115
101
|
# the token is "valid" according to JWT definition and not expired.
|
116
102
|
#
|
117
|
-
# An Errors::
|
103
|
+
# An Repia::Errors::Unauthorized is raised if token cannot be decoded.
|
118
104
|
#
|
119
105
|
def get_token_payload(token)
|
120
106
|
begin
|
121
107
|
decoded = JWT.decode token, nil, false
|
122
108
|
rescue JWT::DecodeError => e
|
123
109
|
logger.error("Token decode error: #{e.message}")
|
124
|
-
raise Errors::
|
110
|
+
raise Repia::Errors::Unauthorized, "Invalid token: #{token}"
|
125
111
|
end
|
126
112
|
|
127
113
|
# At this point, we know that the token is not expired and
|
@@ -130,7 +116,7 @@ module RailsIdentity
|
|
130
116
|
if payload.nil?
|
131
117
|
# :nocov:
|
132
118
|
logger.error("Token payload is nil: #{token}")
|
133
|
-
raise Errors::
|
119
|
+
raise Repia::Errors::Unauthorized, "Invalid token payload: #{token}"
|
134
120
|
# :nocov:
|
135
121
|
end
|
136
122
|
return payload
|
@@ -141,7 +127,7 @@ module RailsIdentity
|
|
141
127
|
# session specified in the token payload are indeed valid. The
|
142
128
|
# required role is also checked.
|
143
129
|
#
|
144
|
-
# An Errors::
|
130
|
+
# An Repia::Errors::Unauthorized is thrown for all cases where token is
|
145
131
|
# invalid.
|
146
132
|
#
|
147
133
|
def verify_token_payload(token, payload, required_role: Roles::PUBLIC)
|
@@ -149,7 +135,7 @@ module RailsIdentity
|
|
149
135
|
session_uuid = payload["session_uuid"]
|
150
136
|
if user_uuid.nil? || session_uuid.nil?
|
151
137
|
logger.error("User UUID or session UUID is nil")
|
152
|
-
raise Errors::
|
138
|
+
raise Repia::Errors::Unauthorized,
|
153
139
|
"Invalid token payload content: #{token}"
|
154
140
|
end
|
155
141
|
logger.debug("Token well formatted for user #{user_uuid},
|
@@ -158,19 +144,19 @@ module RailsIdentity
|
|
158
144
|
logger.debug("Cache miss. Try database.")
|
159
145
|
auth_user = User.find_by_uuid(user_uuid)
|
160
146
|
if auth_user.nil? || auth_user.role < required_role
|
161
|
-
raise Errors::
|
147
|
+
raise Repia::Errors::Unauthorized,
|
162
148
|
"Well-formed but invalid user token: #{token}"
|
163
149
|
end
|
164
150
|
auth_session = Session.find_by_uuid(session_uuid)
|
165
151
|
if auth_session.nil?
|
166
|
-
raise Errors::
|
152
|
+
raise Repia::Errors::Unauthorized,
|
167
153
|
"Well-formed but invalid session token: #{token}"
|
168
154
|
end
|
169
155
|
begin
|
170
156
|
JWT.decode token, auth_session.secret, true
|
171
157
|
rescue JWT::DecodeError => e
|
172
158
|
logger.error(e.message)
|
173
|
-
raise Errors::
|
159
|
+
raise Repia::Errors::Unauthorized, "Cannot verify token: #{token}"
|
174
160
|
end
|
175
161
|
logger.debug("Token well formatted and verified. Set cache.")
|
176
162
|
return auth_session
|
data/lib/rails_identity.rb
CHANGED
@@ -17,37 +17,4 @@ module RailsIdentity
|
|
17
17
|
OWNER = 1000
|
18
18
|
end
|
19
19
|
|
20
|
-
# Errors defined by RailsIdentity
|
21
|
-
module Errors
|
22
|
-
class InvalidTokenError < StandardError; end
|
23
|
-
class ObjectNotFoundError < StandardError; end
|
24
|
-
class UnauthorizedError < StandardError; end
|
25
|
-
class InvalidOldPasswordError < StandardError; end
|
26
|
-
class InvalidResetTokenError < StandardError; end
|
27
|
-
end
|
28
|
-
|
29
|
-
# This module is a mixin that allows the model to use UUIDs instead of
|
30
|
-
# normal IDs. By including this module, the model class declares that the
|
31
|
-
# primary key is called "uuid" and an UUID is generated right before
|
32
|
-
# save(). You may assign an UUID prior to save, in which case, no new UUID
|
33
|
-
# will be generated.
|
34
|
-
module UUIDModel
|
35
|
-
|
36
|
-
def self.included(klass)
|
37
|
-
# Triggered when this module is included.
|
38
|
-
|
39
|
-
klass.primary_key = "uuid"
|
40
|
-
klass.before_create :generate_uuid
|
41
|
-
end
|
42
|
-
|
43
|
-
def generate_uuid()
|
44
|
-
# Generates an UUID for the model object only if it hasn't been assigned
|
45
|
-
# one yet.
|
46
|
-
|
47
|
-
if self.uuid.nil?
|
48
|
-
self.uuid = UUIDTools::UUID.timestamp_create().to_s
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
20
|
end
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/test/dummy/log/test.log
CHANGED
@@ -351232,3 +351232,1777 @@ RailsIdentity::SessionTest: test_session_has_token_and_secret_when_created
|
|
351232
351232
|
--------------------------------------------------------------------------
|
351233
351233
|
[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"]]
|
351234
351234
|
[1m[35m (0.0ms)[0m rollback transaction
|
351235
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
351236
|
+
[1m[35m (0.1ms)[0m begin transaction
|
351237
|
+
[1m[36mFixture Delete (1.4ms)[0m [1mDELETE FROM "rails_identity_sessions"[0m
|
351238
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('1', '1', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU', 'secret', '2016-04-23 04:39:23', '2016-04-23 04:39:23')
|
351239
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "rails_identity_sessions" ("uuid", "user_uuid", "token", "secret", "created_at", "updated_at") VALUES ('2', '2', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIyIiwidXNlcl91dWlkIjoiMiIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.3xUVSu-BqYaC0opuSwhpZTF0u7ECy1YTvwpyE4iD1_8', 'secret', '2016-04-23 04:39:23', '2016-04-23 04:39:23')[0m
|
351240
|
+
[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.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM2NzYzfQ.VVabmfGrQC4kee49nNRJXQnB3zdC-9Ojpn58BQTyH9I', 'secret', '2016-04-23 04:39:23', '2016-04-23 04:39:23')
|
351241
|
+
[1m[36mFixture Delete (1.2ms)[0m [1mDELETE FROM "rails_identity_users"[0m
|
351242
|
+
[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$0JcAn64cswDXMqV2mIPxUOP4sJjMnV91oXGgk6t/gckGDDa7AHp56', 10, 't', '2016-04-23 04:39:23', '2016-04-23 04:39:23')
|
351243
|
+
[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$avdauZBefxjwobKqIO6Ib.hxjGw2MuB2iMplVkwHIJNCpWzjor6BO', 10, 't', '2016-04-23 04:39:23', '2016-04-23 04:39:23')[0m
|
351244
|
+
[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$s4shtUtXijSPCuGb9K2JYuWXN1KY2NDkDkogT/YEWzsFpEHIRhK2W', 100, 't', '2016-04-23 04:39:23', '2016-04-23 04:39:23')
|
351245
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
351246
|
+
[1m[35m (0.1ms)[0m begin transaction
|
351247
|
+
----------------------------------------------------------------------------
|
351248
|
+
RailsIdentity::SessionsControllerTest: test_admin_can_delete_other's_session
|
351249
|
+
----------------------------------------------------------------------------
|
351250
|
+
[1m[36mRailsIdentity::Session Load (0.2ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "1"]]
|
351251
|
+
[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"]]
|
351252
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
351253
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM2NzYzfQ.VVabmfGrQC4kee49nNRJXQnB3zdC-9Ojpn58BQTyH9I", "id"=>"1"}
|
351254
|
+
Requires a token
|
351255
|
+
Token well formatted for user admin_one,
|
351256
|
+
session session_admin_one
|
351257
|
+
Cache miss. Try database.
|
351258
|
+
[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"]]
|
351259
|
+
[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"]]
|
351260
|
+
Token well formatted and verified. Set cache.
|
351261
|
+
[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"]]
|
351262
|
+
Attempting to get RailsIdentity::Session 1
|
351263
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351264
|
+
Checking to see if authorized to access object
|
351265
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
351266
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
|
351267
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
351268
|
+
Rendered text template (0.0ms)
|
351269
|
+
Completed 204 No Content in 28ms (Views: 7.4ms | ActiveRecord: 0.7ms)
|
351270
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
351271
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351272
|
+
----------------------------------------------------------------------------
|
351273
|
+
RailsIdentity::SessionsControllerTest: test_user_cannot_list_expired_session
|
351274
|
+
----------------------------------------------------------------------------
|
351275
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351276
|
+
[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"]]
|
351277
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
351278
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["user_uuid", "1"], ["uuid", "5a7fec86-090d-11e6-bc96-6c4008a6fa2a"], ["secret", "77839253-c88d-4f43-9a88-ff9e0b0a0f28"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWE3ZmVjODYtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2MywiZXhwIjoxNDYxMzg2MzYyfQ.U_wpDu-Mr0fuqMCFoZShVleOTaTemJBnzjcIsGckfN8"], ["created_at", "2016-04-23 04:39:23.908058"], ["updated_at", "2016-04-23 04:39:23.908058"]]
|
351279
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
351280
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
351281
|
+
Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU"}
|
351282
|
+
Requires a token
|
351283
|
+
Token well formatted for user 1,
|
351284
|
+
session 1
|
351285
|
+
Cache miss. Try database.
|
351286
|
+
[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"]]
|
351287
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351288
|
+
Token well formatted and verified. Set cache.
|
351289
|
+
[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"]]
|
351290
|
+
Attempting to get user 1
|
351291
|
+
Attempting to get RailsIdentity::User 1
|
351292
|
+
[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"]]
|
351293
|
+
Checking to see if authorized to access object
|
351294
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'[0m
|
351295
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [70c6ee8f-1edb-4a8a-ba56-195b3fcf8d9c] Performing RailsIdentity::SessionsCleanupJob from Inline(default) with arguments: "5a7fec86-090d-11e6-bc96-6c4008a6fa2a"
|
351296
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [70c6ee8f-1edb-4a8a-ba56-195b3fcf8d9c] [1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "5a7fec86-090d-11e6-bc96-6c4008a6fa2a"]]
|
351297
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [70c6ee8f-1edb-4a8a-ba56-195b3fcf8d9c] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
351298
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [70c6ee8f-1edb-4a8a-ba56-195b3fcf8d9c] [1m[35mSQL (0.3ms)[0m DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "5a7fec86-090d-11e6-bc96-6c4008a6fa2a"]]
|
351299
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [70c6ee8f-1edb-4a8a-ba56-195b3fcf8d9c] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
351300
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [70c6ee8f-1edb-4a8a-ba56-195b3fcf8d9c] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 5.79ms
|
351301
|
+
[ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: 70c6ee8f-1edb-4a8a-ba56-195b3fcf8d9c) to Inline(default) with arguments: "5a7fec86-090d-11e6-bc96-6c4008a6fa2a"
|
351302
|
+
Completed 200 OK in 40ms (Views: 0.9ms | ActiveRecord: 0.7ms)
|
351303
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
351304
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351305
|
+
-----------------------------------------------------------------------------------
|
351306
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_if_not_verified
|
351307
|
+
-----------------------------------------------------------------------------------
|
351308
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351309
|
+
[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"]]
|
351310
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
351311
|
+
[1m[36mRailsIdentity::User Exists (0.2ms)[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
|
351312
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rails_identity_users" SET "verified" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verified", "f"], ["updated_at", "2016-04-23 04:39:24.000315"], ["uuid", "1"]]
|
351313
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
351314
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
351315
|
+
Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
|
351316
|
+
[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"]]
|
351317
|
+
401 - Repia::Errors::Unauthorized
|
351318
|
+
Completed 401 Unauthorized in 64ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
351319
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
351320
|
+
[1m[35m (0.0ms)[0m begin transaction
|
351321
|
+
------------------------------------------------------------
|
351322
|
+
RailsIdentity::SessionsControllerTest: test_create_a_session
|
351323
|
+
------------------------------------------------------------
|
351324
|
+
[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"]]
|
351325
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351326
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
351327
|
+
Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
|
351328
|
+
[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"]]
|
351329
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
351330
|
+
[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", "5aa53ad6-090d-11e6-bc96-6c4008a6fa2a"], ["secret", "b1254f58-7f22-46a0-ada4-07394fa9a910"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWFhNTNhZDYtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NCwiZXhwIjoxNDYyNTk1OTY0fQ.DAopLg1SjOSbDxezcjT2PuswlYaiMc05b-1yNOOQJuU"], ["created_at", "2016-04-23 04:39:24.139130"], ["updated_at", "2016-04-23 04:39:24.139130"]]
|
351331
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
351332
|
+
Completed 201 Created in 66ms (Views: 0.4ms | ActiveRecord: 0.4ms)
|
351333
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
351334
|
+
[1m[35m (0.0ms)[0m begin transaction
|
351335
|
+
-----------------------------------------------------------------------
|
351336
|
+
RailsIdentity::SessionsControllerTest: test_cannot_show_other's_session
|
351337
|
+
-----------------------------------------------------------------------
|
351338
|
+
[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"]]
|
351339
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
351340
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"2"}
|
351341
|
+
Requires a token
|
351342
|
+
Token well formatted for user 1,
|
351343
|
+
session 1
|
351344
|
+
Cache miss. Try database.
|
351345
|
+
[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"]]
|
351346
|
+
[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"]]
|
351347
|
+
Token well formatted and verified. Set cache.
|
351348
|
+
[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"]]
|
351349
|
+
Attempting to get RailsIdentity::Session 2
|
351350
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "2"]]
|
351351
|
+
Checking to see if authorized to access object
|
351352
|
+
[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"]]
|
351353
|
+
401 - Repia::Errors::Unauthorized
|
351354
|
+
Completed 401 Unauthorized in 7ms (Views: 0.2ms | ActiveRecord: 0.3ms)
|
351355
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
351356
|
+
[1m[35m (0.1ms)[0m begin transaction
|
351357
|
+
--------------------------------------------------------------------
|
351358
|
+
RailsIdentity::SessionsControllerTest: test_delete_a_current_session
|
351359
|
+
--------------------------------------------------------------------
|
351360
|
+
[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"]]
|
351361
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
351362
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"current"}
|
351363
|
+
Requires a token
|
351364
|
+
Token well formatted for user 1,
|
351365
|
+
session 1
|
351366
|
+
Cache miss. Try database.
|
351367
|
+
[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"]]
|
351368
|
+
[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"]]
|
351369
|
+
Token well formatted and verified. Set cache.
|
351370
|
+
[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"]]
|
351371
|
+
Attempting to get RailsIdentity::Session 1
|
351372
|
+
[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"]]
|
351373
|
+
Checking to see if authorized to access object
|
351374
|
+
[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"]]
|
351375
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
351376
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
|
351377
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
351378
|
+
Rendered text template (0.0ms)
|
351379
|
+
Completed 204 No Content in 7ms (Views: 0.4ms | ActiveRecord: 0.5ms)
|
351380
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
351381
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351382
|
+
-----------------------------------------------------------------------
|
351383
|
+
RailsIdentity::SessionsControllerTest: test_public_cannot_list_sessions
|
351384
|
+
-----------------------------------------------------------------------
|
351385
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351386
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
351387
|
+
Requires a token
|
351388
|
+
Token decode error: Nil JSON web token
|
351389
|
+
401 - Invalid token:
|
351390
|
+
Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
351391
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
351392
|
+
[1m[35m (0.1ms)[0m begin transaction
|
351393
|
+
-----------------------------------------------------------------------------
|
351394
|
+
RailsIdentity::SessionsControllerTest: test_user_cannot_list_other's_sessions
|
351395
|
+
-----------------------------------------------------------------------------
|
351396
|
+
[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"]]
|
351397
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "2"]]
|
351398
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
351399
|
+
Parameters: {"user_id"=>"2", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU"}
|
351400
|
+
Requires a token
|
351401
|
+
Token well formatted for user 1,
|
351402
|
+
session 1
|
351403
|
+
Cache miss. Try database.
|
351404
|
+
[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"]]
|
351405
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351406
|
+
Token well formatted and verified. Set cache.
|
351407
|
+
[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"]]
|
351408
|
+
Attempting to get user 2
|
351409
|
+
Attempting to get RailsIdentity::User 2
|
351410
|
+
[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"]]
|
351411
|
+
Checking to see if authorized to access object
|
351412
|
+
401 - Not authorized to access user 2
|
351413
|
+
Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
351414
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
351415
|
+
[1m[35m (0.0ms)[0m begin transaction
|
351416
|
+
--------------------------------------------------------------------------------
|
351417
|
+
RailsIdentity::SessionsControllerTest: test_cannot_delete_a_non-existent_session
|
351418
|
+
--------------------------------------------------------------------------------
|
351419
|
+
[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"]]
|
351420
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
351421
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"999"}
|
351422
|
+
Requires a token
|
351423
|
+
Token well formatted for user 1,
|
351424
|
+
session 1
|
351425
|
+
Cache miss. Try database.
|
351426
|
+
[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"]]
|
351427
|
+
[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"]]
|
351428
|
+
Token well formatted and verified. Set cache.
|
351429
|
+
[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"]]
|
351430
|
+
Attempting to get RailsIdentity::Session 999
|
351431
|
+
[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"]]
|
351432
|
+
404 - RailsIdentity::Session 999 cannot be found
|
351433
|
+
Completed 404 Not Found in 4ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
351434
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
351435
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351436
|
+
--------------------------------------------------------------------------
|
351437
|
+
RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions
|
351438
|
+
--------------------------------------------------------------------------
|
351439
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351440
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
351441
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU"}
|
351442
|
+
Requires a token
|
351443
|
+
Token well formatted for user 1,
|
351444
|
+
session 1
|
351445
|
+
Cache miss. Try database.
|
351446
|
+
[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"]]
|
351447
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351448
|
+
Token well formatted and verified. Set cache.
|
351449
|
+
[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"]]
|
351450
|
+
Attempting to get user
|
351451
|
+
[1m[35mRailsIdentity::Session Load (0.2ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
|
351452
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [84a6bedb-d37d-4b5a-a6bd-d06b21f0a7dd] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
|
351453
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [84a6bedb-d37d-4b5a-a6bd-d06b21f0a7dd] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 0.2ms
|
351454
|
+
[ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: 84a6bedb-d37d-4b5a-a6bd-d06b21f0a7dd) to Inline(default)
|
351455
|
+
Completed 200 OK in 6ms (Views: 0.6ms | ActiveRecord: 0.3ms)
|
351456
|
+
[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"]]
|
351457
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
|
351458
|
+
[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"]]
|
351459
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
351460
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351461
|
+
-------------------------------------------------------------------------
|
351462
|
+
RailsIdentity::SessionsControllerTest: test_public_cannot_create_sessions
|
351463
|
+
-------------------------------------------------------------------------
|
351464
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351465
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
351466
|
+
Requires a token
|
351467
|
+
Token decode error: Nil JSON web token
|
351468
|
+
401 - Invalid token:
|
351469
|
+
Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
351470
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
351471
|
+
[1m[35m (0.1ms)[0m begin transaction
|
351472
|
+
----------------------------------------------------------------------------------------------
|
351473
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_non-existent_username
|
351474
|
+
----------------------------------------------------------------------------------------------
|
351475
|
+
[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"]]
|
351476
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
351477
|
+
Parameters: {"username"=>"idontexist", "password"=>"[FILTERED]"}
|
351478
|
+
[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"]]
|
351479
|
+
Attempting to get user
|
351480
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
351481
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
351482
|
+
[1m[35m (0.1ms)[0m begin transaction
|
351483
|
+
----------------------------------------------------------------------
|
351484
|
+
RailsIdentity::SessionsControllerTest: test_public_cannot_show_session
|
351485
|
+
----------------------------------------------------------------------
|
351486
|
+
[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"]]
|
351487
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
351488
|
+
Parameters: {"id"=>"1"}
|
351489
|
+
Requires a token
|
351490
|
+
Token decode error: Nil JSON web token
|
351491
|
+
401 - Invalid token:
|
351492
|
+
Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
351493
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
351494
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351495
|
+
---------------------------------------------------------------------------------------------------
|
351496
|
+
RailsIdentity::SessionsControllerTest: test_user_can_list_all_his_sessions_using_user_id_in_routing
|
351497
|
+
---------------------------------------------------------------------------------------------------
|
351498
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351499
|
+
[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"]]
|
351500
|
+
Processing by RailsIdentity::SessionsController#index as HTML
|
351501
|
+
Parameters: {"user_id"=>"1", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU"}
|
351502
|
+
Requires a token
|
351503
|
+
Token well formatted for user 1,
|
351504
|
+
session 1
|
351505
|
+
Cache miss. Try database.
|
351506
|
+
[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"]]
|
351507
|
+
[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"]]
|
351508
|
+
Token well formatted and verified. Set cache.
|
351509
|
+
[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"]]
|
351510
|
+
Attempting to get user 1
|
351511
|
+
Attempting to get RailsIdentity::User 1
|
351512
|
+
[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"]]
|
351513
|
+
Checking to see if authorized to access object
|
351514
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'
|
351515
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [d9ab19c7-4bf9-405a-b5e3-1ac0b6c17418] Performing RailsIdentity::SessionsCleanupJob from Inline(default)
|
351516
|
+
[ActiveJob] [RailsIdentity::SessionsCleanupJob] [d9ab19c7-4bf9-405a-b5e3-1ac0b6c17418] Performed RailsIdentity::SessionsCleanupJob from Inline(default) in 0.06ms
|
351517
|
+
[ActiveJob] Enqueued RailsIdentity::SessionsCleanupJob (Job ID: d9ab19c7-4bf9-405a-b5e3-1ac0b6c17418) to Inline(default)
|
351518
|
+
Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 0.3ms)
|
351519
|
+
[1m[36mRailsIdentity::Session Load (0.1ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."user_uuid" = '1'[0m
|
351520
|
+
[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"]]
|
351521
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
351522
|
+
[1m[35m (0.0ms)[0m begin transaction
|
351523
|
+
-----------------------------------------------------------------------------
|
351524
|
+
RailsIdentity::SessionsControllerTest: test_cannot_show_a_nonexisting_session
|
351525
|
+
-----------------------------------------------------------------------------
|
351526
|
+
[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"]]
|
351527
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
351528
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"999"}
|
351529
|
+
Requires a token
|
351530
|
+
Token well formatted for user 1,
|
351531
|
+
session 1
|
351532
|
+
Cache miss. Try database.
|
351533
|
+
[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"]]
|
351534
|
+
[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"]]
|
351535
|
+
Token well formatted and verified. Set cache.
|
351536
|
+
[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"]]
|
351537
|
+
Attempting to get RailsIdentity::Session 999
|
351538
|
+
[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"]]
|
351539
|
+
404 - RailsIdentity::Session 999 cannot be found
|
351540
|
+
Completed 404 Not Found in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
351541
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
351542
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351543
|
+
------------------------------------------------------------------------------------
|
351544
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_username
|
351545
|
+
------------------------------------------------------------------------------------
|
351546
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351547
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
351548
|
+
Parameters: {"password"=>"[FILTERED]"}
|
351549
|
+
[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
|
351550
|
+
Attempting to get user
|
351551
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
351552
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
351553
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351554
|
+
-------------------------------------------------------------------------
|
351555
|
+
RailsIdentity::SessionsControllerTest: test_cannot_delete_other's_session
|
351556
|
+
-------------------------------------------------------------------------
|
351557
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351558
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
351559
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"2"}
|
351560
|
+
Requires a token
|
351561
|
+
Token well formatted for user 1,
|
351562
|
+
session 1
|
351563
|
+
Cache miss. Try database.
|
351564
|
+
[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"]]
|
351565
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351566
|
+
Token well formatted and verified. Set cache.
|
351567
|
+
[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"]]
|
351568
|
+
Attempting to get RailsIdentity::Session 2
|
351569
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "2"]]
|
351570
|
+
Checking to see if authorized to access object
|
351571
|
+
[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"]]
|
351572
|
+
401 - Repia::Errors::Unauthorized
|
351573
|
+
Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
351574
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
351575
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
351576
|
+
-----------------------------------------------------------------------------------------
|
351577
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_with_a_wrong_password
|
351578
|
+
-----------------------------------------------------------------------------------------
|
351579
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351580
|
+
[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"]]
|
351581
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
351582
|
+
Parameters: {"username"=>"one@example.com", "password"=>"[FILTERED]"}
|
351583
|
+
[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"]]
|
351584
|
+
Attempting to get user
|
351585
|
+
Completed 401 Unauthorized in 65ms (Views: 0.3ms | ActiveRecord: 0.1ms)
|
351586
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
351587
|
+
[1m[35m (0.0ms)[0m begin transaction
|
351588
|
+
------------------------------------------------------------------
|
351589
|
+
RailsIdentity::SessionsControllerTest: test_public_can_see_options
|
351590
|
+
------------------------------------------------------------------
|
351591
|
+
[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"]]
|
351592
|
+
Processing by RailsIdentity::SessionsController#options as HTML
|
351593
|
+
Rendered text template (0.0ms)
|
351594
|
+
Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
|
351595
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
351596
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351597
|
+
--------------------------------------------------------------------------------------
|
351598
|
+
RailsIdentity::SessionsControllerTest: test_cannot_create_a_session_without_a_password
|
351599
|
+
--------------------------------------------------------------------------------------
|
351600
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351601
|
+
[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"]]
|
351602
|
+
Processing by RailsIdentity::SessionsController#create as HTML
|
351603
|
+
Parameters: {"username"=>"one@example.com"}
|
351604
|
+
[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"]]
|
351605
|
+
Attempting to get user
|
351606
|
+
Completed 401 Unauthorized in 63ms (Views: 0.3ms | ActiveRecord: 0.0ms)
|
351607
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
351608
|
+
[1m[35m (0.0ms)[0m begin transaction
|
351609
|
+
------------------------------------------------------------
|
351610
|
+
RailsIdentity::SessionsControllerTest: test_delete_a_session
|
351611
|
+
------------------------------------------------------------
|
351612
|
+
[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"]]
|
351613
|
+
Processing by RailsIdentity::SessionsController#destroy as HTML
|
351614
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"1"}
|
351615
|
+
Requires a token
|
351616
|
+
Token well formatted for user 1,
|
351617
|
+
session 1
|
351618
|
+
Cache miss. Try database.
|
351619
|
+
[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"]]
|
351620
|
+
[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"]]
|
351621
|
+
Token well formatted and verified. Set cache.
|
351622
|
+
[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"]]
|
351623
|
+
Attempting to get RailsIdentity::Session 1
|
351624
|
+
[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"]]
|
351625
|
+
Checking to see if authorized to access object
|
351626
|
+
[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"]]
|
351627
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
351628
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? [["uuid", "1"]]
|
351629
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
351630
|
+
Rendered text template (0.0ms)
|
351631
|
+
Completed 204 No Content in 6ms (Views: 0.3ms | ActiveRecord: 0.4ms)
|
351632
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
351633
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351634
|
+
--------------------------------------------------------------------------
|
351635
|
+
RailsIdentity::SessionsControllerTest: test_admin_can_show_other's_session
|
351636
|
+
--------------------------------------------------------------------------
|
351637
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351638
|
+
[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"]]
|
351639
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
351640
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM2NzYzfQ.VVabmfGrQC4kee49nNRJXQnB3zdC-9Ojpn58BQTyH9I", "id"=>"1"}
|
351641
|
+
Requires a token
|
351642
|
+
Token well formatted for user admin_one,
|
351643
|
+
session session_admin_one
|
351644
|
+
Cache miss. Try database.
|
351645
|
+
[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"]]
|
351646
|
+
[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"]]
|
351647
|
+
Token well formatted and verified. Set cache.
|
351648
|
+
[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"]]
|
351649
|
+
Attempting to get RailsIdentity::Session 1
|
351650
|
+
[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"]]
|
351651
|
+
Checking to see if authorized to access object
|
351652
|
+
Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms)
|
351653
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
351654
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351655
|
+
-----------------------------------------------------------------------
|
351656
|
+
RailsIdentity::SessionsControllerTest: test_cannot_show_expired_session
|
351657
|
+
-----------------------------------------------------------------------
|
351658
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351659
|
+
[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"]]
|
351660
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
351661
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["user_uuid", "1"], ["uuid", "5ace63a2-090d-11e6-bc96-6c4008a6fa2a"], ["secret", "883f07d8-d3b0-4e3e-b858-e4990e43ce10"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWFjZTYzYTItMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NCwiZXhwIjoxNDYxMzg2MzYzfQ.0NB_nOX97Rlcdlbw2JHgpQMqD56FiyuysXRuTKm2geo"], ["created_at", "2016-04-23 04:39:24.408625"], ["updated_at", "2016-04-23 04:39:24.408625"]]
|
351662
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
351663
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
351664
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"5ace63a2-090d-11e6-bc96-6c4008a6fa2a"}
|
351665
|
+
Requires a token
|
351666
|
+
Token well formatted for user 1,
|
351667
|
+
session 1
|
351668
|
+
Cache miss. Try database.
|
351669
|
+
[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"]]
|
351670
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351671
|
+
Token well formatted and verified. Set cache.
|
351672
|
+
[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"]]
|
351673
|
+
Attempting to get RailsIdentity::Session 5ace63a2-090d-11e6-bc96-6c4008a6fa2a
|
351674
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "5ace63a2-090d-11e6-bc96-6c4008a6fa2a"]]
|
351675
|
+
Checking to see if authorized to access object
|
351676
|
+
[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"]]
|
351677
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
351678
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ?[0m [["uuid", "5ace63a2-090d-11e6-bc96-6c4008a6fa2a"]]
|
351679
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
351680
|
+
404 - Repia::Errors::NotFound
|
351681
|
+
Completed 404 Not Found in 6ms (Views: 0.2ms | ActiveRecord: 0.4ms)
|
351682
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
351683
|
+
[1m[35m (0.1ms)[0m begin transaction
|
351684
|
+
----------------------------------------------------------
|
351685
|
+
RailsIdentity::SessionsControllerTest: test_show_a_session
|
351686
|
+
----------------------------------------------------------
|
351687
|
+
[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"]]
|
351688
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
351689
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"1"}
|
351690
|
+
Requires a token
|
351691
|
+
Token well formatted for user 1,
|
351692
|
+
session 1
|
351693
|
+
Cache miss. Try database.
|
351694
|
+
[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"]]
|
351695
|
+
[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"]]
|
351696
|
+
Token well formatted and verified. Set cache.
|
351697
|
+
[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"]]
|
351698
|
+
Attempting to get RailsIdentity::Session 1
|
351699
|
+
[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"]]
|
351700
|
+
Checking to see if authorized to access object
|
351701
|
+
[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"]]
|
351702
|
+
Completed 200 OK in 7ms (Views: 0.8ms | ActiveRecord: 0.3ms)
|
351703
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
351704
|
+
[1m[35m (0.0ms)[0m begin transaction
|
351705
|
+
------------------------------------------------------------------
|
351706
|
+
RailsIdentity::SessionsControllerTest: test_show_a_current_session
|
351707
|
+
------------------------------------------------------------------
|
351708
|
+
[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"]]
|
351709
|
+
Processing by RailsIdentity::SessionsController#show as HTML
|
351710
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"current"}
|
351711
|
+
Requires a token
|
351712
|
+
Token well formatted for user 1,
|
351713
|
+
session 1
|
351714
|
+
Cache miss. Try database.
|
351715
|
+
[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"]]
|
351716
|
+
[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"]]
|
351717
|
+
Token well formatted and verified. Set cache.
|
351718
|
+
[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"]]
|
351719
|
+
Attempting to get RailsIdentity::Session 1
|
351720
|
+
[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"]]
|
351721
|
+
Checking to see if authorized to access object
|
351722
|
+
[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"]]
|
351723
|
+
Completed 200 OK in 5ms (Views: 0.4ms | ActiveRecord: 0.2ms)
|
351724
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
351725
|
+
[1m[35m (0.0ms)[0m begin transaction
|
351726
|
+
-----------------------------
|
351727
|
+
RailsIdentityTest: test_truth
|
351728
|
+
-----------------------------
|
351729
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
351730
|
+
[1m[35m (0.0ms)[0m begin transaction
|
351731
|
+
----------------------------------------------------------------------
|
351732
|
+
RailsIdentity::UserTest: test_user_is_valid_with_username_and_password
|
351733
|
+
----------------------------------------------------------------------
|
351734
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
351735
|
+
[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
|
351736
|
+
[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$oyXv4RtwmL2jOWlIXy8Cpecyj0tX79/3RFLiaeCZh/z.CHQ7jzm/C"], ["role", 10], ["created_at", "2016-04-23 04:39:24.443007"], ["updated_at", "2016-04-23 04:39:24.443007"], ["uuid", "5ad3c4aa-090d-11e6-bc96-6c4008a6fa2a"]]
|
351737
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
351738
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
351739
|
+
[1m[35m (0.0ms)[0m begin transaction
|
351740
|
+
------------------------------------------------------------------
|
351741
|
+
RailsIdentity::UserTest: test_user_is_not_valid_without_a_username
|
351742
|
+
------------------------------------------------------------------
|
351743
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
351744
|
+
[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
|
351745
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
351746
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
351747
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351748
|
+
------------------------------------------------------------------
|
351749
|
+
RailsIdentity::UserTest: test_user_is_not_valid_without_a_password
|
351750
|
+
------------------------------------------------------------------
|
351751
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
351752
|
+
[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
|
351753
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
351754
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
351755
|
+
[1m[35m (0.0ms)[0m begin transaction
|
351756
|
+
---------------------------------------------------------------------------
|
351757
|
+
RailsIdentity::UserTest: test_user_is_not_valid_if_username_is_malformatted
|
351758
|
+
---------------------------------------------------------------------------
|
351759
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
351760
|
+
[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
|
351761
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
351762
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
351763
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
351764
|
+
--------------------------------------------------------------------------
|
351765
|
+
RailsIdentity::UserTest: test_user_is_not_valid_if_username_already_exists
|
351766
|
+
--------------------------------------------------------------------------
|
351767
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
351768
|
+
[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
|
351769
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
351770
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
351771
|
+
[1m[35m (0.1ms)[0m begin transaction
|
351772
|
+
----------------------------------------------------------
|
351773
|
+
RailsIdentity::UserTest: test_user_can_issue_a_reset_token
|
351774
|
+
----------------------------------------------------------
|
351775
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
351776
|
+
[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
|
351777
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "rails_identity_users" ("username", "password_digest", "role", "created_at", "updated_at", "uuid") VALUES (?, ?, ?, ?, ?, ?)[0m [["username", "foo@example.com"], ["password_digest", "$2a$04$8rTfUb3aKQIhnV8kLQHKqu3qWdS5h4EFNr0y1gW/PxiHLxVL1wkge"], ["role", 10], ["created_at", "2016-04-23 04:39:24.460789"], ["updated_at", "2016-04-23 04:39:24.460789"], ["uuid", "5ad67a1a-090d-11e6-bc96-6c4008a6fa2a"]]
|
351778
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
351779
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
351780
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "5ad67a1a-090d-11e6-bc96-6c4008a6fa2a"], ["uuid", "5ad6a670-090d-11e6-bc96-6c4008a6fa2a"], ["secret", "7d8641eb-1ea7-427c-bbc3-466761d756c9"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YWQ2N2ExYS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YWQ2YTY3MC0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg2MzY0LCJleHAiOjE0NjEzODk5NjR9._zCggg7Gm9irWqn_lnSM5WJcFTHZUBB73OPN-za5fCU"], ["created_at", "2016-04-23 04:39:24.462808"], ["updated_at", "2016-04-23 04:39:24.462808"]]
|
351781
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
351782
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
351783
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
351784
|
+
-----------------------------------------------------------------
|
351785
|
+
RailsIdentity::UserTest: test_user_can_issue_a_verification_token
|
351786
|
+
-----------------------------------------------------------------
|
351787
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
351788
|
+
[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
|
351789
|
+
[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$UDJIIo4BFMVqPyxMA/3TjOEDkObMRHC4fxPO3clVoZrjGKfdSUhn6"], ["role", 10], ["created_at", "2016-04-23 04:39:24.468252"], ["updated_at", "2016-04-23 04:39:24.468252"], ["uuid", "5ad79f08-090d-11e6-bc96-6c4008a6fa2a"]]
|
351790
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
351791
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
351792
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["user_uuid", "5ad79f08-090d-11e6-bc96-6c4008a6fa2a"], ["uuid", "5ad7d482-090d-11e6-bc96-6c4008a6fa2a"], ["secret", "257cafa9-ae55-4cc9-9d9f-7d90f6f115df"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YWQ3OWYwOC0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YWQ3ZDQ4Mi0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg2MzY0LCJleHAiOjE0NjEzODk5NjR9.iR5cCUQW2j6GdHLxxjtbtjjJD_cZ8hJehKtgzS7SqFU"], ["created_at", "2016-04-23 04:39:24.470481"], ["updated_at", "2016-04-23 04:39:24.470481"]]
|
351793
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
351794
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
351795
|
+
[1m[35m (0.0ms)[0m begin transaction
|
351796
|
+
---------------------------------------------------------------
|
351797
|
+
RailsIdentity::UserTest: test_user_has_a_role_of_100_by_default
|
351798
|
+
---------------------------------------------------------------
|
351799
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
351800
|
+
[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
|
351801
|
+
[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$MWT9SAjmC8PPlk1wyo/.CuSbI7owUWnrT6cs.mFYL7nFPWKmO5zPy"], ["role", 10], ["created_at", "2016-04-23 04:39:24.474883"], ["updated_at", "2016-04-23 04:39:24.474883"], ["uuid", "5ad8a100-090d-11e6-bc96-6c4008a6fa2a"]]
|
351802
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
351803
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
351804
|
+
[1m[35m (0.1ms)[0m begin transaction
|
351805
|
+
-----------------------------------------------
|
351806
|
+
RailsIdentity::SessionTest: test_save_a_session
|
351807
|
+
-----------------------------------------------
|
351808
|
+
[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"]]
|
351809
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
351810
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["user_uuid", "1"], ["uuid", "5ad99074-090d-11e6-bc96-6c4008a6fa2a"], ["secret", "c61dbce3-3753-4128-9abd-baff0fae253c"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWFkOTkwNzQtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NCwiZXhwIjoxNDYyNTk1OTY0fQ.8yGWFM6IvEgrYGZMnBXtUxt09kbYOIvZVvrjfqWrhg0"], ["created_at", "2016-04-23 04:39:24.482073"], ["updated_at", "2016-04-23 04:39:24.482073"]]
|
351811
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
351812
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
351813
|
+
[1m[35m (0.1ms)[0m begin transaction
|
351814
|
+
---------------------------------------------------------------------
|
351815
|
+
RailsIdentity::SessionTest: test_cannot_save_a_session_without_a_user
|
351816
|
+
---------------------------------------------------------------------
|
351817
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
351818
|
+
[1m[35m (0.0ms)[0m begin transaction
|
351819
|
+
--------------------------------------------------------------------------
|
351820
|
+
RailsIdentity::SessionTest: test_session_has_token_and_secret_when_created
|
351821
|
+
--------------------------------------------------------------------------
|
351822
|
+
[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"]]
|
351823
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
351824
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351825
|
+
---------------------------------------------------------------------
|
351826
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_using_ill-formed
|
351827
|
+
---------------------------------------------------------------------
|
351828
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351829
|
+
[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"]]
|
351830
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
351831
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NCwiZXhwIjoxNDYxMzg2NDI0fQ.EKZ0J5RvMHvVujBWyocwPZyfj9tMjOvwDeyaH2pnasQ", "id"=>"1"}
|
351832
|
+
Requires a token
|
351833
|
+
User UUID or session UUID is nil
|
351834
|
+
401 - Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NCwiZXhwIjoxNDYxMzg2NDI0fQ.EKZ0J5RvMHvVujBWyocwPZyfj9tMjOvwDeyaH2pnasQ
|
351835
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
351836
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
351837
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351838
|
+
-------------------------------------------------------------------------------------------------
|
351839
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_without_username
|
351840
|
+
-------------------------------------------------------------------------------------------------
|
351841
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351842
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
351843
|
+
Parameters: {"issue_reset_token"=>true, "id"=>"current"}
|
351844
|
+
Accepts a token
|
351845
|
+
Token decode error: Nil JSON web token
|
351846
|
+
Suppressing error: Invalid token:
|
351847
|
+
[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
|
351848
|
+
404 - Repia::Errors::NotFound
|
351849
|
+
Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
351850
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
351851
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351852
|
+
---------------------------------------------------------------------------------------------
|
351853
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_non-existing_token
|
351854
|
+
---------------------------------------------------------------------------------------------
|
351855
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351856
|
+
[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"]]
|
351857
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
351858
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjEzODYzNjQsImV4cCI6MTQ2MTM4NjQyNH0.yr_JZkzbKmzZAq6ufP8TagNqe5kSe1zXv9eOScfsTHI", "id"=>"1"}
|
351859
|
+
Requires a token
|
351860
|
+
Token well formatted for user 1,
|
351861
|
+
session 1
|
351862
|
+
Cache miss. Try database.
|
351863
|
+
[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"]]
|
351864
|
+
[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"]]
|
351865
|
+
Signature verification raised
|
351866
|
+
401 - Cannot verify token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiMSIsInJvbGUiOjEwLCJpYXQiOjE0NjEzODYzNjQsImV4cCI6MTQ2MTM4NjQyNH0.yr_JZkzbKmzZAq6ufP8TagNqe5kSe1zXv9eOScfsTHI
|
351867
|
+
Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
351868
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
351869
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351870
|
+
------------------------------------------------------
|
351871
|
+
RailsIdentity::UsersControllerTest: test_create_a_user
|
351872
|
+
------------------------------------------------------
|
351873
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351874
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
351875
|
+
Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
|
351876
|
+
Accepts a token
|
351877
|
+
Token decode error: Nil JSON web token
|
351878
|
+
Suppressing error: Invalid token:
|
351879
|
+
Create new user
|
351880
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
351881
|
+
[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
|
351882
|
+
[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$8090dA6OwogUm5ZAR0KYiemdHpXSBnV.R0cnMLDWhjuHEdoAKLyei"], ["role", 10], ["created_at", "2016-04-23 04:39:24.518360"], ["updated_at", "2016-04-23 04:39:24.518360"], ["uuid", "5adf442e-090d-11e6-bc96-6c4008a6fa2a"]]
|
351883
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
351884
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
351885
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "5adf442e-090d-11e6-bc96-6c4008a6fa2a"], ["uuid", "5adf8880-090d-11e6-bc96-6c4008a6fa2a"], ["secret", "f31e0229-a1fc-4231-92aa-9f1978077bce"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YWRmNDQyZS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YWRmODg4MC0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg2MzY0LCJleHAiOjE0NjEzODk5NjR9.J_c83T84Y0dTdNIW6jtQYZ5mNU7uJJN96yLXy0vZ6Zo"], ["created_at", "2016-04-23 04:39:24.520959"], ["updated_at", "2016-04-23 04:39:24.520959"]]
|
351886
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
351887
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
351888
|
+
[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" != '5adf442e-090d-11e6-bc96-6c4008a6fa2a') LIMIT 1[0m
|
351889
|
+
[1m[35mSQL (0.3ms)[0m UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YWRmNDQyZS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YWRmODg4MC0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg2MzY0LCJleHAiOjE0NjEzODk5NjR9.J_c83T84Y0dTdNIW6jtQYZ5mNU7uJJN96yLXy0vZ6Zo"], ["updated_at", "2016-04-23 04:39:24.560765"], ["uuid", "5adf442e-090d-11e6-bc96-6c4008a6fa2a"]]
|
351890
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
351891
|
+
[ActiveJob] [1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "5adf442e-090d-11e6-bc96-6c4008a6fa2a"]]
|
351892
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [27113dbe-e675-48cf-8de4-e06f0ef5925b] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/5adf442e-090d-11e6-bc96-6c4008a6fa2a
|
351893
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [27113dbe-e675-48cf-8de4-e06f0ef5925b] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (1.4ms)
|
351894
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [27113dbe-e675-48cf-8de4-e06f0ef5925b] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.3ms)
|
351895
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [27113dbe-e675-48cf-8de4-e06f0ef5925b]
|
351896
|
+
RailsIdentity::UserMailer#email_verification: processed outbound mail in 182.0ms
|
351897
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [27113dbe-e675-48cf-8de4-e06f0ef5925b]
|
351898
|
+
Sent mail to foo@example.com (11.8ms)
|
351899
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [27113dbe-e675-48cf-8de4-e06f0ef5925b] Date: Fri, 22 Apr 2016 23:39:24 -0500
|
351900
|
+
From: no-reply@rails-identity.com
|
351901
|
+
To: foo@example.com
|
351902
|
+
Message-ID: <571afc7cbbdb1_844a3fe160852470633b1@galt.local.mail>
|
351903
|
+
Subject: [rails-identity] Email Confirmation
|
351904
|
+
Mime-Version: 1.0
|
351905
|
+
Content-Type: multipart/alternative;
|
351906
|
+
boundary="--==_mimepart_571afc7cb9dd4_844a3fe160852470632a0";
|
351907
|
+
charset=UTF-8
|
351908
|
+
Content-Transfer-Encoding: 7bit
|
351909
|
+
|
351910
|
+
|
351911
|
+
----==_mimepart_571afc7cb9dd4_844a3fe160852470632a0
|
351912
|
+
Content-Type: text/plain;
|
351913
|
+
charset=UTF-8
|
351914
|
+
Content-Transfer-Encoding: 7bit
|
351915
|
+
|
351916
|
+
Dear foo@example.com,
|
351917
|
+
|
351918
|
+
Please confirm your account with rails-identity by making a PATCH request
|
351919
|
+
on the current user with a provided verification token. For example,
|
351920
|
+
|
351921
|
+
http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YWRmNDQyZS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YWRmODg4MC0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg2MzY0LCJleHAiOjE0NjEzODk5NjR9.J_c83T84Y0dTdNIW6jtQYZ5mNU7uJJN96yLXy0vZ6Zo verified=true
|
351922
|
+
|
351923
|
+
will confirm the account. Here is the verification token:
|
351924
|
+
|
351925
|
+
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YWRmNDQyZS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YWRmODg4MC0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg2MzY0LCJleHAiOjE0NjEzODk5NjR9.J_c83T84Y0dTdNIW6jtQYZ5mNU7uJJN96yLXy0vZ6Zo
|
351926
|
+
|
351927
|
+
Thank you for using rails-identity,
|
351928
|
+
rails-identity
|
351929
|
+
|
351930
|
+
|
351931
|
+
----==_mimepart_571afc7cb9dd4_844a3fe160852470632a0
|
351932
|
+
Content-Type: text/html;
|
351933
|
+
charset=UTF-8
|
351934
|
+
Content-Transfer-Encoding: 7bit
|
351935
|
+
|
351936
|
+
<html>
|
351937
|
+
<body>
|
351938
|
+
<p>Dear foo@example.com,</p>
|
351939
|
+
|
351940
|
+
<p>Please confirm your account with rails-identity by making a PATCH request
|
351941
|
+
on the current user with a provided verification token. For example,
|
351942
|
+
<pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YWRmNDQyZS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YWRmODg4MC0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg2MzY0LCJleHAiOjE0NjEzODk5NjR9.J_c83T84Y0dTdNIW6jtQYZ5mNU7uJJN96yLXy0vZ6Zo
|
351943
|
+
verified=true</pre> will confirm the account. Here is the verification
|
351944
|
+
token:</p>
|
351945
|
+
|
351946
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YWRmNDQyZS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YWRmODg4MC0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg2MzY0LCJleHAiOjE0NjEzODk5NjR9.J_c83T84Y0dTdNIW6jtQYZ5mNU7uJJN96yLXy0vZ6Zo</pre>
|
351947
|
+
|
351948
|
+
<p>Thank you for using rails-identity</p>
|
351949
|
+
<p><b>rails-identity</b></p>
|
351950
|
+
|
351951
|
+
</body>
|
351952
|
+
</html>
|
351953
|
+
|
351954
|
+
----==_mimepart_571afc7cb9dd4_844a3fe160852470632a0--
|
351955
|
+
|
351956
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [27113dbe-e675-48cf-8de4-e06f0ef5925b] Performed ActionMailer::DeliveryJob from Inline(mailers) in 194.71ms
|
351957
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 27113dbe-e675-48cf-8de4-e06f0ef5925b) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/5adf442e-090d-11e6-bc96-6c4008a6fa2a
|
351958
|
+
Completed 201 Created in 260ms (Views: 0.3ms | ActiveRecord: 1.1ms)
|
351959
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
351960
|
+
[1m[35m (0.0ms)[0m begin transaction
|
351961
|
+
-----------------------------------------------------------------
|
351962
|
+
RailsIdentity::UsersControllerTest: test_admin_can_list_all_users
|
351963
|
+
-----------------------------------------------------------------
|
351964
|
+
[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"]]
|
351965
|
+
[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"]]
|
351966
|
+
Processing by RailsIdentity::UsersController#index as HTML
|
351967
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM2NzYzfQ.VVabmfGrQC4kee49nNRJXQnB3zdC-9Ojpn58BQTyH9I"}
|
351968
|
+
Requires an admin token
|
351969
|
+
Token well formatted for user admin_one,
|
351970
|
+
session session_admin_one
|
351971
|
+
Cache miss. Try database.
|
351972
|
+
[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"]]
|
351973
|
+
[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"]]
|
351974
|
+
Token well formatted and verified. Set cache.
|
351975
|
+
[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"]]
|
351976
|
+
[1m[35mRailsIdentity::User Load (0.1ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."deleted_at" IS NULL
|
351977
|
+
Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 0.2ms)
|
351978
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "rails_identity_sessions"[0m
|
351979
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
351980
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
351981
|
+
---------------------------------------------------------------------------
|
351982
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_using_no_token_payload
|
351983
|
+
---------------------------------------------------------------------------
|
351984
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
351985
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
351986
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.v8kiJa5X6Jg8oZucYNTx5t5m1SIIRTa_7TcAe5MuX1s", "id"=>"1"}
|
351987
|
+
Requires a token
|
351988
|
+
User UUID or session UUID is nil
|
351989
|
+
401 - Invalid token payload content: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.e30.v8kiJa5X6Jg8oZucYNTx5t5m1SIIRTa_7TcAe5MuX1s
|
351990
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
351991
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
351992
|
+
[1m[35m (0.0ms)[0m begin transaction
|
351993
|
+
-------------------------------------------------------------------
|
351994
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_another_user
|
351995
|
+
-------------------------------------------------------------------
|
351996
|
+
[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"]]
|
351997
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
351998
|
+
Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"2"}
|
351999
|
+
Accepts a token
|
352000
|
+
Token well formatted for user 1,
|
352001
|
+
session 1
|
352002
|
+
Cache miss. Try database.
|
352003
|
+
[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"]]
|
352004
|
+
[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"]]
|
352005
|
+
Token well formatted and verified. Set cache.
|
352006
|
+
[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"]]
|
352007
|
+
Attempting to get RailsIdentity::User 2
|
352008
|
+
[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"]]
|
352009
|
+
Checking to see if authorized to access object
|
352010
|
+
401 - Repia::Errors::Unauthorized
|
352011
|
+
Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
352012
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
352013
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
352014
|
+
-----------------------------------------------------------------------------------------------------------
|
352015
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_token_with_invalid_username
|
352016
|
+
-----------------------------------------------------------------------------------------------------------
|
352017
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352018
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
352019
|
+
Parameters: {"issue_verification_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
|
352020
|
+
Accepts a token
|
352021
|
+
Token decode error: Nil JSON web token
|
352022
|
+
Suppressing error: Invalid token:
|
352023
|
+
[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"]]
|
352024
|
+
404 - Repia::Errors::NotFound
|
352025
|
+
Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
352026
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
352027
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
352028
|
+
-----------------------------------------------------------------------
|
352029
|
+
RailsIdentity::UsersControllerTest: test_admin_can_create_an_admin_user
|
352030
|
+
-----------------------------------------------------------------------
|
352031
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352032
|
+
[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"]]
|
352033
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
352034
|
+
Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM2NzYzfQ.VVabmfGrQC4kee49nNRJXQnB3zdC-9Ojpn58BQTyH9I"}
|
352035
|
+
Accepts a token
|
352036
|
+
Token well formatted for user admin_one,
|
352037
|
+
session session_admin_one
|
352038
|
+
Cache miss. Try database.
|
352039
|
+
[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"]]
|
352040
|
+
[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"]]
|
352041
|
+
Token well formatted and verified. Set cache.
|
352042
|
+
[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"]]
|
352043
|
+
Create new user
|
352044
|
+
Unpermitted parameter: token
|
352045
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
352046
|
+
[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
|
352047
|
+
[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$UKmFrEmWjjSQw.hoUheHUOsabV/RyLJt3hrtWZ3dwVvJQUXGAUa2G"], ["role", 100], ["created_at", "2016-04-23 04:39:24.816740"], ["updated_at", "2016-04-23 04:39:24.816740"], ["uuid", "5b0ccdc2-090d-11e6-bc96-6c4008a6fa2a"]]
|
352048
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
352049
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
352050
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "5b0ccdc2-090d-11e6-bc96-6c4008a6fa2a"], ["uuid", "5b0d191c-090d-11e6-bc96-6c4008a6fa2a"], ["secret", "efe26c59-5728-4d63-8c6c-bddd7a86d634"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YjBjY2RjMi0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YjBkMTkxYy0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4NjM2NCwiZXhwIjoxNDYxMzg5OTY0fQ.4taSo0DAZ5gLb4p3qQQOWT7rlEm_JBEswKzWTsvyAQo"], ["created_at", "2016-04-23 04:39:24.819634"], ["updated_at", "2016-04-23 04:39:24.819634"]]
|
352051
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
352052
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
352053
|
+
[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" != '5b0ccdc2-090d-11e6-bc96-6c4008a6fa2a') LIMIT 1[0m
|
352054
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YjBjY2RjMi0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YjBkMTkxYy0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4NjM2NCwiZXhwIjoxNDYxMzg5OTY0fQ.4taSo0DAZ5gLb4p3qQQOWT7rlEm_JBEswKzWTsvyAQo"], ["updated_at", "2016-04-23 04:39:24.821465"], ["uuid", "5b0ccdc2-090d-11e6-bc96-6c4008a6fa2a"]]
|
352055
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
352056
|
+
[ActiveJob] [1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "5b0ccdc2-090d-11e6-bc96-6c4008a6fa2a"]]
|
352057
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [501b4152-2c77-4e60-8094-5271b81e1977] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/5b0ccdc2-090d-11e6-bc96-6c4008a6fa2a
|
352058
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [501b4152-2c77-4e60-8094-5271b81e1977] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
|
352059
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [501b4152-2c77-4e60-8094-5271b81e1977] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
|
352060
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [501b4152-2c77-4e60-8094-5271b81e1977]
|
352061
|
+
RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.5ms
|
352062
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [501b4152-2c77-4e60-8094-5271b81e1977]
|
352063
|
+
Sent mail to foo@example.com (4.3ms)
|
352064
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [501b4152-2c77-4e60-8094-5271b81e1977] Date: Fri, 22 Apr 2016 23:39:24 -0500
|
352065
|
+
From: no-reply@rails-identity.com
|
352066
|
+
To: foo@example.com
|
352067
|
+
Message-ID: <571afc7cca551_844a3fe160852470635ef@galt.local.mail>
|
352068
|
+
Subject: [rails-identity] Email Confirmation
|
352069
|
+
Mime-Version: 1.0
|
352070
|
+
Content-Type: multipart/alternative;
|
352071
|
+
boundary="--==_mimepart_571afc7cc9b0b_844a3fe16085247063413";
|
352072
|
+
charset=UTF-8
|
352073
|
+
Content-Transfer-Encoding: 7bit
|
352074
|
+
|
352075
|
+
|
352076
|
+
----==_mimepart_571afc7cc9b0b_844a3fe16085247063413
|
352077
|
+
Content-Type: text/plain;
|
352078
|
+
charset=UTF-8
|
352079
|
+
Content-Transfer-Encoding: 7bit
|
352080
|
+
|
352081
|
+
Dear foo@example.com,
|
352082
|
+
|
352083
|
+
Please confirm your account with rails-identity by making a PATCH request
|
352084
|
+
on the current user with a provided verification token. For example,
|
352085
|
+
|
352086
|
+
http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YjBjY2RjMi0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YjBkMTkxYy0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4NjM2NCwiZXhwIjoxNDYxMzg5OTY0fQ.4taSo0DAZ5gLb4p3qQQOWT7rlEm_JBEswKzWTsvyAQo verified=true
|
352087
|
+
|
352088
|
+
will confirm the account. Here is the verification token:
|
352089
|
+
|
352090
|
+
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YjBjY2RjMi0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YjBkMTkxYy0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4NjM2NCwiZXhwIjoxNDYxMzg5OTY0fQ.4taSo0DAZ5gLb4p3qQQOWT7rlEm_JBEswKzWTsvyAQo
|
352091
|
+
|
352092
|
+
Thank you for using rails-identity,
|
352093
|
+
rails-identity
|
352094
|
+
|
352095
|
+
|
352096
|
+
----==_mimepart_571afc7cc9b0b_844a3fe16085247063413
|
352097
|
+
Content-Type: text/html;
|
352098
|
+
charset=UTF-8
|
352099
|
+
Content-Transfer-Encoding: 7bit
|
352100
|
+
|
352101
|
+
<html>
|
352102
|
+
<body>
|
352103
|
+
<p>Dear foo@example.com,</p>
|
352104
|
+
|
352105
|
+
<p>Please confirm your account with rails-identity by making a PATCH request
|
352106
|
+
on the current user with a provided verification token. For example,
|
352107
|
+
<pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YjBjY2RjMi0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YjBkMTkxYy0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4NjM2NCwiZXhwIjoxNDYxMzg5OTY0fQ.4taSo0DAZ5gLb4p3qQQOWT7rlEm_JBEswKzWTsvyAQo
|
352108
|
+
verified=true</pre> will confirm the account. Here is the verification
|
352109
|
+
token:</p>
|
352110
|
+
|
352111
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YjBjY2RjMi0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YjBkMTkxYy0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMDAsImlhdCI6MTQ2MTM4NjM2NCwiZXhwIjoxNDYxMzg5OTY0fQ.4taSo0DAZ5gLb4p3qQQOWT7rlEm_JBEswKzWTsvyAQo</pre>
|
352112
|
+
|
352113
|
+
<p>Thank you for using rails-identity</p>
|
352114
|
+
<p><b>rails-identity</b></p>
|
352115
|
+
|
352116
|
+
</body>
|
352117
|
+
</html>
|
352118
|
+
|
352119
|
+
----==_mimepart_571afc7cc9b0b_844a3fe16085247063413--
|
352120
|
+
|
352121
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [501b4152-2c77-4e60-8094-5271b81e1977] Performed ActionMailer::DeliveryJob from Inline(mailers) in 7.19ms
|
352122
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 501b4152-2c77-4e60-8094-5271b81e1977) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/5b0ccdc2-090d-11e6-bc96-6c4008a6fa2a
|
352123
|
+
Completed 201 Created in 23ms (Views: 0.4ms | ActiveRecord: 1.2ms)
|
352124
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
352125
|
+
[1m[35m (0.1ms)[0m begin transaction
|
352126
|
+
---------------------------------------------------------------
|
352127
|
+
RailsIdentity::UsersControllerTest: test_public_can_see_options
|
352128
|
+
---------------------------------------------------------------
|
352129
|
+
[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"]]
|
352130
|
+
Processing by RailsIdentity::UsersController#options as HTML
|
352131
|
+
Rendered text template (0.0ms)
|
352132
|
+
Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
|
352133
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
352134
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
352135
|
+
---------------------------------------------------------------------------------------------
|
352136
|
+
RailsIdentity::UsersControllerTest: test_update_a_user_with_a_new_password_using_old_password
|
352137
|
+
---------------------------------------------------------------------------------------------
|
352138
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352139
|
+
[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"]]
|
352140
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
352141
|
+
Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"1"}
|
352142
|
+
Accepts a token
|
352143
|
+
Token well formatted for user 1,
|
352144
|
+
session 1
|
352145
|
+
Cache miss. Try database.
|
352146
|
+
[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"]]
|
352147
|
+
[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"]]
|
352148
|
+
Token well formatted and verified. Set cache.
|
352149
|
+
[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"]]
|
352150
|
+
Attempting to get RailsIdentity::User 1
|
352151
|
+
[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"]]
|
352152
|
+
Checking to see if authorized to access object
|
352153
|
+
Unpermitted parameters: old_password, token, id
|
352154
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
352155
|
+
[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
|
352156
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["password_digest", "$2a$04$Fji4QMBpmtr3ax.7NEQUYer1uLF79O3T73Ias5KjdJzh0wu2uyNri"], ["updated_at", "2016-04-23 04:39:24.918897"], ["uuid", "1"]]
|
352157
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
352158
|
+
Completed 200 OK in 76ms (Views: 0.4ms | ActiveRecord: 0.6ms)
|
352159
|
+
[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"]]
|
352160
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
352161
|
+
[1m[35m (0.0ms)[0m begin transaction
|
352162
|
+
---------------------------------------------------------------
|
352163
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_other_user
|
352164
|
+
---------------------------------------------------------------
|
352165
|
+
[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"]]
|
352166
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
352167
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"2"}
|
352168
|
+
Requires a token
|
352169
|
+
Token well formatted for user 1,
|
352170
|
+
session 1
|
352171
|
+
Cache miss. Try database.
|
352172
|
+
[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"]]
|
352173
|
+
[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"]]
|
352174
|
+
Token well formatted and verified. Set cache.
|
352175
|
+
[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"]]
|
352176
|
+
Attempting to get RailsIdentity::User 2
|
352177
|
+
[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"]]
|
352178
|
+
Checking to see if authorized to access object
|
352179
|
+
401 - Repia::Errors::Unauthorized
|
352180
|
+
Completed 401 Unauthorized in 6ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
352181
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
352182
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
352183
|
+
-------------------------------------------------------------------
|
352184
|
+
RailsIdentity::UsersControllerTest: test_cannot_delete_another_user
|
352185
|
+
-------------------------------------------------------------------
|
352186
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352187
|
+
Processing by RailsIdentity::UsersController#destroy as HTML
|
352188
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"2"}
|
352189
|
+
Requires a token
|
352190
|
+
Token well formatted for user 1,
|
352191
|
+
session 1
|
352192
|
+
Cache miss. Try database.
|
352193
|
+
[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"]]
|
352194
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352195
|
+
Token well formatted and verified. Set cache.
|
352196
|
+
[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"]]
|
352197
|
+
Attempting to get RailsIdentity::User 2
|
352198
|
+
[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"]]
|
352199
|
+
Checking to see if authorized to access object
|
352200
|
+
401 - Repia::Errors::Unauthorized
|
352201
|
+
Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
352202
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
352203
|
+
[1m[35m (0.1ms)[0m begin transaction
|
352204
|
+
--------------------------------------------------------------------------------
|
352205
|
+
RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_a_password
|
352206
|
+
--------------------------------------------------------------------------------
|
352207
|
+
[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"]]
|
352208
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
352209
|
+
Parameters: {"username"=>"foo@example.com"}
|
352210
|
+
Accepts a token
|
352211
|
+
Token decode error: Nil JSON web token
|
352212
|
+
Suppressing error: Invalid token:
|
352213
|
+
Create new user
|
352214
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
352215
|
+
[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
|
352216
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
352217
|
+
Completed 400 Bad Request in 3ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
352218
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
352219
|
+
[1m[35m (0.1ms)[0m begin transaction
|
352220
|
+
------------------------------------------------------------
|
352221
|
+
RailsIdentity::UsersControllerTest: test_show_a_current_user
|
352222
|
+
------------------------------------------------------------
|
352223
|
+
[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"]]
|
352224
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
352225
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"current"}
|
352226
|
+
Requires a token
|
352227
|
+
Token well formatted for user 1,
|
352228
|
+
session 1
|
352229
|
+
Cache miss. Try database.
|
352230
|
+
[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"]]
|
352231
|
+
[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"]]
|
352232
|
+
Token well formatted and verified. Set cache.
|
352233
|
+
[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"]]
|
352234
|
+
Attempting to get RailsIdentity::User 1
|
352235
|
+
[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"]]
|
352236
|
+
Checking to see if authorized to access object
|
352237
|
+
Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.1ms)
|
352238
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352239
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
352240
|
+
[1m[35m (0.0ms)[0m begin transaction
|
352241
|
+
------------------------------------------------------------------------------------
|
352242
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_password_with_a_invalid_token
|
352243
|
+
------------------------------------------------------------------------------------
|
352244
|
+
[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"]]
|
352245
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
352246
|
+
Parameters: {"old_password"=>"[FILTERED]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"1"}
|
352247
|
+
Accepts a token
|
352248
|
+
Token well formatted for user 1,
|
352249
|
+
session 1
|
352250
|
+
Cache miss. Try database.
|
352251
|
+
[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"]]
|
352252
|
+
[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"]]
|
352253
|
+
Token well formatted and verified. Set cache.
|
352254
|
+
[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"]]
|
352255
|
+
Attempting to get RailsIdentity::User 1
|
352256
|
+
[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"]]
|
352257
|
+
Checking to see if authorized to access object
|
352258
|
+
401 - Repia::Errors::Unauthorized
|
352259
|
+
Completed 401 Unauthorized in 75ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
352260
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
352261
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
352262
|
+
------------------------------------------------------
|
352263
|
+
RailsIdentity::UsersControllerTest: test_delete_a_user
|
352264
|
+
------------------------------------------------------
|
352265
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352266
|
+
Processing by RailsIdentity::UsersController#destroy as HTML
|
352267
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"1"}
|
352268
|
+
Requires a token
|
352269
|
+
Token well formatted for user 1,
|
352270
|
+
session 1
|
352271
|
+
Cache miss. Try database.
|
352272
|
+
[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"]]
|
352273
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352274
|
+
Token well formatted and verified. Set cache.
|
352275
|
+
[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"]]
|
352276
|
+
Attempting to get RailsIdentity::User 1
|
352277
|
+
[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"]]
|
352278
|
+
Checking to see if authorized to access object
|
352279
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
352280
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rails_identity_users" SET "deleted_at" = '2016-04-23 04:39:25.080719' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
|
352281
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
352282
|
+
Rendered text template (0.0ms)
|
352283
|
+
Completed 204 No Content in 6ms (Views: 0.3ms | ActiveRecord: 0.5ms)
|
352284
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
352285
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
352286
|
+
------------------------------------------------------------------
|
352287
|
+
RailsIdentity::UsersControllerTest: test_public_cannot_show_a_user
|
352288
|
+
------------------------------------------------------------------
|
352289
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352290
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
352291
|
+
Parameters: {"id"=>"1"}
|
352292
|
+
Requires a token
|
352293
|
+
Token decode error: Nil JSON web token
|
352294
|
+
401 - Invalid token:
|
352295
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
352296
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
352297
|
+
[1m[35m (0.1ms)[0m begin transaction
|
352298
|
+
--------------------------------------------------------------------
|
352299
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_invalid_email
|
352300
|
+
--------------------------------------------------------------------
|
352301
|
+
[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"]]
|
352302
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
352303
|
+
Parameters: {"username"=>"foobar", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"1"}
|
352304
|
+
Accepts a token
|
352305
|
+
Token well formatted for user 1,
|
352306
|
+
session 1
|
352307
|
+
Cache miss. Try database.
|
352308
|
+
[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"]]
|
352309
|
+
[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"]]
|
352310
|
+
Token well formatted and verified. Set cache.
|
352311
|
+
[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"]]
|
352312
|
+
Attempting to get RailsIdentity::User 1
|
352313
|
+
[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"]]
|
352314
|
+
Checking to see if authorized to access object
|
352315
|
+
Unpermitted parameters: token, id
|
352316
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
352317
|
+
[1m[36mRailsIdentity::User Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "rails_identity_users" WHERE ("rails_identity_users"."username" = 'foobar' AND "rails_identity_users"."deleted_at" IS NULL AND "rails_identity_users"."uuid" != '1') LIMIT 1[0m
|
352318
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
352319
|
+
Completed 400 Bad Request in 7ms (Views: 0.2ms | ActiveRecord: 0.3ms)
|
352320
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
352321
|
+
[1m[35m (0.0ms)[0m begin transaction
|
352322
|
+
------------------------------------------------------------------------------
|
352323
|
+
RailsIdentity::UsersControllerTest: test_cannot_create_a_user_without_username
|
352324
|
+
------------------------------------------------------------------------------
|
352325
|
+
[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"]]
|
352326
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
352327
|
+
Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}
|
352328
|
+
Accepts a token
|
352329
|
+
Token decode error: Nil JSON web token
|
352330
|
+
Suppressing error: Invalid token:
|
352331
|
+
Create new user
|
352332
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
352333
|
+
[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
|
352334
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
352335
|
+
Completed 400 Bad Request in 5ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
352336
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
352337
|
+
[1m[35m (0.0ms)[0m begin transaction
|
352338
|
+
------------------------------------------------------------
|
352339
|
+
RailsIdentity::UsersControllerTest: test_update_current_user
|
352340
|
+
------------------------------------------------------------
|
352341
|
+
[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"]]
|
352342
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
352343
|
+
Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"current"}
|
352344
|
+
Accepts a token
|
352345
|
+
Token well formatted for user 1,
|
352346
|
+
session 1
|
352347
|
+
Cache miss. Try database.
|
352348
|
+
[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"]]
|
352349
|
+
[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"]]
|
352350
|
+
Token well formatted and verified. Set cache.
|
352351
|
+
[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"]]
|
352352
|
+
Attempting to get RailsIdentity::User 1
|
352353
|
+
[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"]]
|
352354
|
+
Checking to see if authorized to access object
|
352355
|
+
Unpermitted parameters: token, id
|
352356
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
352357
|
+
[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
|
352358
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-23 04:39:25.118010"], ["uuid", "1"]]
|
352359
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
352360
|
+
Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 0.6ms)
|
352361
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
352362
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
352363
|
+
--------------------------------------------------------------------------
|
352364
|
+
RailsIdentity::UsersControllerTest: test_update_password_using_reset_token
|
352365
|
+
--------------------------------------------------------------------------
|
352366
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352367
|
+
[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"]]
|
352368
|
+
[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"]]
|
352369
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
352370
|
+
Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
|
352371
|
+
Accepts a token
|
352372
|
+
Token decode error: Nil JSON web token
|
352373
|
+
Suppressing error: Invalid token:
|
352374
|
+
[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"]]
|
352375
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
352376
|
+
[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", "5b3c43b8-090d-11e6-bc96-6c4008a6fa2a"], ["secret", "c8da0dc4-3f5f-41be-aaf0-fd2ec08c9ad5"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWIzYzQzYjgtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg5OTY1fQ.KGneqfNdCXwM_kKroE0TabmTdveBlVepbLdJ6hqr08M"], ["created_at", "2016-04-23 04:39:25.128847"], ["updated_at", "2016-04-23 04:39:25.128847"]]
|
352377
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
352378
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
352379
|
+
[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
|
352380
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWIzYzQzYjgtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg5OTY1fQ.KGneqfNdCXwM_kKroE0TabmTdveBlVepbLdJ6hqr08M"], ["updated_at", "2016-04-23 04:39:25.131458"], ["uuid", "1"]]
|
352381
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
352382
|
+
[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"]]
|
352383
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [013088e4-2c98-4d8a-a1e3-bd63a2593702] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
|
352384
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [013088e4-2c98-4d8a-a1e3-bd63a2593702] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (0.6ms)
|
352385
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [013088e4-2c98-4d8a-a1e3-bd63a2593702] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (0.4ms)
|
352386
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [013088e4-2c98-4d8a-a1e3-bd63a2593702]
|
352387
|
+
RailsIdentity::UserMailer#password_reset: processed outbound mail in 9.5ms
|
352388
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [013088e4-2c98-4d8a-a1e3-bd63a2593702]
|
352389
|
+
Sent mail to one@example.com (4.2ms)
|
352390
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [013088e4-2c98-4d8a-a1e3-bd63a2593702] Date: Fri, 22 Apr 2016 23:39:25 -0500
|
352391
|
+
From: no-reply@rails-identity.com
|
352392
|
+
To: one@example.com
|
352393
|
+
Message-ID: <571afc7d23d76_844a3fe160852470637cb@galt.local.mail>
|
352394
|
+
Subject: [rails-identity] Password Reset
|
352395
|
+
Mime-Version: 1.0
|
352396
|
+
Content-Type: multipart/alternative;
|
352397
|
+
boundary="--==_mimepart_571afc7d23191_844a3fe16085247063679";
|
352398
|
+
charset=UTF-8
|
352399
|
+
Content-Transfer-Encoding: 7bit
|
352400
|
+
|
352401
|
+
|
352402
|
+
----==_mimepart_571afc7d23191_844a3fe16085247063679
|
352403
|
+
Content-Type: text/plain;
|
352404
|
+
charset=UTF-8
|
352405
|
+
Content-Transfer-Encoding: 7bit
|
352406
|
+
|
352407
|
+
Dear one@example.com,
|
352408
|
+
|
352409
|
+
You have requested to reset your password. Here are the user UUID and reset
|
352410
|
+
token. Make a PATCH request on the UUID with the reset token to set a new
|
352411
|
+
password. For instance,
|
352412
|
+
|
352413
|
+
http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
|
352414
|
+
|
352415
|
+
will set the password to "reallysecret" (without quotes) for the user to
|
352416
|
+
whom the reset token was issued.
|
352417
|
+
|
352418
|
+
Here is the reset token: @user.reset_token
|
352419
|
+
|
352420
|
+
Good luck! :)
|
352421
|
+
rails-identity
|
352422
|
+
|
352423
|
+
|
352424
|
+
----==_mimepart_571afc7d23191_844a3fe16085247063679
|
352425
|
+
Content-Type: text/html;
|
352426
|
+
charset=UTF-8
|
352427
|
+
Content-Transfer-Encoding: 7bit
|
352428
|
+
|
352429
|
+
<html>
|
352430
|
+
<body>
|
352431
|
+
<p>Dear one@example.com,</p>
|
352432
|
+
|
352433
|
+
<p>You have requested to reset your password. Here are the user UUID and
|
352434
|
+
reset token. Make a PATCH request on the UUID with the reset token to set a
|
352435
|
+
new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWIzYzQzYjgtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg5OTY1fQ.KGneqfNdCXwM_kKroE0TabmTdveBlVepbLdJ6hqr08M password=reallysecret
|
352436
|
+
password_confirmation=reallysecret</pre> will set the password to
|
352437
|
+
<pre>reallysecret</pre> for the user to whom the reset token was issued.
|
352438
|
+
Here is the reset token:</p>
|
352439
|
+
|
352440
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWIzYzQzYjgtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg5OTY1fQ.KGneqfNdCXwM_kKroE0TabmTdveBlVepbLdJ6hqr08M</pre>
|
352441
|
+
|
352442
|
+
<p>Good luck! :)</p>
|
352443
|
+
<p><b>rails-identity</b></p>
|
352444
|
+
|
352445
|
+
</body>
|
352446
|
+
</html>
|
352447
|
+
|
352448
|
+
----==_mimepart_571afc7d23191_844a3fe16085247063679--
|
352449
|
+
|
352450
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [013088e4-2c98-4d8a-a1e3-bd63a2593702] Performed ActionMailer::DeliveryJob from Inline(mailers) in 14.3ms
|
352451
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 013088e4-2c98-4d8a-a1e3-bd63a2593702) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
|
352452
|
+
Rendered text template (0.0ms)
|
352453
|
+
Completed 204 No Content in 23ms (Views: 0.3ms | ActiveRecord: 0.7ms)
|
352454
|
+
[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"]]
|
352455
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
352456
|
+
Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWIzYzQzYjgtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg5OTY1fQ.KGneqfNdCXwM_kKroE0TabmTdveBlVepbLdJ6hqr08M", "id"=>"1"}
|
352457
|
+
Accepts a token
|
352458
|
+
Token well formatted for user 1,
|
352459
|
+
session 5b3c43b8-090d-11e6-bc96-6c4008a6fa2a
|
352460
|
+
Cache miss. Try database.
|
352461
|
+
[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"]]
|
352462
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "5b3c43b8-090d-11e6-bc96-6c4008a6fa2a"]]
|
352463
|
+
Token well formatted and verified. Set cache.
|
352464
|
+
[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"]]
|
352465
|
+
Attempting to get RailsIdentity::User 1
|
352466
|
+
[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"]]
|
352467
|
+
Checking to see if authorized to access object
|
352468
|
+
Unpermitted parameters: token, id
|
352469
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
352470
|
+
[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
|
352471
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rails_identity_users" SET "password_digest" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["password_digest", "$2a$04$mLd0BOQzz2KP91HFF5.b7uPle6mUoprmwuCOvvsVmxpCJWMx1tEsi"], ["updated_at", "2016-04-23 04:39:25.157922"], ["uuid", "1"]]
|
352472
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
352473
|
+
Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 1.2ms)
|
352474
|
+
[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"]]
|
352475
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
352476
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
352477
|
+
------------------------------------------------------------------------------
|
352478
|
+
RailsIdentity::UsersControllerTest: test_update_(reissue)_a_verification_token
|
352479
|
+
------------------------------------------------------------------------------
|
352480
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352481
|
+
[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"]]
|
352482
|
+
[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
|
352483
|
+
[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"]]
|
352484
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
352485
|
+
Parameters: {"issue_verification_token"=>true, "username"=>"one@example.com", "id"=>"current"}
|
352486
|
+
Accepts a token
|
352487
|
+
Token decode error: Nil JSON web token
|
352488
|
+
Suppressing error: Invalid token:
|
352489
|
+
[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"]]
|
352490
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
352491
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["user_uuid", "1"], ["uuid", "5b424bf0-090d-11e6-bc96-6c4008a6fa2a"], ["secret", "2f768a1a-5ed8-480a-b27c-02d6e5906cc9"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWI0MjRiZjAtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg5OTY1fQ.VmZ-GHTE2awtNwLyVbD-b9pfh4j7X6VXhRbaA4IH2QI"], ["created_at", "2016-04-23 04:39:25.168260"], ["updated_at", "2016-04-23 04:39:25.168260"]]
|
352492
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
352493
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
352494
|
+
[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
|
352495
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWI0MjRiZjAtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg5OTY1fQ.VmZ-GHTE2awtNwLyVbD-b9pfh4j7X6VXhRbaA4IH2QI"], ["updated_at", "2016-04-23 04:39:25.170424"], ["uuid", "1"]]
|
352496
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
352497
|
+
[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"]]
|
352498
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [a49049f7-2f9a-4b3f-82f6-2948418c0b54] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
|
352499
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [a49049f7-2f9a-4b3f-82f6-2948418c0b54] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
|
352500
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [a49049f7-2f9a-4b3f-82f6-2948418c0b54] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
|
352501
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [a49049f7-2f9a-4b3f-82f6-2948418c0b54]
|
352502
|
+
RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.7ms
|
352503
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [a49049f7-2f9a-4b3f-82f6-2948418c0b54]
|
352504
|
+
Sent mail to one@example.com (3.6ms)
|
352505
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [a49049f7-2f9a-4b3f-82f6-2948418c0b54] Date: Fri, 22 Apr 2016 23:39:25 -0500
|
352506
|
+
From: no-reply@rails-identity.com
|
352507
|
+
To: one@example.com
|
352508
|
+
Message-ID: <571afc7d2b784_844a3fe1608524706397b@galt.local.mail>
|
352509
|
+
Subject: [rails-identity] Email Confirmation
|
352510
|
+
Mime-Version: 1.0
|
352511
|
+
Content-Type: multipart/alternative;
|
352512
|
+
boundary="--==_mimepart_571afc7d2adb4_844a3fe16085247063827";
|
352513
|
+
charset=UTF-8
|
352514
|
+
Content-Transfer-Encoding: 7bit
|
352515
|
+
|
352516
|
+
|
352517
|
+
----==_mimepart_571afc7d2adb4_844a3fe16085247063827
|
352518
|
+
Content-Type: text/plain;
|
352519
|
+
charset=UTF-8
|
352520
|
+
Content-Transfer-Encoding: 7bit
|
352521
|
+
|
352522
|
+
Dear one@example.com,
|
352523
|
+
|
352524
|
+
Please confirm your account with rails-identity by making a PATCH request
|
352525
|
+
on the current user with a provided verification token. For example,
|
352526
|
+
|
352527
|
+
http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWI0MjRiZjAtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg5OTY1fQ.VmZ-GHTE2awtNwLyVbD-b9pfh4j7X6VXhRbaA4IH2QI verified=true
|
352528
|
+
|
352529
|
+
will confirm the account. Here is the verification token:
|
352530
|
+
|
352531
|
+
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWI0MjRiZjAtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg5OTY1fQ.VmZ-GHTE2awtNwLyVbD-b9pfh4j7X6VXhRbaA4IH2QI
|
352532
|
+
|
352533
|
+
Thank you for using rails-identity,
|
352534
|
+
rails-identity
|
352535
|
+
|
352536
|
+
|
352537
|
+
----==_mimepart_571afc7d2adb4_844a3fe16085247063827
|
352538
|
+
Content-Type: text/html;
|
352539
|
+
charset=UTF-8
|
352540
|
+
Content-Transfer-Encoding: 7bit
|
352541
|
+
|
352542
|
+
<html>
|
352543
|
+
<body>
|
352544
|
+
<p>Dear one@example.com,</p>
|
352545
|
+
|
352546
|
+
<p>Please confirm your account with rails-identity by making a PATCH request
|
352547
|
+
on the current user with a provided verification token. For example,
|
352548
|
+
<pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWI0MjRiZjAtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg5OTY1fQ.VmZ-GHTE2awtNwLyVbD-b9pfh4j7X6VXhRbaA4IH2QI
|
352549
|
+
verified=true</pre> will confirm the account. Here is the verification
|
352550
|
+
token:</p>
|
352551
|
+
|
352552
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWI0MjRiZjAtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg5OTY1fQ.VmZ-GHTE2awtNwLyVbD-b9pfh4j7X6VXhRbaA4IH2QI</pre>
|
352553
|
+
|
352554
|
+
<p>Thank you for using rails-identity</p>
|
352555
|
+
<p><b>rails-identity</b></p>
|
352556
|
+
|
352557
|
+
</body>
|
352558
|
+
</html>
|
352559
|
+
|
352560
|
+
----==_mimepart_571afc7d2adb4_844a3fe16085247063827--
|
352561
|
+
|
352562
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [a49049f7-2f9a-4b3f-82f6-2948418c0b54] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.79ms
|
352563
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: a49049f7-2f9a-4b3f-82f6-2948418c0b54) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/1
|
352564
|
+
Rendered text template (0.0ms)
|
352565
|
+
Completed 204 No Content in 15ms (Views: 0.3ms | ActiveRecord: 0.6ms)
|
352566
|
+
[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
|
352567
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
352568
|
+
Parameters: {"verified"=>true, "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWI0MjRiZjAtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg5OTY1fQ.VmZ-GHTE2awtNwLyVbD-b9pfh4j7X6VXhRbaA4IH2QI", "id"=>"current"}
|
352569
|
+
Accepts a token
|
352570
|
+
Token well formatted for user 1,
|
352571
|
+
session 5b424bf0-090d-11e6-bc96-6c4008a6fa2a
|
352572
|
+
Cache miss. Try database.
|
352573
|
+
[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"]]
|
352574
|
+
[1m[36mRailsIdentity::Session Load (0.0ms)[0m [1mSELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1[0m [["uuid", "5b424bf0-090d-11e6-bc96-6c4008a6fa2a"]]
|
352575
|
+
Token well formatted and verified. Set cache.
|
352576
|
+
[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"]]
|
352577
|
+
Attempting to get RailsIdentity::User 1
|
352578
|
+
[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"]]
|
352579
|
+
Checking to see if authorized to access object
|
352580
|
+
Unpermitted parameters: token, id
|
352581
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
352582
|
+
[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
|
352583
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
352584
|
+
Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 0.9ms)
|
352585
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
352586
|
+
[1m[35m (0.0ms)[0m begin transaction
|
352587
|
+
-------------------------------------------------------------------------
|
352588
|
+
RailsIdentity::UsersControllerTest: test_update_(issue)_a_new_reset_token
|
352589
|
+
-------------------------------------------------------------------------
|
352590
|
+
[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"]]
|
352591
|
+
[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"]]
|
352592
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
352593
|
+
Parameters: {"issue_reset_token"=>true, "username"=>"one@example.com", "id"=>"current"}
|
352594
|
+
Accepts a token
|
352595
|
+
Token decode error: Nil JSON web token
|
352596
|
+
Suppressing error: Invalid token:
|
352597
|
+
[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"]]
|
352598
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
352599
|
+
[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", "5b4692a0-090d-11e6-bc96-6c4008a6fa2a"], ["secret", "95ef0bf4-9bec-4e58-acea-26a0f9cbabef"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWI0NjkyYTAtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg5OTY1fQ.gn_R9bLrFDWCEe71KMs7AWziZ7NnWumsFGOoIwB7An0"], ["created_at", "2016-04-23 04:39:25.197103"], ["updated_at", "2016-04-23 04:39:25.197103"]]
|
352600
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
352601
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
352602
|
+
[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
|
352603
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "rails_identity_users" SET "reset_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["reset_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWI0NjkyYTAtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg5OTY1fQ.gn_R9bLrFDWCEe71KMs7AWziZ7NnWumsFGOoIwB7An0"], ["updated_at", "2016-04-23 04:39:25.200315"], ["uuid", "1"]]
|
352604
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
352605
|
+
[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"]]
|
352606
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [bdc3a234-b251-4693-92d2-7130e586d433] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
|
352607
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [bdc3a234-b251-4693-92d2-7130e586d433] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.html.erb within layouts/mailer (0.1ms)
|
352608
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [bdc3a234-b251-4693-92d2-7130e586d433] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/password_reset.text.erb within layouts/mailer (0.1ms)
|
352609
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [bdc3a234-b251-4693-92d2-7130e586d433]
|
352610
|
+
RailsIdentity::UserMailer#password_reset: processed outbound mail in 3.0ms
|
352611
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [bdc3a234-b251-4693-92d2-7130e586d433]
|
352612
|
+
Sent mail to one@example.com (4.5ms)
|
352613
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [bdc3a234-b251-4693-92d2-7130e586d433] Date: Fri, 22 Apr 2016 23:39:25 -0500
|
352614
|
+
From: no-reply@rails-identity.com
|
352615
|
+
To: one@example.com
|
352616
|
+
Message-ID: <571afc7d32d71_844a3fe16085247064157@galt.local.mail>
|
352617
|
+
Subject: [rails-identity] Password Reset
|
352618
|
+
Mime-Version: 1.0
|
352619
|
+
Content-Type: multipart/alternative;
|
352620
|
+
boundary="--==_mimepart_571afc7d322e0_844a3fe16085247064069";
|
352621
|
+
charset=UTF-8
|
352622
|
+
Content-Transfer-Encoding: 7bit
|
352623
|
+
|
352624
|
+
|
352625
|
+
----==_mimepart_571afc7d322e0_844a3fe16085247064069
|
352626
|
+
Content-Type: text/plain;
|
352627
|
+
charset=UTF-8
|
352628
|
+
Content-Transfer-Encoding: 7bit
|
352629
|
+
|
352630
|
+
Dear one@example.com,
|
352631
|
+
|
352632
|
+
You have requested to reset your password. Here are the user UUID and reset
|
352633
|
+
token. Make a PATCH request on the UUID with the reset token to set a new
|
352634
|
+
password. For instance,
|
352635
|
+
|
352636
|
+
http PATCH /users/current token=... password=reallysecret password_confirmation=reallysecret
|
352637
|
+
|
352638
|
+
will set the password to "reallysecret" (without quotes) for the user to
|
352639
|
+
whom the reset token was issued.
|
352640
|
+
|
352641
|
+
Here is the reset token: @user.reset_token
|
352642
|
+
|
352643
|
+
Good luck! :)
|
352644
|
+
rails-identity
|
352645
|
+
|
352646
|
+
|
352647
|
+
----==_mimepart_571afc7d322e0_844a3fe16085247064069
|
352648
|
+
Content-Type: text/html;
|
352649
|
+
charset=UTF-8
|
352650
|
+
Content-Transfer-Encoding: 7bit
|
352651
|
+
|
352652
|
+
<html>
|
352653
|
+
<body>
|
352654
|
+
<p>Dear one@example.com,</p>
|
352655
|
+
|
352656
|
+
<p>You have requested to reset your password. Here are the user UUID and
|
352657
|
+
reset token. Make a PATCH request on the UUID with the reset token to set a
|
352658
|
+
new password. For instance, <pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWI0NjkyYTAtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg5OTY1fQ.gn_R9bLrFDWCEe71KMs7AWziZ7NnWumsFGOoIwB7An0 password=reallysecret
|
352659
|
+
password_confirmation=reallysecret</pre> will set the password to
|
352660
|
+
<pre>reallysecret</pre> for the user to whom the reset token was issued.
|
352661
|
+
Here is the reset token:</p>
|
352662
|
+
|
352663
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiNWI0NjkyYTAtMDkwZC0xMWU2LWJjOTYtNmM0MDA4YTZmYTJhIiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg5OTY1fQ.gn_R9bLrFDWCEe71KMs7AWziZ7NnWumsFGOoIwB7An0</pre>
|
352664
|
+
|
352665
|
+
<p>Good luck! :)</p>
|
352666
|
+
<p><b>rails-identity</b></p>
|
352667
|
+
|
352668
|
+
</body>
|
352669
|
+
</html>
|
352670
|
+
|
352671
|
+
----==_mimepart_571afc7d322e0_844a3fe16085247064069--
|
352672
|
+
|
352673
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [bdc3a234-b251-4693-92d2-7130e586d433] Performed ActionMailer::DeliveryJob from Inline(mailers) in 7.95ms
|
352674
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: bdc3a234-b251-4693-92d2-7130e586d433) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "password_reset", "deliver_now", gid://dummy/RailsIdentity::User/1
|
352675
|
+
Rendered text template (0.0ms)
|
352676
|
+
Completed 204 No Content in 19ms (Views: 0.4ms | ActiveRecord: 0.9ms)
|
352677
|
+
[1m[35mRailsIdentity::User Load (0.0ms)[0m SELECT "rails_identity_users".* FROM "rails_identity_users" WHERE "rails_identity_users"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352678
|
+
[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
|
352679
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
352680
|
+
Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"1"}
|
352681
|
+
Accepts a token
|
352682
|
+
Token well formatted for user 1,
|
352683
|
+
session 1
|
352684
|
+
Cache miss. Try database.
|
352685
|
+
[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"]]
|
352686
|
+
[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"]]
|
352687
|
+
Token well formatted and verified. Set cache.
|
352688
|
+
[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"]]
|
352689
|
+
Attempting to get RailsIdentity::User 1
|
352690
|
+
[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"]]
|
352691
|
+
Checking to see if authorized to access object
|
352692
|
+
Unpermitted parameters: token, id
|
352693
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
352694
|
+
[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
|
352695
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-23 04:39:25.219726"], ["uuid", "1"]]
|
352696
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
352697
|
+
Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 1.3ms)
|
352698
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
352699
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
352700
|
+
------------------------------------------------------------
|
352701
|
+
RailsIdentity::UsersControllerTest: test_delete_current_user
|
352702
|
+
------------------------------------------------------------
|
352703
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352704
|
+
Processing by RailsIdentity::UsersController#destroy as HTML
|
352705
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"current"}
|
352706
|
+
Requires a token
|
352707
|
+
Token well formatted for user 1,
|
352708
|
+
session 1
|
352709
|
+
Cache miss. Try database.
|
352710
|
+
[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"]]
|
352711
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352712
|
+
Token well formatted and verified. Set cache.
|
352713
|
+
[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"]]
|
352714
|
+
Attempting to get RailsIdentity::User 1
|
352715
|
+
[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"]]
|
352716
|
+
Checking to see if authorized to access object
|
352717
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
352718
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rails_identity_users" SET "deleted_at" = '2016-04-23 04:39:25.230237' WHERE "rails_identity_users"."uuid" = ? [["uuid", "1"]]
|
352719
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
352720
|
+
Rendered text template (0.0ms)
|
352721
|
+
Completed 204 No Content in 5ms (Views: 0.3ms | ActiveRecord: 0.4ms)
|
352722
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
352723
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
352724
|
+
------------------------------------------------------
|
352725
|
+
RailsIdentity::UsersControllerTest: test_update_a_user
|
352726
|
+
------------------------------------------------------
|
352727
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352728
|
+
[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"]]
|
352729
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
352730
|
+
Parameters: {"username"=>"foo@example.com", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"1"}
|
352731
|
+
Accepts a token
|
352732
|
+
Token well formatted for user 1,
|
352733
|
+
session 1
|
352734
|
+
Cache miss. Try database.
|
352735
|
+
[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"]]
|
352736
|
+
[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"]]
|
352737
|
+
Token well formatted and verified. Set cache.
|
352738
|
+
[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"]]
|
352739
|
+
Attempting to get RailsIdentity::User 1
|
352740
|
+
[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"]]
|
352741
|
+
Checking to see if authorized to access object
|
352742
|
+
Unpermitted parameters: token, id
|
352743
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
352744
|
+
[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
|
352745
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "rails_identity_users" SET "username" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ? [["username", "foo@example.com"], ["updated_at", "2016-04-23 04:39:25.242608"], ["uuid", "1"]]
|
352746
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
352747
|
+
Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 0.6ms)
|
352748
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
352749
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
352750
|
+
--------------------------------------------------------------------
|
352751
|
+
RailsIdentity::UsersControllerTest: test_non-admin_cannot_list_users
|
352752
|
+
--------------------------------------------------------------------
|
352753
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352754
|
+
Processing by RailsIdentity::UsersController#index as HTML
|
352755
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU"}
|
352756
|
+
Requires an admin token
|
352757
|
+
Token well formatted for user 1,
|
352758
|
+
session 1
|
352759
|
+
Cache miss. Try database.
|
352760
|
+
[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"]]
|
352761
|
+
401 - Well-formed but invalid user token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU
|
352762
|
+
Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
352763
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
352764
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
352765
|
+
----------------------------------------------------
|
352766
|
+
RailsIdentity::UsersControllerTest: test_show_a_user
|
352767
|
+
----------------------------------------------------
|
352768
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352769
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
352770
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"1"}
|
352771
|
+
Requires a token
|
352772
|
+
Token well formatted for user 1,
|
352773
|
+
session 1
|
352774
|
+
Cache miss. Try database.
|
352775
|
+
[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"]]
|
352776
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352777
|
+
Token well formatted and verified. Set cache.
|
352778
|
+
[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"]]
|
352779
|
+
Attempting to get RailsIdentity::User 1
|
352780
|
+
[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"]]
|
352781
|
+
Checking to see if authorized to access object
|
352782
|
+
Completed 200 OK in 4ms (Views: 0.4ms | ActiveRecord: 0.2ms)
|
352783
|
+
[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"]]
|
352784
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
352785
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
352786
|
+
--------------------------------------------------------------------
|
352787
|
+
RailsIdentity::UsersControllerTest: test_admin_can_delete_other_user
|
352788
|
+
--------------------------------------------------------------------
|
352789
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352790
|
+
[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"]]
|
352791
|
+
Processing by RailsIdentity::UsersController#destroy as HTML
|
352792
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM2NzYzfQ.VVabmfGrQC4kee49nNRJXQnB3zdC-9Ojpn58BQTyH9I", "id"=>"1"}
|
352793
|
+
Requires a token
|
352794
|
+
Token well formatted for user admin_one,
|
352795
|
+
session session_admin_one
|
352796
|
+
Cache miss. Try database.
|
352797
|
+
[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"]]
|
352798
|
+
[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"]]
|
352799
|
+
Token well formatted and verified. Set cache.
|
352800
|
+
[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"]]
|
352801
|
+
Attempting to get RailsIdentity::User 1
|
352802
|
+
[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"]]
|
352803
|
+
Checking to see if authorized to access object
|
352804
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
352805
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rails_identity_users" SET "deleted_at" = '2016-04-23 04:39:25.267530' WHERE "rails_identity_users"."uuid" = ?[0m [["uuid", "1"]]
|
352806
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
352807
|
+
Rendered text template (0.0ms)
|
352808
|
+
Completed 204 No Content in 5ms (Views: 0.5ms | ActiveRecord: 0.4ms)
|
352809
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
352810
|
+
[1m[35m (0.1ms)[0m begin transaction
|
352811
|
+
-------------------------------------------------------------------------
|
352812
|
+
RailsIdentity::UsersControllerTest: test_user_cannot_create_an_admin_user
|
352813
|
+
-------------------------------------------------------------------------
|
352814
|
+
[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"]]
|
352815
|
+
Processing by RailsIdentity::UsersController#create as HTML
|
352816
|
+
Parameters: {"username"=>"foo@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "role"=>"100"}
|
352817
|
+
Accepts a token
|
352818
|
+
Token decode error: Nil JSON web token
|
352819
|
+
Suppressing error: Invalid token:
|
352820
|
+
Create new user
|
352821
|
+
Unpermitted parameter: role
|
352822
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
352823
|
+
[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
|
352824
|
+
[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$TKpRkT5jGhmPN56QowGDhOXlkE58l23WY9z4YY/rchKB1BhQwXYvy"], ["role", 10], ["created_at", "2016-04-23 04:39:25.277758"], ["updated_at", "2016-04-23 04:39:25.277758"], ["uuid", "5b5323ee-090d-11e6-bc96-6c4008a6fa2a"]]
|
352825
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
352826
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
352827
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "rails_identity_sessions" ("user_uuid", "uuid", "secret", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["user_uuid", "5b5323ee-090d-11e6-bc96-6c4008a6fa2a"], ["uuid", "5b53693a-090d-11e6-bc96-6c4008a6fa2a"], ["secret", "5d0e89e2-7a6d-467e-ae3e-97e17adad149"], ["token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YjUzMjNlZS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YjUzNjkzYS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg2MzY1LCJleHAiOjE0NjEzODk5NjV9.ew3yQgQ8qeTrHD1NiBWZWT6ndF2XboXKuuZ5puBXh7w"], ["created_at", "2016-04-23 04:39:25.280340"], ["updated_at", "2016-04-23 04:39:25.280340"]]
|
352828
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
352829
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
352830
|
+
[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" != '5b5323ee-090d-11e6-bc96-6c4008a6fa2a') LIMIT 1
|
352831
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "rails_identity_users" SET "verification_token" = ?, "updated_at" = ? WHERE "rails_identity_users"."uuid" = ?[0m [["verification_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YjUzMjNlZS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YjUzNjkzYS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg2MzY1LCJleHAiOjE0NjEzODk5NjV9.ew3yQgQ8qeTrHD1NiBWZWT6ndF2XboXKuuZ5puBXh7w"], ["updated_at", "2016-04-23 04:39:25.281926"], ["uuid", "5b5323ee-090d-11e6-bc96-6c4008a6fa2a"]]
|
352832
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
352833
|
+
[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", "5b5323ee-090d-11e6-bc96-6c4008a6fa2a"]]
|
352834
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [f9b5d0f7-b80c-42b4-ab29-c36d9b3cf89a] Performing ActionMailer::DeliveryJob from Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/5b5323ee-090d-11e6-bc96-6c4008a6fa2a
|
352835
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [f9b5d0f7-b80c-42b4-ab29-c36d9b3cf89a] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.html.erb within layouts/mailer (0.1ms)
|
352836
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [f9b5d0f7-b80c-42b4-ab29-c36d9b3cf89a] Rendered /Users/davidan/Projects/Personal/rails-identity/app/views/rails_identity/user_mailer/email_verification.text.erb within layouts/mailer (0.0ms)
|
352837
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [f9b5d0f7-b80c-42b4-ab29-c36d9b3cf89a]
|
352838
|
+
RailsIdentity::UserMailer#email_verification: processed outbound mail in 2.7ms
|
352839
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [f9b5d0f7-b80c-42b4-ab29-c36d9b3cf89a]
|
352840
|
+
Sent mail to foo@example.com (3.6ms)
|
352841
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [f9b5d0f7-b80c-42b4-ab29-c36d9b3cf89a] Date: Fri, 22 Apr 2016 23:39:25 -0500
|
352842
|
+
From: no-reply@rails-identity.com
|
352843
|
+
To: foo@example.com
|
352844
|
+
Message-ID: <571afc7d469a6_844a3fe16085247064390@galt.local.mail>
|
352845
|
+
Subject: [rails-identity] Email Confirmation
|
352846
|
+
Mime-Version: 1.0
|
352847
|
+
Content-Type: multipart/alternative;
|
352848
|
+
boundary="--==_mimepart_571afc7d45ff9_844a3fe160852470642f";
|
352849
|
+
charset=UTF-8
|
352850
|
+
Content-Transfer-Encoding: 7bit
|
352851
|
+
|
352852
|
+
|
352853
|
+
----==_mimepart_571afc7d45ff9_844a3fe160852470642f
|
352854
|
+
Content-Type: text/plain;
|
352855
|
+
charset=UTF-8
|
352856
|
+
Content-Transfer-Encoding: 7bit
|
352857
|
+
|
352858
|
+
Dear foo@example.com,
|
352859
|
+
|
352860
|
+
Please confirm your account with rails-identity by making a PATCH request
|
352861
|
+
on the current user with a provided verification token. For example,
|
352862
|
+
|
352863
|
+
http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YjUzMjNlZS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YjUzNjkzYS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg2MzY1LCJleHAiOjE0NjEzODk5NjV9.ew3yQgQ8qeTrHD1NiBWZWT6ndF2XboXKuuZ5puBXh7w verified=true
|
352864
|
+
|
352865
|
+
will confirm the account. Here is the verification token:
|
352866
|
+
|
352867
|
+
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YjUzMjNlZS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YjUzNjkzYS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg2MzY1LCJleHAiOjE0NjEzODk5NjV9.ew3yQgQ8qeTrHD1NiBWZWT6ndF2XboXKuuZ5puBXh7w
|
352868
|
+
|
352869
|
+
Thank you for using rails-identity,
|
352870
|
+
rails-identity
|
352871
|
+
|
352872
|
+
|
352873
|
+
----==_mimepart_571afc7d45ff9_844a3fe160852470642f
|
352874
|
+
Content-Type: text/html;
|
352875
|
+
charset=UTF-8
|
352876
|
+
Content-Transfer-Encoding: 7bit
|
352877
|
+
|
352878
|
+
<html>
|
352879
|
+
<body>
|
352880
|
+
<p>Dear foo@example.com,</p>
|
352881
|
+
|
352882
|
+
<p>Please confirm your account with rails-identity by making a PATCH request
|
352883
|
+
on the current user with a provided verification token. For example,
|
352884
|
+
<pre>http PATCH /users/current token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YjUzMjNlZS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YjUzNjkzYS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg2MzY1LCJleHAiOjE0NjEzODk5NjV9.ew3yQgQ8qeTrHD1NiBWZWT6ndF2XboXKuuZ5puBXh7w
|
352885
|
+
verified=true</pre> will confirm the account. Here is the verification
|
352886
|
+
token:</p>
|
352887
|
+
|
352888
|
+
<pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiI1YjUzMjNlZS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJzZXNzaW9uX3V1aWQiOiI1YjUzNjkzYS0wOTBkLTExZTYtYmM5Ni02YzQwMDhhNmZhMmEiLCJyb2xlIjoxMCwiaWF0IjoxNDYxMzg2MzY1LCJleHAiOjE0NjEzODk5NjV9.ew3yQgQ8qeTrHD1NiBWZWT6ndF2XboXKuuZ5puBXh7w</pre>
|
352889
|
+
|
352890
|
+
<p>Thank you for using rails-identity</p>
|
352891
|
+
<p><b>rails-identity</b></p>
|
352892
|
+
|
352893
|
+
</body>
|
352894
|
+
</html>
|
352895
|
+
|
352896
|
+
----==_mimepart_571afc7d45ff9_844a3fe160852470642f--
|
352897
|
+
|
352898
|
+
[ActiveJob] [ActionMailer::DeliveryJob] [f9b5d0f7-b80c-42b4-ab29-c36d9b3cf89a] Performed ActionMailer::DeliveryJob from Inline(mailers) in 6.82ms
|
352899
|
+
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: f9b5d0f7-b80c-42b4-ab29-c36d9b3cf89a) to Inline(mailers) with arguments: "RailsIdentity::UserMailer", "email_verification", "deliver_now", gid://dummy/RailsIdentity::User/5b5323ee-090d-11e6-bc96-6c4008a6fa2a
|
352900
|
+
Completed 201 Created in 18ms (Views: 0.4ms | ActiveRecord: 0.8ms)
|
352901
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
352902
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
352903
|
+
------------------------------------------------------------------------------------
|
352904
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_password_with_non-reset_token
|
352905
|
+
------------------------------------------------------------------------------------
|
352906
|
+
[1m[35mRailsIdentity::Session Load (0.1ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352907
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
352908
|
+
Parameters: {"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"1"}
|
352909
|
+
Accepts a token
|
352910
|
+
Token well formatted for user 1,
|
352911
|
+
session 1
|
352912
|
+
Cache miss. Try database.
|
352913
|
+
[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"]]
|
352914
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "1"]]
|
352915
|
+
Token well formatted and verified. Set cache.
|
352916
|
+
[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"]]
|
352917
|
+
Attempting to get RailsIdentity::User 1
|
352918
|
+
[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"]]
|
352919
|
+
Checking to see if authorized to access object
|
352920
|
+
401 - Repia::Errors::Unauthorized
|
352921
|
+
Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
352922
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
352923
|
+
[1m[35m (0.0ms)[0m begin transaction
|
352924
|
+
----------------------------------------------------------------------------------------
|
352925
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_using_well-formed_but_bogus_payload
|
352926
|
+
----------------------------------------------------------------------------------------
|
352927
|
+
[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"]]
|
352928
|
+
[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"]]
|
352929
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
352930
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg2NDI1fQ.swdS1BhoWb8RJyXBu5b9vTo2VxyhsVx3zjr1rxqzaGM", "id"=>"1"}
|
352931
|
+
Requires a token
|
352932
|
+
Token well formatted for user 1,
|
352933
|
+
session doesnotexist
|
352934
|
+
Cache miss. Try database.
|
352935
|
+
[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"]]
|
352936
|
+
[1m[35mRailsIdentity::Session Load (0.0ms)[0m SELECT "rails_identity_sessions".* FROM "rails_identity_sessions" WHERE "rails_identity_sessions"."uuid" = ? LIMIT 1 [["uuid", "doesnotexist"]]
|
352937
|
+
401 - Well-formed but invalid session token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3V1aWQiOiIxIiwic2Vzc2lvbl91dWlkIjoiZG9lc25vdGV4aXN0Iiwicm9sZSI6MTAsImlhdCI6MTQ2MTM4NjM2NSwiZXhwIjoxNDYxMzg2NDI1fQ.swdS1BhoWb8RJyXBu5b9vTo2VxyhsVx3zjr1rxqzaGM
|
352938
|
+
Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
352939
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
352940
|
+
[1m[35m (0.0ms)[0m begin transaction
|
352941
|
+
------------------------------------------------------------------------------------------------------------
|
352942
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_(reissue)_a_verification_reset_token_without_username
|
352943
|
+
------------------------------------------------------------------------------------------------------------
|
352944
|
+
[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"]]
|
352945
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
352946
|
+
Parameters: {"issue_verification_token"=>true, "id"=>"current"}
|
352947
|
+
Accepts a token
|
352948
|
+
Token decode error: Nil JSON web token
|
352949
|
+
Suppressing error: Invalid token:
|
352950
|
+
[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
|
352951
|
+
404 - Repia::Errors::NotFound
|
352952
|
+
Completed 404 Not Found in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)
|
352953
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
352954
|
+
[1m[35m (0.0ms)[0m begin transaction
|
352955
|
+
------------------------------------------------------------------
|
352956
|
+
RailsIdentity::UsersControllerTest: test_admin_can_show_other_user
|
352957
|
+
------------------------------------------------------------------
|
352958
|
+
[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"]]
|
352959
|
+
[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"]]
|
352960
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
352961
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiJzZXNzaW9uX2FkbWluX29uZSIsInVzZXJfdXVpZCI6ImFkbWluX29uZSIsInJvbGUiOjEwMCwiZXhwIjoxNDYxNDM2NzYzfQ.VVabmfGrQC4kee49nNRJXQnB3zdC-9Ojpn58BQTyH9I", "id"=>"1"}
|
352962
|
+
Requires a token
|
352963
|
+
Token well formatted for user admin_one,
|
352964
|
+
session session_admin_one
|
352965
|
+
Cache miss. Try database.
|
352966
|
+
[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"]]
|
352967
|
+
[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"]]
|
352968
|
+
Token well formatted and verified. Set cache.
|
352969
|
+
[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"]]
|
352970
|
+
Attempting to get RailsIdentity::User 1
|
352971
|
+
[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"]]
|
352972
|
+
Checking to see if authorized to access object
|
352973
|
+
Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.2ms)
|
352974
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
352975
|
+
[1m[35m (0.0ms)[0m begin transaction
|
352976
|
+
------------------------------------------------------------------------------------------------------
|
352977
|
+
RailsIdentity::UsersControllerTest: test_cannot_update_(issue)_a_new_reset_token_with_invalid_username
|
352978
|
+
------------------------------------------------------------------------------------------------------
|
352979
|
+
[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"]]
|
352980
|
+
Processing by RailsIdentity::UsersController#update as HTML
|
352981
|
+
Parameters: {"issue_reset_token"=>true, "username"=>"doesnotexist@example.com", "id"=>"current"}
|
352982
|
+
Accepts a token
|
352983
|
+
Token decode error: Nil JSON web token
|
352984
|
+
Suppressing error: Invalid token:
|
352985
|
+
[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", "doesnotexist@example.com"]]
|
352986
|
+
404 - Repia::Errors::NotFound
|
352987
|
+
Completed 404 Not Found in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
352988
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
352989
|
+
[1m[35m (0.1ms)[0m begin transaction
|
352990
|
+
-----------------------------------------------------------------------
|
352991
|
+
RailsIdentity::UsersControllerTest: test_cannot_show_a_nonexisting_user
|
352992
|
+
-----------------------------------------------------------------------
|
352993
|
+
[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"]]
|
352994
|
+
Processing by RailsIdentity::UsersController#show as HTML
|
352995
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZXNzaW9uX3V1aWQiOiIxIiwidXNlcl91dWlkIjoiMSIsInJvbGUiOjEwLCJleHAiOjE0NjE0MzY3NjN9.KaMBCt2ZT1i1kXW6kPTPaHmvHwiRkX4vW8yCpvRwKWU", "id"=>"999"}
|
352996
|
+
Requires a token
|
352997
|
+
Token well formatted for user 1,
|
352998
|
+
session 1
|
352999
|
+
Cache miss. Try database.
|
353000
|
+
[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"]]
|
353001
|
+
[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"]]
|
353002
|
+
Token well formatted and verified. Set cache.
|
353003
|
+
[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"]]
|
353004
|
+
Attempting to get RailsIdentity::User 999
|
353005
|
+
[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"]]
|
353006
|
+
404 - RailsIdentity::User 999 cannot be found
|
353007
|
+
Completed 404 Not Found in 4ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
353008
|
+
[1m[35m (0.1ms)[0m rollback transaction
|