'Auth provider __init__
:param credentials: credentials for authentication
:param scope: the default scope to be used by the credential providers
when requesting a token. Valid values depend on the
AuthProvider class implementation, and are defined in
the set SCOPES. Default value is \'project\'.'

def __init__(self, credentials, scope='project'):

    if self.check_credentials(credentials):
        self.credentials = credentials
    elif isinstance(credentials, Credentials):
        password = credentials.get('password')
        message = ('Credentials    are:    ' + str(credentials))
        if (password is None):
            message += '    Password    is    not    defined.'
        else:
            message += '    Password    is    defined.'
        raise exceptions.InvalidCredentials(message)
    else:
        raise TypeError(('credentials    object    is    of    type    %s,    which    is    not    a    valid    Credentials    object    type.' % credentials.__class__.__name__))
    self._scope = None
    self.scope = scope
    self.cache = None
    self.alt_auth_data = None
    self.alt_part = None
