def METHOD_NAME(assertion, *, challenge, user, origin, rp_id):
    """
    Validates the challenge and assertion information
    sent from the client during authentication.
    Returns an updated signage count on success.
    Raises AuthenticationRejectedError on failure.
    """
    # NOTE: We re-encode the challenge below, because our
    # response's clientData.challenge is encoded twice:
    # first for the entire clientData payload, and then again
    # for the individual challenge.
    encoded_challenge = _webauthn_b64encode(challenge)
    webauthn_user_public_keys = _get_webauthn_user_public_keys(user, rp_id=rp_id)
    for public_key, current_sign_count in webauthn_user_public_keys:
        try:
            _credential = AuthenticationCredential.parse_raw(assertion)
            return pywebauthn.verify_authentication_response(
                credential=_credential,
                expected_challenge=encoded_challenge,
                expected_rp_id=rp_id,
                expected_origin=origin,
                credential_public_key=public_key,
                credential_current_sign_count=current_sign_count,
                require_user_verification=False,
            )
        except InvalidAuthenticationResponse:
            pass
    # If we exit the loop, then we've failed to verify the assertion against
    # any of the user's WebAuthn credentials. Fail.
    raise AuthenticationRejectedError("Invalid WebAuthn credential")