action_auth 0.2.7 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/action_auth/user.rb +1 -1
- data/config/routes.rb +1 -1
- data/lib/action_auth/version.rb +1 -1
- data/lib/action_auth.rb +7 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15e0dbb39c116db3c4230dfd773cb2efca4b4b489718b9bcf346be31c5622aca
|
4
|
+
data.tar.gz: 8bd290cce05e06f729e1eadabaef9e09801fb525bfd527f2eccf055f50f648ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21cc228bd5ecaeb7fcf5ff95fad43d7dce4b4655d4460dced0378dfcba168054261c743b92ae59430c6d32e8bf115156f439badde073943f9325c7254302ed5e
|
7
|
+
data.tar.gz: 1704cce56c19388ebb971ffbac49552a578cb09f67d8285334ebcabb4375647ce701e82a36a33f95b51f79c902e8f6c7d61356572fe753eef06a9d006af92e5f
|
@@ -5,7 +5,7 @@ module ActionAuth
|
|
5
5
|
has_many :action_auth_sessions, dependent: :destroy,
|
6
6
|
class_name: "ActionAuth::Session", foreign_key: "action_auth_user_id"
|
7
7
|
|
8
|
-
if ActionAuth.configuration
|
8
|
+
if ActionAuth.configuration.webauthn_enabled?
|
9
9
|
has_many :action_auth_webauthn_credentials, dependent: :destroy,
|
10
10
|
class_name: "ActionAuth::WebauthnCredential", foreign_key: "action_auth_user_id"
|
11
11
|
end
|
data/config/routes.rb
CHANGED
@@ -11,7 +11,7 @@ ActionAuth::Engine.routes.draw do
|
|
11
11
|
resource :password_reset, only: [:new, :edit, :create, :update]
|
12
12
|
end
|
13
13
|
|
14
|
-
if ActionAuth.configuration
|
14
|
+
if ActionAuth.configuration.webauthn_enabled?
|
15
15
|
resources :webauthn_credentials, only: [:new, :create, :destroy] do
|
16
16
|
post :options, on: :collection, as: 'options_for'
|
17
17
|
end
|
data/lib/action_auth/version.rb
CHANGED
data/lib/action_auth.rb
CHANGED
@@ -4,11 +4,15 @@ require "action_auth/configuration"
|
|
4
4
|
|
5
5
|
module ActionAuth
|
6
6
|
class << self
|
7
|
-
|
7
|
+
attr_writer :configuration
|
8
|
+
|
9
|
+
# Initialize configuration with default settings
|
10
|
+
def configuration
|
11
|
+
@configuration ||= Configuration.new
|
12
|
+
end
|
8
13
|
|
9
14
|
def configure
|
10
|
-
|
11
|
-
yield(configuration)
|
15
|
+
yield(configuration) if block_given? # Yield only if a block is provided
|
12
16
|
configure_webauthn
|
13
17
|
end
|
14
18
|
|