diff options
-rwxr-xr-x | icktool | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -156,8 +156,8 @@ class Icktool(cliapp.Application): api.set_controller_url(self.settings['controller']) return api - def _new_auth(self): - url = self.settings['auth-url'] + def _new_auth(self, api): + url = api.get_auth_url() client_id, client_secret = self._get_client_creds(url) ac = ick2.AuthClient() @@ -165,10 +165,10 @@ class Icktool(cliapp.Application): ac.set_client_creds(client_id, client_secret) return ac - def _new_token(self): + def _new_token(self, api): if self.settings['token']: return self.settings['token'] - ac = self._new_auth() + ac = self._new_auth(api) scopes = ' '.join(self.settings['scope']) return ac.get_token(scopes) |