class WebAuthn::PublicKeyCredentialWithAssertion

def self.response_class

def self.response_class
  WebAuthn::AuthenticatorAssertionResponse
end

def appid

def appid
  URI.parse(relying_party.legacy_u2f_appid || raise("Unspecified legacy U2F AppID")).to_s
end

def appid_extension_output

def appid_extension_output
  return if client_extension_outputs.nil?
  client_extension_outputs['appid']
end

def raw_user_handle

def raw_user_handle
  response.user_handle
end

def user_handle

def user_handle
  if raw_user_handle
    encoder.encode(raw_user_handle)
  end
end

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

def verify(challenge, public_key:, sign_count:, user_presence: nil, user_verification: nil)
  super
  response.verify(
    encoder.decode(challenge),
    public_key: encoder.decode(public_key),
    sign_count: sign_count,
    user_presence: user_presence,
    user_verification: user_verification,
    rp_id: appid_extension_output ? appid : nil
  )
  true
end