Turn CredentialsProvider into an interface.