Module: WebAuthn::Credential

Defined in:
lib/webauthn/credential.rb

Class Method Summary collapse

Class Method Details

.from_create(credential) ⇒ Object


18
19
20
# File 'lib/webauthn/credential.rb', line 18

def self.from_create(credential)
  WebAuthn::PublicKeyCredentialWithAttestation.from_client(credential)
end

.from_get(credential) ⇒ Object


22
23
24
# File 'lib/webauthn/credential.rb', line 22

def self.from_get(credential)
  WebAuthn::PublicKeyCredentialWithAssertion.from_client(credential)
end

.options_for_create(**keyword_arguments) ⇒ Object


10
11
12
# File 'lib/webauthn/credential.rb', line 10

def self.options_for_create(**keyword_arguments)
  WebAuthn::PublicKeyCredential::CreationOptions.new(**keyword_arguments)
end

.options_for_get(**keyword_arguments) ⇒ Object


14
15
16
# File 'lib/webauthn/credential.rb', line 14

def self.options_for_get(**keyword_arguments)
  WebAuthn::PublicKeyCredential::RequestOptions.new(**keyword_arguments)
end