Skip to content

Commit

Permalink
Merge pull request #212 from quexten/fix/client-credentials
Browse files Browse the repository at this point in the history
Attempt to fix credentials not being set in gui
  • Loading branch information
quexten authored May 11, 2024
2 parents e913180 + 9fbf1a0 commit 08f419a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gui/src/gui/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def on_login(self):
server = self.server_row.get_text()
goldwarden.set_url(server)
if client_id != "":
goldwarden.set_client_id(client_id)
print("set client id result", goldwarden.set_client_id(client_id.strip()))
if client_secret != "":
goldwarden.set_client_secret(client_secret)
print("set client secret result", goldwarden.set_client_secret(client_secret.strip()))
goldwarden.login_with_password(email, "")
self.window.close()

Expand Down
4 changes: 2 additions & 2 deletions gui/src/services/goldwarden.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ def get_environment():
return None

def set_client_id(client_id):
send_authenticated_command(f"config set-client-id \"{client_id}\"")
return send_authenticated_command(f"config set-client-id {client_id}")

def set_client_secret(client_secret):
send_authenticated_command(f"config set-client-secret \"{client_secret}\"")
return send_authenticated_command(f"config set-client-secret {client_secret}")

def login_with_password(email, password):
result = send_authenticated_command(f"vault login --email {email}")
Expand Down

0 comments on commit 08f419a

Please sign in to comment.