Check if the basic authentication is valid.