Skip to content

Commit

Permalink
fix: jans-cli don't decode if access_token_enc is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
devrimyatar committed Nov 23, 2022
1 parent 66da3fa commit c67ab39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jans-cli-tui/cli_tui/cli/config_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ def get_plugin_name_from_title(title):
client_secret_enc = config['DEFAULT'][secret_enc_key_str]
client_secret = unobscure(client_secret_enc)

if 'access_token' in config['DEFAULT']:
if 'access_token' in config['DEFAULT'] and config['DEFAULT']['access_token'].strip():
access_token = config['DEFAULT']['access_token']
elif 'access_token_enc' in config['DEFAULT']:
elif 'access_token_enc' in config['DEFAULT'] and config['DEFAULT']['access_token_enc'].strip():
access_token = unobscure(config['DEFAULT']['access_token_enc'])

debug = config['DEFAULT'].get('debug')
Expand Down

0 comments on commit c67ab39

Please sign in to comment.