thecore_auth_commons 3.2.2 → 3.2.3
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/README.md +5 -0
- data/app/models/user.rb +2 -1
- data/config/initializers/after_initialize.rb +3 -0
- data/lib/thecore_auth_commons/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d01976e6049e0a9167596a63997019663b04bab90675d7d4e3386517a9f38c93
|
4
|
+
data.tar.gz: 6a0b3e04d0f92840aff1b4af73df107b98949243500126779d29f201f03a4c0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97e08cc352e3024d2f68d43f71e7e9836a9d2d6e0cbe4df5dc796853374009d17291904a70907f50f57ed38aab023434324a0e1d2bc756734c18c8261f9b4458
|
7
|
+
data.tar.gz: c420c037d2d559e495347e72dcb4f835b57c0d2581e1b8dcd99aa3db42e64dddcfb243303144be0a11f1d5b851f40af928e78f286ca5c712fd05d827a790488b
|
data/README.md
CHANGED
@@ -1 +1,6 @@
|
|
1
1
|
This is part of Thecore framework: https://github.com/gabrieletassoni/thecore/tree/release/3
|
2
|
+
|
3
|
+
It exposes two Env vars to chage the behaviour of Devise at startup:
|
4
|
+
|
5
|
+
- MIN_PASSWORD_LENGTH: the minimum length of the password (default: 8)
|
6
|
+
- SESSION_TIMEOUT_IN_MINUTES: the session timeout in minutes (default: 30)
|
data/app/models/user.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
1
|
class User < ApplicationRecord
|
2
|
-
|
2
|
+
# Get the minimum password length from the Environemnt or set it to 8
|
3
|
+
devise :database_authenticatable, :rememberable, :trackable, :timeoutable, :validatable, password_length: ENV.fetch('MIN_PASSWORD_LENGTH', 8).to_i..128, timeout_in: ENV.fetch('SESSION_TIMEOUT_IN_MINUTES', 31).to_i.minutes
|
3
4
|
end
|
@@ -3,6 +3,9 @@ Rails.application.configure do
|
|
3
3
|
# In development be sure to load all the namespaces
|
4
4
|
# in order to have working reflection
|
5
5
|
Zeitwerk::Loader.eager_load_all if Rails.env.development?
|
6
|
+
|
7
|
+
# Devise.timeout_in = ENV.fetch('SESSION_TIMEOUT_IN_MINUTES', 31).to_i.minutes
|
8
|
+
# Devise.password_length = ENV.fetch('MIN_PASSWORD_LENGTH', 8).to_i..128
|
6
9
|
|
7
10
|
Ability.send(:include, ThecoreAuthCommonsCanCanCanConcern)
|
8
11
|
User.send(:include, ThecoreAuthCommonsUserConcern)
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thecore_auth_commons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-02-12 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: devise
|
@@ -212,7 +211,6 @@ metadata:
|
|
212
211
|
homepage_uri: https://github.com/gabrieletassoni/thecore_auth_commons
|
213
212
|
source_code_uri: https://github.com/gabrieletassoni/thecore_auth_commons
|
214
213
|
changelog_uri: https://github.com/gabrieletassoni/thecore_auth_commons/blob/master/CHANGELOG.md
|
215
|
-
post_install_message:
|
216
214
|
rdoc_options: []
|
217
215
|
require_paths:
|
218
216
|
- lib
|
@@ -227,8 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
227
225
|
- !ruby/object:Gem::Version
|
228
226
|
version: '0'
|
229
227
|
requirements: []
|
230
|
-
rubygems_version: 3.
|
231
|
-
signing_key:
|
228
|
+
rubygems_version: 3.6.2
|
232
229
|
specification_version: 4
|
233
230
|
summary: Common Auth methods and models to be used in thecore components.
|
234
231
|
test_files: []
|