class WebAuthn::PublicKeyCredentialWithAttestation

def self.response_class

def self.response_class
  WebAuthn::AuthenticatorAttestationResponse
end

def public_key

def public_key
  if raw_public_key
    encoder.encode(raw_public_key)
  end
end

def raw_public_key

def raw_public_key
  response&.authenticator_data&.credential&.public_key
end

def verify(challenge, user_presence: nil, user_verification: nil)

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