rails_jwt_auth 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86243065a340bf99470a75fb69f16e1841a3513f
|
4
|
+
data.tar.gz: f233be2ed5217097957e45701746be876428504a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afe13abb1108c991548184e18f63957ef110f356258525e1db4d167fa5bb030d9e4677b24f8e3ee02b1015caca6b679da236c6e81fb3240bd4f8d81941ecbfcd
|
7
|
+
data.tar.gz: 30c13093311ee85c6a7fbb8843f78e388e583e5972cba61aaecb79409e88c4f7f3d1fc27d50a4672d6e418a239f54302e86788335aa20a5572d8752d48a1dfce
|
@@ -12,7 +12,14 @@ module RailsJwtAuth
|
|
12
12
|
|
13
13
|
def update
|
14
14
|
user = RailsJwtAuth.model.where(reset_password_token: params[:reset_password_token]).first
|
15
|
-
|
15
|
+
|
16
|
+
unless user
|
17
|
+
return render_422(reset_password_token: [I18n.t('rails_jwt_auth.errors.not_found')])
|
18
|
+
end
|
19
|
+
|
20
|
+
unless password_update_params[:password].present?
|
21
|
+
return render_422(password: [I18n.t('rails_jwt_auth.errors.invalid')])
|
22
|
+
end
|
16
23
|
|
17
24
|
user.update_attributes(password_update_params) ? render_204 : render_422(user.errors)
|
18
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_jwt_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rjurado
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|