diff options
Diffstat (limited to 'icktool')
-rwxr-xr-x | icktool | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -18,6 +18,7 @@ import configparser import json import logging +import os import sys import cliapp @@ -82,6 +83,7 @@ class Icktool(cliapp.Application): ['secrets'], 'use URL as the controller base URL', metavar='URL', + default=os.path.expanduser('~/.config/icktool/credentials.conf'), ) self.settings.boolean( @@ -162,6 +164,9 @@ class Icktool(cliapp.Application): def _new_auth(self): url = self.settings['auth-url'] + if not url: + api = self._new_api() + url = api.get_auth_url() client_id, client_secret = self._get_client_creds(url) ac = ick2.AuthClient() |