module WebAuthn
Constants
- TYPES
- TYPE_PUBLIC_KEY
- VERSION
Public Class Methods
configuration()
click to toggle source
# File lib/webauthn/configuration.rb, line 8 def self.configuration @configuration ||= Configuration.new end
configure() { |configuration| ... }
click to toggle source
# File lib/webauthn/configuration.rb, line 12 def self.configure yield(configuration) end
credential_creation_options(rp_name: nil, user_name: "web-user", display_name: "web-user", user_id: "1")
click to toggle source
# File lib/webauthn/credential_creation_options.rb, line 9 def self.credential_creation_options(rp_name: nil, user_name: "web-user", display_name: "web-user", user_id: "1") warn( "DEPRECATION WARNING: `WebAuthn.credential_creation_options` is deprecated."\ " Please use `WebAuthn::Credential.options_for_create` instead." ) CredentialCreationOptions.new( rp_name: rp_name, user_id: user_id, user_name: user_name, user_display_name: display_name ).to_h end
credential_request_options()
click to toggle source
# File lib/webauthn/credential_request_options.rb, line 6 def self.credential_request_options warn( "DEPRECATION WARNING: `WebAuthn.credential_request_options` is deprecated."\ " Please use `WebAuthn::Credential.options_for_get` instead." ) CredentialRequestOptions.new.to_h end
generate_user_id()
click to toggle source
# File lib/webauthn.rb, line 12 def self.generate_user_id configuration.encoder.encode(SecureRandom.random_bytes(64)) end
standard_encoder()
click to toggle source
# File lib/webauthn/encoder.rb, line 6 def self.standard_encoder @standard_encoder ||= Encoder.new end