httpservices/src/main/java/ucar/httpservices/HTTPSession.java
static public void
    setGlobalCredentials(Credentials creds, AuthScope scope)
            throws HTTPException
    {
        assert (creds != null);
        if(scope == null) scope = AuthScope.ANY;
        CredentialsProvider provider = new BasicCredentialsProvider();
        provider.setCredentials(scope, creds);
        setGlobalCredentialsProvider(provider, scope);
    }
static public void
    setGlobalCredentials(Credentials creds, AuthScope scope)
            throws HTTPException
    {
        assert (creds != null);
        if(scope == null) scope = AuthScope.ANY;
        CredentialsProvider provider = new BasicCredentialsProvider();
        provider.setCredentials(scope, creds);
        setGlobalCredentialsProvider(provider, scope);
    }
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