Properly handle the "manual" mode of copy and paste auth information

This commit is contained in:
blitzmann
2021-10-18 14:06:36 -04:00
parent 17391f119c
commit f3f7d688ab
3 changed files with 8 additions and 10 deletions

View File

@@ -108,7 +108,8 @@ class Esi(EsiAccess):
else:
with gui.ssoLogin.SsoLogin() as dlg:
if dlg.ShowModal() == wx.ID_OK:
self.handleLogin({'SSOInfo': [dlg.ssoInfoCtrl.Value.strip()]})
message = json.loads(base64.b64decode(dlg.ssoInfoCtrl.Value.strip()))
self.handleLogin(message)
def stopServer(self):
pyfalog.debug("Stopping Server")
@@ -134,7 +135,7 @@ class Esi(EsiAccess):
return 'http://localhost:{}'.format(port)
def handleLogin(self, message):
auth_response, data = self.auth(message['code'][0])
auth_response, data = self.auth(message['code'])
currentCharacter = self.getSsoCharacter(data['name'])
@@ -157,7 +158,7 @@ class Esi(EsiAccess):
raise SSOError("Could not parse out querystring parameters.")
try:
state_enc = message['state'][0]
state_enc = message['state']
state = json.loads(base64.b64decode(state_enc))['state']
except Exception:
raise SSOError("There was a problem decoding state parameter.")