'Convenience method for requesting domain scoped token.'

def get_domain_scoped_token(self):

    r = self.admin_request(method='POST', path='/v3/auth/tokens', body={'auth': {'identity': {'methods': ['password'], 'password': {'user': {'name': self.user['name'], 'password': self.user['password'], 'domain': {'id': self.user['domain_id']}}}}, 'scope': {'domain': {'id': self.domain['id']}}}})
    return r.headers.get('X-Subject-Token')
