def METHOD_NAME(self, provider, **values):
    """
    Updates the authentication provider instance of the provided type.
    :param provider: The authentication provider that is being updated.
    :param values: The values that are used to update the authentication provider.
    :return: The updated authentication provider instance.
    """
    set_allowed_attrs(values, self.allowed_fields, provider)
    provider.save()
    return provider