Class: WebAuthn::PublicKeyCredentialWithAttestation
Instance Attribute Summary
#authenticator_attachment, #client_extension_outputs, #id, #raw_id, #response, #type
Class Method Summary
collapse
Instance Method Summary
collapse
#authenticator_extension_outputs, #backed_up?, #backup_eligible?, from_client, #initialize, #sign_count
Instance Method Details
#public_key ⇒ Object
20
21
22
23
24
|
# File 'lib/webauthn/public_key_credential_with_attestation.rb', line 20
def public_key
if raw_public_key
encoder.encode(raw_public_key)
end
end
|
#raw_public_key ⇒ Object
26
27
28
|
# File 'lib/webauthn/public_key_credential_with_attestation.rb', line 26
def raw_public_key
response&.authenticator_data&.credential&.public_key
end
|
#verify(challenge, user_presence: nil, user_verification: nil) ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/webauthn/public_key_credential_with_attestation.rb', line 12
def verify(challenge, user_presence: nil, user_verification: nil)
super
response.verify(encoder.decode(challenge), user_presence: user_presence, user_verification: user_verification)
true
end
|