class WebAuthn::Configuration

Constants

DEFAULT_ALGORITHMS

Attributes

acceptable_attestation_types[RW]
algorithms[RW]
attestation_root_certificates_finders[R]
credential_options_timeout[RW]
encoding[RW]
origin[RW]
rp_id[RW]
rp_name[RW]
silent_authentication[RW]
verify_attestation_statement[RW]

Public Class Methods

new() click to toggle source
# File lib/webauthn/configuration.rb, line 32
def initialize
  @algorithms = DEFAULT_ALGORITHMS.dup
  @encoding = WebAuthn::Encoder::STANDARD_ENCODING
  @verify_attestation_statement = true
  @credential_options_timeout = 120000
  @silent_authentication = false
  @acceptable_attestation_types = ['None', 'Self', 'Basic', 'AttCA', 'Basic_or_AttCA', 'AnonCA']
  @attestation_root_certificates_finders = []
end

Public Instance Methods

attestation_root_certificates_finders=(finders) click to toggle source
# File lib/webauthn/configuration.rb, line 48
def attestation_root_certificates_finders=(finders)
  if !finders.respond_to?(:each)
    finders = [finders]
  end

  finders.each do |finder|
    unless finder.respond_to?(:find)
      raise RootCertificateFinderNotSupportedError, "Finder must implement `find` method"
    end
  end

  @attestation_root_certificates_finders = finders
end
encoder() click to toggle source

This is the user-data encoder. Used to decode user input and to encode data provided to the user.

# File lib/webauthn/configuration.rb, line 44
def encoder
  @encoder ||= WebAuthn::Encoder.new(encoding)
end