rails-identity 0.1.1 → 0.1.2

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