Improved SSO workflow: use WS-Trust STS endpoint directly instead of relying on XUIAMSSOi.dll

This commit is contained in:
2024-12-09 22:48:05 -05:00
parent 86c18927e8
commit 053053825c
4 changed files with 205 additions and 21 deletions

View File

@@ -112,8 +112,8 @@ def application():
client._cache_persistent(persistent=util.Store(f'cache.{client._server["volume"].lower()}.{client._server["uci"].lower()}.{user[0]}.db', journal_mode='WAL').memo)
return jsonify_result(user, id=request.json.get('id'))
else:
from auth import XUIAMSSOi_MySsoTokenVBA
if token := XUIAMSSOi_MySsoTokenVBA():
import XWBSSOi
if token := XWBSSOi.get_sso_token(application='CPRSChart.exe'):
user = client.authenticate(token)
client._cache_persistent(persistent=util.Store(f'cache.{client._server["volume"].lower()}.{client._server["uci"].lower()}.{user[0]}.db', journal_mode='WAL').memo)
return jsonify_result(user, id=request.json.get('id'))