Skip to content

Commit b95f185

Browse files
committed
WIP Work with new fido2 api #32
1 parent 527e160 commit b95f185

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

gp-okta.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -656,15 +656,20 @@ def okta_mfa_webauthn(conf, factor, state_token):
656656
client = Fido2Client(dev, origin)
657657
print('!!! Touch the flashing U2F device to authenticate... !!!')
658658
try:
659-
result = client.get_assertion(purl[1], challenge, allow_list)
660-
dbg(conf.debug, 'assertion.result', result)
659+
result = client.get_assertion({
660+
'challenge': challenge.encode('utf-8'),
661+
'rp_id': purl[1],
662+
'allow_credentials': allow_list
663+
})
664+
dbg(conf.debug, 'assertion.result', vars(result))
661665
break
662666
except Exception:
663667
traceback.print_exc(file=sys.stderr)
664668
result = None
665669
if not result:
666670
return None
667-
assertion, client_data = result[0][0], result[1] # only one cred in allowList, so only one response.
671+
assertion = result.get_assertions()[0] # only one cred in allowList, so only one response.
672+
client_data = result._client_data
668673
data = {
669674
'stateToken': state_token,
670675
'clientData': to_n((base64.b64encode(client_data)).decode('ascii')),

0 commit comments

Comments
 (0)