Class: WebAuthn::Configuration
- Inherits:
-
Object
- Object
- WebAuthn::Configuration
- Defined in:
- lib/webauthn/configuration.rb
Constant Summary collapse
- DEFAULT_ALGORITHMS =
["ES256", if_pss_supported("PS256"), "RS256"].compact.freeze
Instance Attribute Summary collapse
-
#acceptable_attestation_types ⇒ Object
Returns the value of attribute acceptable_attestation_types.
-
#algorithms ⇒ Object
Returns the value of attribute algorithms.
-
#attestation_root_certificates_finders ⇒ Object
Returns the value of attribute attestation_root_certificates_finders.
-
#credential_options_timeout ⇒ Object
Returns the value of attribute credential_options_timeout.
-
#encoding ⇒ Object
Returns the value of attribute encoding.
-
#origin ⇒ Object
Returns the value of attribute origin.
-
#rp_id ⇒ Object
Returns the value of attribute rp_id.
-
#rp_name ⇒ Object
Returns the value of attribute rp_name.
-
#silent_authentication ⇒ Object
Returns the value of attribute silent_authentication.
-
#verify_attestation_statement ⇒ Object
Returns the value of attribute verify_attestation_statement.
Class Method Summary collapse
Instance Method Summary collapse
-
#encoder ⇒ Object
This is the user-data encoder.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
36 37 38 39 40 41 42 43 44 |
# File 'lib/webauthn/configuration.rb', line 36 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'] @attestation_root_certificates_finders = [] end |
Instance Attribute Details
#acceptable_attestation_types ⇒ Object
Returns the value of attribute acceptable_attestation_types.
33 34 35 |
# File 'lib/webauthn/configuration.rb', line 33 def acceptable_attestation_types @acceptable_attestation_types end |
#algorithms ⇒ Object
Returns the value of attribute algorithms.
25 26 27 |
# File 'lib/webauthn/configuration.rb', line 25 def algorithms @algorithms end |
#attestation_root_certificates_finders ⇒ Object
Returns the value of attribute attestation_root_certificates_finders.
34 35 36 |
# File 'lib/webauthn/configuration.rb', line 34 def attestation_root_certificates_finders @attestation_root_certificates_finders end |
#credential_options_timeout ⇒ Object
Returns the value of attribute credential_options_timeout.
31 32 33 |
# File 'lib/webauthn/configuration.rb', line 31 def @credential_options_timeout end |
#encoding ⇒ Object
Returns the value of attribute encoding.
26 27 28 |
# File 'lib/webauthn/configuration.rb', line 26 def encoding @encoding end |
#origin ⇒ Object
Returns the value of attribute origin.
27 28 29 |
# File 'lib/webauthn/configuration.rb', line 27 def origin @origin end |
#rp_id ⇒ Object
Returns the value of attribute rp_id.
28 29 30 |
# File 'lib/webauthn/configuration.rb', line 28 def rp_id @rp_id end |
#rp_name ⇒ Object
Returns the value of attribute rp_name.
29 30 31 |
# File 'lib/webauthn/configuration.rb', line 29 def rp_name @rp_name end |
#silent_authentication ⇒ Object
Returns the value of attribute silent_authentication.
32 33 34 |
# File 'lib/webauthn/configuration.rb', line 32 def silent_authentication @silent_authentication end |
#verify_attestation_statement ⇒ Object
Returns the value of attribute verify_attestation_statement.
30 31 32 |
# File 'lib/webauthn/configuration.rb', line 30 def verify_attestation_statement @verify_attestation_statement end |
Class Method Details
.if_pss_supported(algorithm) ⇒ Object
19 20 21 |
# File 'lib/webauthn/configuration.rb', line 19 def self.if_pss_supported(algorithm) OpenSSL::PKey::RSA.instance_methods.include?(:verify_pss) ? algorithm : nil end |