veri 2.0.3 → 3.0.0
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/CHANGELOG.md +49 -1
- data/README.md +174 -57
- data/{lib/veri/models → app/models/veri}/session.rb +53 -31
- data/lib/generators/veri/authentication_generator.rb +10 -2
- data/lib/generators/veri/templates/add_veri_authentication.rb.erb +8 -8
- data/lib/veri/controllers/concerns/authentication.rb +29 -26
- data/lib/veri/engine.rb +25 -0
- data/lib/veri/helpers/migration_helpers.rb +8 -9
- data/lib/veri/inputs/authenticatable.rb +3 -1
- data/lib/veri/inputs/base.rb +7 -4
- data/lib/veri/inputs/boolean.rb +11 -0
- data/lib/veri/inputs/duration.rb +1 -1
- data/lib/veri/inputs/hashing_algorithm.rb +1 -1
- data/lib/veri/inputs/model.rb +4 -6
- data/lib/veri/inputs/non_empty_string.rb +3 -1
- data/lib/veri/inputs/request.rb +11 -0
- data/lib/veri/inputs/tenant.rb +10 -13
- data/lib/veri/models/concerns/authenticatable.rb +42 -22
- data/lib/veri/models/tenant_declaration.rb +11 -0
- data/lib/veri/password/argon2.rb +0 -4
- data/lib/veri/password/bcrypt.rb +0 -4
- data/lib/veri/password/pbkdf2.rb +0 -4
- data/lib/veri/password/scrypt.rb +0 -4
- data/lib/veri/version.rb +1 -1
- data/lib/veri.rb +4 -2
- data/veri.gemspec +4 -5
- metadata +18 -16
- data/lib/veri/railtie.rb +0 -44
|
@@ -5,7 +5,7 @@ module Veri
|
|
|
5
5
|
included do
|
|
6
6
|
include ActionController::Cookies unless self < ActionController::Cookies
|
|
7
7
|
|
|
8
|
-
helper_method(:current_user, :logged_in?, :shapeshifter?, :current_session) if respond_to?(:helper_method)
|
|
8
|
+
helper_method(:current_user, :logged_in?, :shapeshifter?, :current_session, :current_tenant) if respond_to?(:helper_method)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
class_methods do
|
|
@@ -23,34 +23,47 @@ module Veri
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def current_user
|
|
26
|
-
|
|
26
|
+
current_session&.authenticatable
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def current_session
|
|
30
|
-
|
|
30
|
+
return @current_session if defined?(@current_session)
|
|
31
31
|
|
|
32
|
-
@current_session
|
|
32
|
+
@current_session = Session.from_request(request)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
def
|
|
36
|
-
|
|
37
|
-
authenticatable,
|
|
38
|
-
message: "Expected an instance of #{Veri::Configuration.user_model_name}, got `#{authenticatable.inspect}`"
|
|
39
|
-
).process
|
|
35
|
+
def current_tenant
|
|
36
|
+
raise Veri::Error, "No user is logged in" unless current_session
|
|
40
37
|
|
|
41
|
-
|
|
38
|
+
current_session.tenant
|
|
39
|
+
rescue ActiveRecord::RecordNotFound
|
|
40
|
+
raise Veri::Error, "Tenant not found"
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def log_in(authenticatable, tenant: nil)
|
|
44
|
+
processed_authenticatable = Veri::Inputs::Authenticatable.new(authenticatable).process
|
|
45
|
+
resolved_tenant = Veri::Inputs::Tenant.new(tenant).resolve
|
|
46
|
+
|
|
47
|
+
token = processed_authenticatable.transaction do
|
|
48
|
+
locked_authenticatable = processed_authenticatable.class.unscoped.lock.find(processed_authenticatable.id)
|
|
49
|
+
|
|
50
|
+
next if locked_authenticatable.suspended? || locked_authenticatable.password_updated_at != processed_authenticatable.password_updated_at_was
|
|
51
|
+
|
|
52
|
+
Veri::Session.establish(processed_authenticatable, request, resolved_tenant)
|
|
53
|
+
end
|
|
42
54
|
|
|
43
|
-
|
|
55
|
+
return false unless token
|
|
44
56
|
|
|
57
|
+
current_session&.terminate
|
|
45
58
|
cookies.encrypted.permanent["veri_token"] = { value: token, httponly: true, secure: request.ssl? }
|
|
46
|
-
|
|
59
|
+
reset_memoized_session
|
|
47
60
|
true
|
|
48
61
|
end
|
|
49
62
|
|
|
50
63
|
def log_out
|
|
51
64
|
current_session&.terminate
|
|
52
65
|
cookies.delete("veri_token")
|
|
53
|
-
|
|
66
|
+
reset_memoized_session
|
|
54
67
|
end
|
|
55
68
|
|
|
56
69
|
def logged_in?
|
|
@@ -68,7 +81,7 @@ module Veri
|
|
|
68
81
|
private
|
|
69
82
|
|
|
70
83
|
def with_authentication
|
|
71
|
-
if logged_in?
|
|
84
|
+
if logged_in?
|
|
72
85
|
current_session.update_info(request)
|
|
73
86
|
return
|
|
74
87
|
end
|
|
@@ -84,18 +97,8 @@ module Veri
|
|
|
84
97
|
request.format.html? ? redirect_back_or_to(root_path) : head(:unauthorized)
|
|
85
98
|
end
|
|
86
99
|
|
|
87
|
-
def
|
|
88
|
-
|
|
89
|
-
def resolved_tenant
|
|
90
|
-
@resolved_tenant ||= Veri::Inputs::Tenant.new(
|
|
91
|
-
current_tenant,
|
|
92
|
-
error: Veri::InvalidTenantError,
|
|
93
|
-
message: "Expected a string, an ActiveRecord model instance, or nil, got `#{current_tenant.inspect}`"
|
|
94
|
-
).resolve
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
def reset_memoization
|
|
98
|
-
@current_user = @current_session = nil
|
|
100
|
+
def reset_memoized_session
|
|
101
|
+
remove_instance_variable(:@current_session) if defined?(@current_session)
|
|
99
102
|
end
|
|
100
103
|
end
|
|
101
104
|
end
|
data/lib/veri/engine.rb
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
require "rails/engine"
|
|
2
|
+
|
|
3
|
+
module Veri
|
|
4
|
+
class Engine < Rails::Engine
|
|
5
|
+
initializer "veri.include_authenticatable" do
|
|
6
|
+
Rails.autoloaders.each do |autoloader|
|
|
7
|
+
autoloader.on_load do |cpath, klass, _abspath|
|
|
8
|
+
klass.include Veri::Authenticatable if cpath == Veri::Configuration.user_model_name
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
initializer "veri.extend_tenant_declaration" do
|
|
14
|
+
ActiveSupport.on_load :active_record do
|
|
15
|
+
extend Veri::TenantDeclaration
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
initializer "veri.extend_migration_helpers" do
|
|
20
|
+
ActiveSupport.on_load :active_record do
|
|
21
|
+
ActiveRecord::Migration.include Veri::MigrationHelpers
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
module Veri
|
|
2
2
|
module MigrationHelpers
|
|
3
3
|
def migrate_authentication_tenant!(old_tenant, new_tenant)
|
|
4
|
-
|
|
4
|
+
old_tenant_type = Veri::Inputs::NonEmptyString.new(old_tenant).process
|
|
5
|
+
new_tenant_type = Veri::Inputs::NonEmptyString.new(new_tenant).process
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
Veri::Session.transaction do
|
|
8
|
+
Veri::Session.where(tenant_type: old_tenant_type).update_all(tenant_type: new_tenant_type)
|
|
9
|
+
Veri::Session.where(original_tenant_type: old_tenant_type).update_all(original_tenant_type: new_tenant_type)
|
|
10
|
+
end
|
|
10
11
|
end
|
|
11
12
|
|
|
12
13
|
def delete_authentication_tenant!(tenant)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
raise Veri::InvalidArgumentError, "No sessions exist in tenant #{tenant.inspect}" unless sessions.exists?
|
|
14
|
+
tenant_type = Veri::Inputs::NonEmptyString.new(tenant).process
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
Veri::Session.where(tenant_type:).or(Veri::Session.where(original_tenant_type: tenant_type)).delete_all
|
|
18
17
|
end
|
|
19
18
|
end
|
|
20
19
|
end
|
|
@@ -3,7 +3,9 @@ module Veri
|
|
|
3
3
|
class Authenticatable < Veri::Inputs::Base
|
|
4
4
|
private
|
|
5
5
|
|
|
6
|
-
def
|
|
6
|
+
def default_message = "Expected a persisted instance of #{Veri::Configuration.user_model_name}, got `#{@value.inspect}`"
|
|
7
|
+
|
|
8
|
+
def validate_and_normalize = @value.is_a?(Veri::Configuration.user_model) && @value.persisted? ? @value : raise_error
|
|
7
9
|
end
|
|
8
10
|
end
|
|
9
11
|
end
|
data/lib/veri/inputs/base.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Veri
|
|
2
2
|
module Inputs
|
|
3
3
|
class Base
|
|
4
|
-
def initialize(value, optional: false, error:
|
|
4
|
+
def initialize(value, optional: false, error: nil, message: nil)
|
|
5
5
|
@value = value
|
|
6
6
|
@optional = optional
|
|
7
7
|
@error = error
|
|
@@ -11,17 +11,20 @@ module Veri
|
|
|
11
11
|
def process
|
|
12
12
|
return @value if @value.nil? && @optional
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
validate_and_normalize
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
private
|
|
18
18
|
|
|
19
|
-
def
|
|
19
|
+
def validate_and_normalize
|
|
20
20
|
raise NotImplementedError
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
+
def default_error = Veri::InvalidArgumentError
|
|
24
|
+
def default_message = nil
|
|
25
|
+
|
|
23
26
|
def raise_error
|
|
24
|
-
raise @error, @message
|
|
27
|
+
raise @error || default_error, @message || default_message
|
|
25
28
|
end
|
|
26
29
|
end
|
|
27
30
|
end
|
data/lib/veri/inputs/duration.rb
CHANGED
|
@@ -3,7 +3,7 @@ module Veri
|
|
|
3
3
|
class HashingAlgorithm < Veri::Inputs::Base
|
|
4
4
|
private
|
|
5
5
|
|
|
6
|
-
def
|
|
6
|
+
def validate_and_normalize = Veri::Configuration::HASHERS.key?(@value) ? @value : raise_error
|
|
7
7
|
end
|
|
8
8
|
end
|
|
9
9
|
end
|
data/lib/veri/inputs/model.rb
CHANGED
|
@@ -3,12 +3,10 @@ module Veri
|
|
|
3
3
|
class Model < Veri::Inputs::Base
|
|
4
4
|
private
|
|
5
5
|
|
|
6
|
-
def
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
model
|
|
11
|
-
}
|
|
6
|
+
def validate_and_normalize
|
|
7
|
+
model = @value.try(:safe_constantize)
|
|
8
|
+
raise_error unless model.is_a?(Class) && model < ActiveRecord::Base
|
|
9
|
+
model
|
|
12
10
|
end
|
|
13
11
|
end
|
|
14
12
|
end
|
|
@@ -3,7 +3,9 @@ module Veri
|
|
|
3
3
|
class NonEmptyString < Veri::Inputs::Base
|
|
4
4
|
private
|
|
5
5
|
|
|
6
|
-
def
|
|
6
|
+
def default_message = "Expected a non-empty string, got `#{@value.inspect}`"
|
|
7
|
+
|
|
8
|
+
def validate_and_normalize = @value.is_a?(String) && !@value.empty? ? @value : raise_error
|
|
7
9
|
end
|
|
8
10
|
end
|
|
9
11
|
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
module Veri
|
|
2
|
+
module Inputs
|
|
3
|
+
class Request < Veri::Inputs::Base
|
|
4
|
+
private
|
|
5
|
+
|
|
6
|
+
def default_message = "Expected an instance of ActionDispatch::Request, got `#{@value.inspect}`"
|
|
7
|
+
|
|
8
|
+
def validate_and_normalize = @value.is_a?(ActionDispatch::Request) ? @value : raise_error
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
data/lib/veri/inputs/tenant.rb
CHANGED
|
@@ -7,25 +7,22 @@ module Veri
|
|
|
7
7
|
{ tenant_type: nil, tenant_id: nil }
|
|
8
8
|
when String
|
|
9
9
|
{ tenant_type: tenant, tenant_id: nil }
|
|
10
|
-
when
|
|
11
|
-
|
|
12
|
-
{ tenant_type: tenant.class.to_s, tenant_id: tenant.public_send(tenant.class.primary_key) }
|
|
13
|
-
else
|
|
14
|
-
tenant
|
|
10
|
+
when Veri::Tenantable
|
|
11
|
+
{ tenant_type: tenant.class.to_s, tenant_id: tenant.id }
|
|
15
12
|
end
|
|
16
13
|
end
|
|
17
14
|
|
|
18
15
|
private
|
|
19
16
|
|
|
20
|
-
def
|
|
21
|
-
|
|
22
|
-
return @value if @value.nil?
|
|
23
|
-
return @value if @value.is_a?(String) && @value.present?
|
|
24
|
-
return @value if @value.is_a?(ActiveRecord::Base)
|
|
25
|
-
return @value if @value in { tenant_type: String | nil, tenant_id: String | Integer | nil }
|
|
17
|
+
def default_error = Veri::InvalidTenantError
|
|
18
|
+
def default_message = "Expected a string, a persisted instance of a model declared with `veri_tenant`, or nil, got `#{@value.inspect}`"
|
|
26
19
|
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
def validate_and_normalize
|
|
21
|
+
return @value if @value.nil?
|
|
22
|
+
return @value if @value.is_a?(String) && @value.present?
|
|
23
|
+
return @value if @value.is_a?(Veri::Tenantable) && @value.persisted?
|
|
24
|
+
|
|
25
|
+
raise_error
|
|
29
26
|
end
|
|
30
27
|
end
|
|
31
28
|
end
|
|
@@ -7,52 +7,72 @@ module Veri
|
|
|
7
7
|
|
|
8
8
|
@@included = name
|
|
9
9
|
|
|
10
|
-
has_many :sessions, class_name: "Veri::Session", foreign_key: :authenticatable_id, dependent: :
|
|
10
|
+
has_many :sessions, class_name: "Veri::Session", foreign_key: :authenticatable_id, dependent: :delete_all
|
|
11
|
+
has_many :shapeshifter_sessions, class_name: "Veri::Session", foreign_key: :original_authenticatable_id, dependent: :delete_all
|
|
11
12
|
|
|
12
|
-
scope :
|
|
13
|
-
scope :
|
|
13
|
+
scope :suspended, -> { where(suspended: true) }
|
|
14
|
+
scope :unsuspended, -> { where(suspended: false) }
|
|
14
15
|
end
|
|
15
16
|
|
|
16
|
-
def update_password(password)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
def update_password(password, terminate_sessions: true)
|
|
18
|
+
processed_password = Veri::Inputs::NonEmptyString.new(password).process
|
|
19
|
+
processed_terminate_sessions = Veri::Inputs::Boolean.new(terminate_sessions).process
|
|
20
|
+
|
|
21
|
+
hashed_password = hash_password(processed_password)
|
|
22
|
+
|
|
23
|
+
transaction do
|
|
24
|
+
update!(hashed_password:, password_updated_at: Time.current)
|
|
25
|
+
|
|
26
|
+
sessions.or(shapeshifter_sessions).terminate_all if processed_terminate_sessions
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
true
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def password_set?
|
|
33
|
+
hashed_password.present?
|
|
23
34
|
end
|
|
24
35
|
|
|
25
36
|
def verify_password(password)
|
|
26
|
-
processed_password = Veri::Inputs::NonEmptyString.new(password
|
|
37
|
+
processed_password = Veri::Inputs::NonEmptyString.new(password).process
|
|
27
38
|
|
|
28
|
-
return false
|
|
39
|
+
return false unless password_set?
|
|
29
40
|
|
|
30
|
-
|
|
41
|
+
algorithm, hash = hashed_password.split(":", 2)
|
|
42
|
+
stored_hasher = Veri::Configuration::HASHERS[algorithm.to_sym]
|
|
31
43
|
|
|
32
44
|
raise Veri::Error, "Unrecognized password hash format" unless stored_hasher
|
|
33
45
|
|
|
34
|
-
return false unless stored_hasher.verify(processed_password,
|
|
46
|
+
return false unless stored_hasher.verify(processed_password, hash)
|
|
35
47
|
|
|
36
|
-
|
|
48
|
+
unless stored_hasher == Veri::Configuration.hasher
|
|
49
|
+
self.hashed_password = hash_password(processed_password)
|
|
50
|
+
self.class.unscoped.where(self.class.primary_key => id, hashed_password: hashed_password_was).update_all(hashed_password:)
|
|
51
|
+
clear_attribute_changes([:hashed_password])
|
|
52
|
+
end
|
|
37
53
|
|
|
38
54
|
true
|
|
39
55
|
end
|
|
40
56
|
|
|
41
|
-
def
|
|
57
|
+
def suspend!
|
|
42
58
|
transaction do
|
|
43
|
-
update!(
|
|
44
|
-
sessions.terminate_all
|
|
59
|
+
update!(suspended: true, suspended_at: Time.current)
|
|
60
|
+
sessions.or(shapeshifter_sessions).terminate_all
|
|
45
61
|
end
|
|
62
|
+
|
|
63
|
+
true
|
|
46
64
|
end
|
|
47
65
|
|
|
48
|
-
def
|
|
49
|
-
update!(
|
|
66
|
+
def unsuspend!
|
|
67
|
+
update!(suspended: false, suspended_at: nil)
|
|
68
|
+
|
|
69
|
+
true
|
|
50
70
|
end
|
|
51
71
|
|
|
52
72
|
private
|
|
53
73
|
|
|
54
|
-
def
|
|
55
|
-
|
|
74
|
+
def hash_password(password)
|
|
75
|
+
"#{Veri::Configuration.hashing_algorithm}:#{Veri::Configuration.hasher.create(password)}"
|
|
56
76
|
end
|
|
57
77
|
end
|
|
58
78
|
end
|
data/lib/veri/password/argon2.rb
CHANGED
data/lib/veri/password/bcrypt.rb
CHANGED
data/lib/veri/password/pbkdf2.rb
CHANGED
data/lib/veri/password/scrypt.rb
CHANGED
data/lib/veri/version.rb
CHANGED
data/lib/veri.rb
CHANGED
|
@@ -10,10 +10,12 @@ require_relative "veri/password/scrypt"
|
|
|
10
10
|
|
|
11
11
|
require_relative "veri/inputs/base"
|
|
12
12
|
require_relative "veri/inputs/authenticatable"
|
|
13
|
+
require_relative "veri/inputs/boolean"
|
|
13
14
|
require_relative "veri/inputs/duration"
|
|
14
15
|
require_relative "veri/inputs/hashing_algorithm"
|
|
15
16
|
require_relative "veri/inputs/model"
|
|
16
17
|
require_relative "veri/inputs/non_empty_string"
|
|
18
|
+
require_relative "veri/inputs/request"
|
|
17
19
|
require_relative "veri/inputs/tenant"
|
|
18
20
|
require_relative "veri/configuration"
|
|
19
21
|
|
|
@@ -27,9 +29,9 @@ module Veri
|
|
|
27
29
|
module_function :configure
|
|
28
30
|
end
|
|
29
31
|
|
|
30
|
-
require_relative "veri/models/session"
|
|
31
32
|
require_relative "veri/controllers/concerns/authentication"
|
|
32
33
|
require_relative "veri/models/concerns/authenticatable"
|
|
34
|
+
require_relative "veri/models/tenant_declaration"
|
|
33
35
|
require_relative "veri/helpers/migration_helpers"
|
|
34
36
|
|
|
35
|
-
require_relative "veri/
|
|
37
|
+
require_relative "veri/engine"
|
data/veri.gemspec
CHANGED
|
@@ -5,29 +5,28 @@ Gem::Specification.new do |spec|
|
|
|
5
5
|
spec.version = Veri::VERSION
|
|
6
6
|
spec.authors = ["enjaku4"]
|
|
7
7
|
spec.email = ["contact@brownbox.dev"]
|
|
8
|
-
spec.homepage = "https://github.com/
|
|
8
|
+
spec.homepage = "https://github.com/brownboxdev/veri-authentication"
|
|
9
9
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
10
10
|
spec.metadata["source_code_uri"] = spec.homepage
|
|
11
11
|
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md"
|
|
12
12
|
spec.metadata["bug_tracker_uri"] = "#{spec.homepage}/issues"
|
|
13
13
|
spec.metadata["documentation_uri"] = "#{spec.homepage}/blob/main/README.md"
|
|
14
14
|
spec.metadata["mailing_list_uri"] = "#{spec.homepage}/discussions"
|
|
15
|
-
spec.metadata["funding_uri"] = "https://github.com/sponsors/enjaku4"
|
|
16
15
|
spec.metadata["rubygems_mfa_required"] = "true"
|
|
17
16
|
spec.summary = "Minimal cookie-based authentication library for Ruby on Rails"
|
|
18
17
|
spec.description = "Minimal cookie-based authentication for Rails applications with multi-tenancy support and granular session management"
|
|
19
18
|
spec.license = "MIT"
|
|
20
|
-
spec.required_ruby_version = ">= 3.
|
|
19
|
+
spec.required_ruby_version = ">= 3.3", "< 4.1"
|
|
21
20
|
|
|
22
21
|
spec.files = [
|
|
23
22
|
"veri.gemspec", "README.md", "CHANGELOG.md", "LICENSE.txt"
|
|
24
|
-
] + Dir.glob("lib/**/*")
|
|
23
|
+
] + Dir.glob("{app,lib}/**/*")
|
|
25
24
|
|
|
26
25
|
spec.require_paths = ["lib"]
|
|
27
26
|
|
|
28
27
|
spec.add_dependency "argon2", "~> 2.0"
|
|
29
28
|
spec.add_dependency "bcrypt", "~> 3.0"
|
|
30
|
-
spec.add_dependency "rails", ">=
|
|
29
|
+
spec.add_dependency "rails", ">= 8.1", "< 8.2"
|
|
31
30
|
spec.add_dependency "scrypt", "~> 3.0"
|
|
32
31
|
spec.add_dependency "user_agent_parser", "~> 2.0"
|
|
33
32
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: veri
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 3.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- enjaku4
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-
|
|
10
|
+
date: 2026-11-23 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: argon2
|
|
@@ -43,7 +43,7 @@ dependencies:
|
|
|
43
43
|
requirements:
|
|
44
44
|
- - ">="
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: '
|
|
46
|
+
version: '8.1'
|
|
47
47
|
- - "<"
|
|
48
48
|
- !ruby/object:Gem::Version
|
|
49
49
|
version: '8.2'
|
|
@@ -53,7 +53,7 @@ dependencies:
|
|
|
53
53
|
requirements:
|
|
54
54
|
- - ">="
|
|
55
55
|
- !ruby/object:Gem::Version
|
|
56
|
-
version: '
|
|
56
|
+
version: '8.1'
|
|
57
57
|
- - "<"
|
|
58
58
|
- !ruby/object:Gem::Version
|
|
59
59
|
version: '8.2'
|
|
@@ -96,39 +96,41 @@ files:
|
|
|
96
96
|
- CHANGELOG.md
|
|
97
97
|
- LICENSE.txt
|
|
98
98
|
- README.md
|
|
99
|
+
- app/models/veri/session.rb
|
|
99
100
|
- lib/generators/veri/authentication_generator.rb
|
|
100
101
|
- lib/generators/veri/templates/add_veri_authentication.rb.erb
|
|
101
102
|
- lib/veri.rb
|
|
102
103
|
- lib/veri/configuration.rb
|
|
103
104
|
- lib/veri/controllers/concerns/authentication.rb
|
|
105
|
+
- lib/veri/engine.rb
|
|
104
106
|
- lib/veri/helpers/migration_helpers.rb
|
|
105
107
|
- lib/veri/inputs/authenticatable.rb
|
|
106
108
|
- lib/veri/inputs/base.rb
|
|
109
|
+
- lib/veri/inputs/boolean.rb
|
|
107
110
|
- lib/veri/inputs/duration.rb
|
|
108
111
|
- lib/veri/inputs/hashing_algorithm.rb
|
|
109
112
|
- lib/veri/inputs/model.rb
|
|
110
113
|
- lib/veri/inputs/non_empty_string.rb
|
|
114
|
+
- lib/veri/inputs/request.rb
|
|
111
115
|
- lib/veri/inputs/tenant.rb
|
|
112
116
|
- lib/veri/models/concerns/authenticatable.rb
|
|
113
|
-
- lib/veri/models/
|
|
117
|
+
- lib/veri/models/tenant_declaration.rb
|
|
114
118
|
- lib/veri/password/argon2.rb
|
|
115
119
|
- lib/veri/password/bcrypt.rb
|
|
116
120
|
- lib/veri/password/pbkdf2.rb
|
|
117
121
|
- lib/veri/password/scrypt.rb
|
|
118
|
-
- lib/veri/railtie.rb
|
|
119
122
|
- lib/veri/version.rb
|
|
120
123
|
- veri.gemspec
|
|
121
|
-
homepage: https://github.com/
|
|
124
|
+
homepage: https://github.com/brownboxdev/veri-authentication
|
|
122
125
|
licenses:
|
|
123
126
|
- MIT
|
|
124
127
|
metadata:
|
|
125
|
-
homepage_uri: https://github.com/
|
|
126
|
-
source_code_uri: https://github.com/
|
|
127
|
-
changelog_uri: https://github.com/
|
|
128
|
-
bug_tracker_uri: https://github.com/
|
|
129
|
-
documentation_uri: https://github.com/
|
|
130
|
-
mailing_list_uri: https://github.com/
|
|
131
|
-
funding_uri: https://github.com/sponsors/enjaku4
|
|
128
|
+
homepage_uri: https://github.com/brownboxdev/veri-authentication
|
|
129
|
+
source_code_uri: https://github.com/brownboxdev/veri-authentication
|
|
130
|
+
changelog_uri: https://github.com/brownboxdev/veri-authentication/blob/main/CHANGELOG.md
|
|
131
|
+
bug_tracker_uri: https://github.com/brownboxdev/veri-authentication/issues
|
|
132
|
+
documentation_uri: https://github.com/brownboxdev/veri-authentication/blob/main/README.md
|
|
133
|
+
mailing_list_uri: https://github.com/brownboxdev/veri-authentication/discussions
|
|
132
134
|
rubygems_mfa_required: 'true'
|
|
133
135
|
rdoc_options: []
|
|
134
136
|
require_paths:
|
|
@@ -137,7 +139,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
137
139
|
requirements:
|
|
138
140
|
- - ">="
|
|
139
141
|
- !ruby/object:Gem::Version
|
|
140
|
-
version: '3.
|
|
142
|
+
version: '3.3'
|
|
141
143
|
- - "<"
|
|
142
144
|
- !ruby/object:Gem::Version
|
|
143
145
|
version: '4.1'
|
|
@@ -147,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
147
149
|
- !ruby/object:Gem::Version
|
|
148
150
|
version: '0'
|
|
149
151
|
requirements: []
|
|
150
|
-
rubygems_version: 4.0.
|
|
152
|
+
rubygems_version: 4.0.16
|
|
151
153
|
specification_version: 4
|
|
152
154
|
summary: Minimal cookie-based authentication library for Ruby on Rails
|
|
153
155
|
test_files: []
|