Skip to content

Commit

Permalink
use user token to get service list
Browse files Browse the repository at this point in the history
  • Loading branch information
royl88 committed Jan 29, 2021
1 parent d0baf14 commit 022aa8d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wecube_plugins_itsdangerous/apps/processor/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,8 @@ class WecubeService(object):
def list(self, filters=None, orders=None, offset=None, limit=None, hooks=None):
results = []
client = wecube.WeCubeClient(CONF.wecube.base_url)
subsys_token = cache.get_or_create(TOKEN_KEY, client.login_subsystem, expires=600)
client.token = subsys_token
# subsys_token = cache.get_or_create(TOKEN_KEY, client.login_subsystem, expires=600)
# client.token = subsys_token
key = '/platform/v1/plugins/interfaces/enabled'
cached = cache.get(key, 15)
if cache.validate(cached):
Expand All @@ -544,8 +544,8 @@ def list(self, filters=None, orders=None, offset=None, limit=None, hooks=None):
message=_('missing query param: %(attribute)s, eg. /v1/api?%(attribute)s=value') %
{'attribute': 'serviceName'})
client = wecube.WeCubeClient(CONF.wecube.base_url)
subsys_token = cache.get_or_create(TOKEN_KEY, client.login_subsystem, expires=600)
client.token = subsys_token
# subsys_token = cache.get_or_create(TOKEN_KEY, client.login_subsystem, expires=600)
# client.token = subsys_token
key = '/platform/v1/plugins/interfaces/enabled'
cached = cache.get(key, 15)
if cache.validate(cached):
Expand Down

0 comments on commit 022aa8d

Please sign in to comment.