Skip to content

Commit dea391d

Browse files
authored
Release v1.0.2 (#84)
* Bump version for next release * Formatting fixes
1 parent 669d8df commit dea391d

4 files changed

Lines changed: 11 additions & 13 deletions

File tree

shard.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: authentic
2-
version: 1.0.1
2+
version: 1.0.2
33

44
authors:
55
- Paul Smith <paulcsmith0218@gmail.com>
@@ -11,12 +11,10 @@ license: MIT
1111
dependencies:
1212
lucky:
1313
github: luckyframework/lucky
14-
branch: main
15-
# version: ">= 1.0.0"
14+
version: ">= 1.0.0"
1615
avram:
1716
github: luckyframework/avram
18-
branch: main
19-
# version: ">= 1.0.0"
17+
version: ">= 1.0.0"
2018
habitat:
2119
github: luckyframework/habitat
2220
version: ~> 0.4.9

spec/support/context_helper.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class ContextHelper
33

44
def initialize(
55
@path : String = "/",
6-
@method : String = "GET"
6+
@method : String = "GET",
77
)
88
end
99

src/authentic.cr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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(":")

src/authentic/version.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Authentic
2-
VERSION = "1.0.1"
2+
VERSION = {{ `shards version #{__DIR__}`.chomp.stringify }}
33
end

0 commit comments

Comments
 (0)