lol_auth 0.1.7 → 0.1.8
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 +4 -4
- data/app/controllers/lol_auth/passwords_controller.rb +19 -19
- data/lib/lol_auth/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d9571197670146244b29fc87b006b687dcdf439
|
4
|
+
data.tar.gz: 5d05f9d767cc5fc615156aced0e78a86bd95cd99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c928e379e90afc1a70da05cc32ddc7f1e0693aa8e8f0745bb3f432052bd8bd41c6d7a0e693c4c5dff0c160eb73ffd82ceb84e722c28de6284864c6783c70b25
|
7
|
+
data.tar.gz: 99289ba768be803525acf0dbce29358a94fe8a8f3de2fa980b3999a3f1f443bd2ec7a2ff4e995d8fa11aba711ad15c9ee06c245092ee88da053f611e4c9c181a
|
@@ -4,30 +4,30 @@ module LolAuth
|
|
4
4
|
class PasswordsController < ApplicationController
|
5
5
|
include Rails.application.routes.url_helpers
|
6
6
|
|
7
|
-
skip_before_action :authenticate_api_v1_user
|
7
|
+
skip_before_action :authenticate_api_v1_user!
|
8
8
|
|
9
|
-
|
9
|
+
before_action :load_user, except: [:complete_password]
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
def new
|
12
|
+
@user = nil unless @user.persisted?
|
13
|
+
end
|
14
14
|
|
15
|
-
|
16
|
-
|
15
|
+
def create
|
16
|
+
@manager = UserResetPasswordManager.new(user: @user, params: params[:user])
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
18
|
+
if @manager.process
|
19
|
+
redirect_to complete_password_path
|
20
|
+
else
|
21
|
+
redirect_to new_password_path(token: params[:token], notice: 'Confirmação deve ser igual a Senha e maior de 8 caracteres')
|
22
|
+
end
|
23
|
+
end
|
24
24
|
|
25
|
-
|
26
|
-
|
25
|
+
def complete_password
|
26
|
+
end
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
private
|
29
|
+
def load_user
|
30
|
+
@user = User.reset_password_by_token({reset_password_token: params[:token]})
|
31
|
+
end
|
32
32
|
end
|
33
33
|
end
|
data/lib/lol_auth/version.rb
CHANGED