Module: Warden::WebAuthn::AuthenticationInitiationHelpers
- Defined in:
- lib/warden/webauthn/authentication_initiation_helpers.rb
Overview
Helper methods for generating & storing authentication challenges
Instance Method Summary collapse
- #authentication_challenge_key ⇒ Object
- #generate_authentication_options(relying_party:, options: {}) ⇒ Object
- #store_challenge_in_session(options_for_authentication:) ⇒ Object
Instance Method Details
#authentication_challenge_key ⇒ Object
17 18 19 |
# File 'lib/warden/webauthn/authentication_initiation_helpers.rb', line 17 def authentication_challenge_key "current_webauthn_authentication_challenge" end |
#generate_authentication_options(relying_party:, options: {}) ⇒ Object
7 8 9 10 11 |
# File 'lib/warden/webauthn/authentication_initiation_helpers.rb', line 7 def (relying_party:, options: {}) .(**{ user_verification: "required" }.merge()) end |
#store_challenge_in_session(options_for_authentication:) ⇒ Object
13 14 15 |
# File 'lib/warden/webauthn/authentication_initiation_helpers.rb', line 13 def store_challenge_in_session(options_for_authentication:) session[authentication_challenge_key] = .challenge end |