httpservices/src/main/java/ucar/httpservices/HTTPSession.java
public HTTPSession
    setCredentials(Credentials creds, AuthScope scope)
            throws HTTPException
    {
        assert (creds != null);
        if(scope == null) scope = AuthScope.ANY;
        CredentialsProvider provider = new BasicCredentialsProvider();
        provider.setCredentials(scope, creds);
        setCredentialsProvider(provider, scope);
        return this;
    }
public HTTPSession
    setCredentials(Credentials creds, AuthScope scope)
            throws HTTPException
    {
        assert (creds != null);
        if(scope == null) scope = AuthScope.ANY;
        CredentialsProvider provider = new BasicCredentialsProvider();
        provider.setCredentials(scope, creds);
        setCredentialsProvider(provider, scope);
        return this;
    }
It is convenient to be able to directly set the Credentials
(not the provider) when those credentials are fixed.

@param creds
@param scope where to use it (i.e. on what host)
@throws HTTPException