authentication-zero 0.0.24 → 1.0.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30572c49dd754b2b621acf5adad550f2ad179f3bb3af559748e296b16b04c529
|
4
|
+
data.tar.gz: 569ac3a9411562d1a2bf5ee049b3cbf1350fc43cc1a2a5e837ca421f7994ae63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a78c56a451d289464bb25e4d86f1765a5c74c032f2c19aaa7268cb3653680fdb7bae3242c911f3d7d6402d3cd22d771ab9cef1316866b8fd6d89ecf6991d2772
|
7
|
+
data.tar.gz: 7e245a32b1150f57ceb6941cdffce360cf9ac67d49ef583b4e5e1d6ee0afcb0d593b7c2afb67e66369f77ede9f8c347203d109537e26c184fd25ce1c8ddb0765
|
data/Gemfile.lock
CHANGED
@@ -24,7 +24,7 @@ class AuthenticationGenerator < Rails::Generators::NamedBase
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
def
|
27
|
+
def create_models
|
28
28
|
template "models/model.rb", "app/models/#{file_name}.rb"
|
29
29
|
template "models/current.rb", "app/models/current.rb"
|
30
30
|
end
|
@@ -82,8 +82,7 @@ class AuthenticationGenerator < Rails::Generators::NamedBase
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def create_mailers
|
85
|
-
|
86
|
-
template "mailers/password_mailer.rb", "app/mailers/password_mailer.rb"
|
85
|
+
directory "mailers", "app/mailers"
|
87
86
|
end
|
88
87
|
|
89
88
|
def add_routes
|
@@ -23,11 +23,11 @@ class <%= class_name %> < ApplicationRecord
|
|
23
23
|
end
|
24
24
|
<% if options.api? %>
|
25
25
|
def signed_session_token
|
26
|
-
|
26
|
+
Rails.application.message_verifier(:session_token).generate(session_token)
|
27
27
|
end
|
28
28
|
|
29
29
|
def self.find_signed_session_token(signed_session_token)
|
30
|
-
if session_token =
|
30
|
+
if session_token = Rails.application.message_verifier(:session_token).verified(signed_session_token)
|
31
31
|
find_by_session_token(session_token)
|
32
32
|
end
|
33
33
|
end
|