mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-05 23:31:20 +00:00
Log token setup failure properly
This commit is contained in:
parent
3e54733033
commit
acb292460f
@ -15,7 +15,10 @@ log = logging.getLogger(__name__)
|
|||||||
async def setup_token(solvable_connector, token):
|
async def setup_token(solvable_connector, token):
|
||||||
solvable_connector.send('token', token)
|
solvable_connector.send('token', token)
|
||||||
key, data = await solvable_connector.recv()
|
key, data = await solvable_connector.recv()
|
||||||
|
if secrets.compare_digest(token, key):
|
||||||
log.debug('Token setup is done.')
|
log.debug('Token setup is done.')
|
||||||
|
else:
|
||||||
|
log.error('Failed to setup token between controller and solvable.') # TODO: signaling to Avatao platform?
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
kwargs = {
|
kwargs = {
|
||||||
|
Loading…
Reference in New Issue
Block a user