'Returns (token id, token data) for supplied credentials'

def get_token(self, **kwargs):

    auth_data = kwargs.pop('auth_data', False)
    if (not (kwargs.get('user_domain_id') or kwargs.get('user_domain_name'))):
        kwargs['user_domain_name'] = 'Default'
    if (not (kwargs.get('project_domain_id') or kwargs.get('project_domain_name'))):
        kwargs['project_domain_name'] = 'Default'
    body = self.auth(**kwargs)
    token = body.response.get('x-subject-token')
    if auth_data:
        return (token, body['token'])
    else:
        return token
