class WebAuthn::RelyingParty

def verify_authentication(

def verify_authentication(
  raw_credential,
  challenge,
  user_presence: nil,
  user_verification: nil,
  public_key: nil,
  sign_count: nil
)
  webauthn_credential = WebAuthn::Credential.from_get(raw_credential, relying_party: self)
  stored_credential = yield(webauthn_credential) if block_given?
  if webauthn_credential.verify(
    challenge,
    public_key: public_key || stored_credential.public_key,
    sign_count: sign_count || stored_credential.sign_count,
    user_presence: user_presence,
    user_verification: user_verification
  )
    block_given? ? [webauthn_credential, stored_credential] : webauthn_credential
  end
end