File: webauthn_modify_email.rb

package info (click to toggle)
ruby-rodauth 2.42.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 812 kB
  • sloc: ruby: 7,524; javascript: 100; makefile: 4
file content (23 lines) | stat: -rw-r--r-- 653 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen-string-literal: true

module Rodauth
  Feature.define(:webauthn_modify_email, :WebauthnModifyEmail) do
    depends :webauthn, :email_base

    loaded_templates %w'webauthn-authenticator-added-email webauthn-authenticator-removed-email'
    email :webauthn_authenticator_added, 'WebAuthn Authenticator Added', :translatable=>true
    email :webauthn_authenticator_removed, 'WebAuthn Authenticator Removed', :translatable=>true

    private

    def after_webauthn_setup
      super
      send_webauthn_authenticator_added_email
    end

    def after_webauthn_remove
      super
      send_webauthn_authenticator_removed_email
    end
  end
end