(self, code)
| 195 | return 'http://localhost:{}'.format(port) |
| 196 | |
| 197 | def handleLogin(self, code): |
| 198 | auth_response, data = self.auth(code) |
| 199 | |
| 200 | currentCharacter = self.getSsoCharacter(data['name'], self.server_base.name) |
| 201 | |
| 202 | sub_split = data["sub"].split(":") |
| 203 | |
| 204 | if len(sub_split) != 3: |
| 205 | raise GenericSsoError("JWT sub does not contain the expected data. Contents: %s" % data["sub"]) |
| 206 | |
| 207 | cid = sub_split[-1] |
| 208 | if currentCharacter is None: |
| 209 | currentCharacter = SsoCharacter(cid, data['name'], config.getClientSecret(), self.server_base.name) |
| 210 | |
| 211 | Esi.update_token(currentCharacter, auth_response) |
| 212 | |
| 213 | eos.db.save(currentCharacter) |
| 214 | wx.PostEvent(self.mainFrame, GE.SsoLogin(character=currentCharacter)) |
| 215 | |
| 216 | # get (endpoint, char, data?) |
| 217 |
no test coverage detected