Send pyfa version to server when logging in
This commit is contained in:
@@ -198,7 +198,7 @@ class Esi(object):
|
||||
|
||||
esisecurity = EsiSecurityProxy(sso_url=config.ESI_AUTH_PROXY)
|
||||
|
||||
uri = esisecurity.get_auth_uri(state=self.state, redirect='http://localhost:{}'.format(port))
|
||||
uri = esisecurity.get_auth_uri(state=self.state, redirect='http://localhost:{}'.format(port), pyfa_version=config.version)
|
||||
|
||||
self.serverThread = threading.Thread(target=self.httpd.serve, args=(self.handleLogin,))
|
||||
self.serverThread.name = "SsoCallbackServer"
|
||||
|
||||
@@ -12,6 +12,7 @@ import time
|
||||
from requests import Session
|
||||
from requests.utils import quote
|
||||
from six.moves.urllib.parse import urlparse
|
||||
from urllib.parse import urlencode
|
||||
|
||||
from esipy.events import AFTER_TOKEN_REFRESH
|
||||
from esipy.exceptions import APIException
|
||||
@@ -115,7 +116,7 @@ class EsiSecurityProxy(object):
|
||||
|
||||
return request_params
|
||||
|
||||
def get_auth_uri(self, state=None, redirect='http://localhost:8080'):
|
||||
def get_auth_uri(self, *args, **kwargs):
|
||||
""" Constructs the full auth uri and returns it.
|
||||
|
||||
:param state: The state to pass through the auth process
|
||||
@@ -123,10 +124,9 @@ class EsiSecurityProxy(object):
|
||||
:return: the authorizationUrl with the correct parameters.
|
||||
"""
|
||||
|
||||
return '%s?redirect=%s%s' % (
|
||||
return '%s?%s' % (
|
||||
self.oauth_authorize,
|
||||
quote(redirect, safe=''),
|
||||
'&state=%s' % state if state else ''
|
||||
urlencode(kwargs)
|
||||
)
|
||||
|
||||
def get_refresh_token_params(self):
|
||||
|
||||
Reference in New Issue
Block a user