MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / update_token

Method update_token

service/esiAccess.py:132–137  ·  view source on GitHub ↗

helper function to update token data from SSO response

(char, tokenResponse)

Source from the content-addressed store, hash-verified

130
131 @staticmethod
132 def update_token(char, tokenResponse):
133 """ helper function to update token data from SSO response """
134 char.accessToken = tokenResponse['access_token']
135 char.accessTokenExpires = datetime.datetime.fromtimestamp(time.time() + tokenResponse['expires_in'])
136 if 'refresh_token' in tokenResponse:
137 char.refreshToken = config.cipher.encrypt(tokenResponse['refresh_token'].encode())
138
139 def get_login_uri(self, redirect=None):
140 self.state = str(uuid.uuid4())

Callers 2

refreshMethod · 0.95
handleLoginMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected