class WebAuthn::Context::Registration

Attributes

attestation_object[RW]

Public Instance Methods

registration?() click to toggle source
# File lib/web_authn/context/registration.rb, line 12
def registration?
  true
end
verify!(encoded_attestation_object) click to toggle source
# File lib/web_authn/context/registration.rb, line 16
def verify!(encoded_attestation_object)
  self.attestation_object = AttestationObject.decode(
    encoded_attestation_object
  )
  verify_flags!
  verify_signature!
  self
end

Private Instance Methods

verify_flags!() click to toggle source
Calls superclass method WebAuthn::Context#verify_flags!
# File lib/web_authn/context/registration.rb, line 27
def verify_flags!
  super
  raise InvalidAssertion, 'Missing Flag: "at"' unless flags.at?
end
verify_signature!() click to toggle source
# File lib/web_authn/context/registration.rb, line 32
def verify_signature!
  attestation_object.verify_signature! client_data_json
end