Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
return "<Token %s>" % self._info
def id(self): return self._info['token']['id']
def expires(self): return self._info['token']['expires']
def tenant(self): return self._info['token'].get('tenant', None)
password=None, token=None, return_raw=False): if token: params = {"auth": {"token": {"id": token}}} elif username and password: params = {"auth": {"passwordCredentials": {"username": username, "password": password}}} else: raise ValueError('A username and password or token is required.') if tenant_id: params['auth']['tenantId'] = tenant_id elif tenant_name: params['auth']['tenantName'] = tenant_name reset = 0 if self.api.management_url is None: reset = 1 self.api.management_url = self.api.auth_url token_ref = self._create('/tokens', params, "access", return_raw=return_raw) if reset: self.api.management_url = None return token_ref
return self._get("/tokens/%s/endpoints" % base.getid(token), "token") |