Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions spock/plugins/core/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(self, authenticated, event):
self.ygg = yggdrasil.YggAuth()

def start_session(self, username, password = ''):
rep = {}
if self.authenticated:
print(
"Attempting login with username:", username,
Expand All @@ -40,8 +41,11 @@ def start_session(self, username, password = ''):
print('Login Unsuccessful, Response:', rep)
self.event.emit('AUTH_ERR')
return rep
self.selected_profile = rep['selectedProfile']
self.username = rep['selectedProfile']['name']
if 'selectedProfile' in rep:
self.selected_profile = rep['selectedProfile']
self.username = rep['selectedProfile']['name']
else:
self.username = username
else:
self.username = username
return rep
Expand Down