@@ -77,7 +77,7 @@ module Authentic
7777 # page before sign in.
7878 def self.redirect_to_originally_requested_path (
7979 action : Lucky ::Action ,
80- fallback : Lucky ::Action .class | Lucky ::RouteHelper
80+ fallback : Lucky ::Action .class | Lucky ::RouteHelper ,
8181 ) : Lucky ::Response
8282 return_to = action.session.get?(:return_to )
8383 action.session.delete(:return_to )
@@ -92,7 +92,7 @@ module Authentic
9292 # ```
9393 def self.correct_password ?(
9494 authenticatable : Authentic ::PasswordAuthenticatable ,
95- password_value : String
95+ password_value : String ,
9696 ) : Bool
9797 encrypted_password = authenticatable.encrypted_password
9898
@@ -119,7 +119,7 @@ module Authentic
119119 # ```
120120 def self.copy_and_encrypt (
121121 from password_field : Avram ::Attribute | Avram ::PermittedAttribute ,
122- to encrypted_password_field : Avram ::Attribute | Avram ::PermittedAttribute
122+ to encrypted_password_field : Avram ::Attribute | Avram ::PermittedAttribute ,
123123 ) : Nil
124124 password_field.value.try do |value |
125125 encrypted_password_field.value = generate_encrypted_password(value)
@@ -131,7 +131,7 @@ module Authentic
131131 # By default it uses Bcrypt to encrypt the password.
132132 def self.generate_encrypted_password (
133133 password_value : String ,
134- encryptor = Crypto ::Bcrypt ::Password
134+ encryptor = Crypto ::Bcrypt ::Password ,
135135 ) : String
136136 encryptor.create(
137137 password_value,
@@ -142,7 +142,7 @@ module Authentic
142142 # Generates a password reset token
143143 def self.generate_password_reset_token (
144144 authenticatable : Authentic ::PasswordAuthenticatable ,
145- expires_in : Time ::Span = Authentic .settings.default_password_reset_time_limit
145+ expires_in : Time ::Span = Authentic .settings.default_password_reset_time_limit,
146146 ) : String
147147 encryptor = Lucky ::MessageEncryptor .new(secret: settings.secret_key)
148148 encryptor.encrypt_and_sign(" #{ authenticatable.id } :#{ expires_in.from_now.to_unix_ms } " )
@@ -156,7 +156,7 @@ module Authentic
156156 # To generate a token see `Authentic.generate_password_reset_token`
157157 def self.valid_password_reset_token ?(
158158 authenticatable : Authentic ::PasswordAuthenticatable ,
159- token : String
159+ token : String ,
160160 ) : Bool
161161 encryptor = Lucky ::MessageEncryptor .new(secret: settings.secret_key)
162162 user_id, expiration_in_ms = String .new(encryptor.verify_and_decrypt(token)).split(" :" )
0 commit comments