Fix SAML token recognition
This commit is contained in:
parent
770a9cfb2e
commit
0f019ebc34
4
rpc.py
4
rpc.py
@ -144,7 +144,7 @@ class ClientSync(object):
|
||||
return res
|
||||
def authenticate(self, identity: str, *, context=('XUS SIGNON',)):
|
||||
self._server.update(RecordServerInfo(*self('XUS SIGNON SETUP', '', '1', context=context))._asdict())
|
||||
if identity.startswith('<?xml version="1.0" encoding="UTF-8"?>'):
|
||||
if identity.startswith('<?xml version="1.0"'):
|
||||
res = self('XUS ESSO VALIDATE', RPCType(tuple(identity[i:i+200] for i in range(0, len(identity), 200)), RPCType.GLOBAL))
|
||||
else:
|
||||
res = self('XUS AV CODE', XWBHash_encrypt(identity))
|
||||
@ -225,7 +225,7 @@ class ClientAsync(object):
|
||||
return res
|
||||
async def authenticate(self, identity: str, *, context=('XUS SIGNON',)):
|
||||
self._server.update(RecordServerInfo(*await self('XUS SIGNON SETUP', '', '1', context=context))._asdict())
|
||||
if identity.startswith('<?xml version="1.0" encoding="UTF-8"?>'):
|
||||
if identity.startswith('<?xml version="1.0"'):
|
||||
res = await self('XUS ESSO VALIDATE', RPCType(tuple(identity[i:i+200] for i in range(0, len(identity), 200)), RPCType.GLOBAL))
|
||||
else:
|
||||
res = await self('XUS AV CODE', XWBHash_encrypt(identity))
|
||||
|
Loading…
Reference in New Issue
Block a user