1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
U
[±dÐ$ã@s8ddlmZddlmZmZddlmZddlZddlZGdd„de    ƒZ
Gdd    „d    ej ƒZ Gd
d „d ej ƒZ eGd d „d ƒƒZeGdd„dƒƒZddœdd„Zddœdd„Zd ddœdd„Zdddœdd„Zddddœdd„Zdd d!d"œd#d$„Zdd%dœd&d'„Zdd dd"œd(d)„Zdddœd*d+„Zdd,dd-œd.d/„ZdS)0é)Ú annotationsé)Ú event_classÚ T_JSON_DICT)Ú    dataclassNcs>eZdZddœdd„Zedddœdd„ƒZ‡fdd    „Z‡ZS)
ÚAuthenticatorIdÚstr©ÚreturncCs|S©N©©Úselfr r úgd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\selenium/webdriver/common/devtools/v85/web_authn.pyÚto_jsonszAuthenticatorId.to_json)Újsonr
cCs||ƒSr r ©Úclsrr r rÚ    from_jsonszAuthenticatorId.from_jsoncsd tƒ ¡¡S)NzAuthenticatorId({}))ÚformatÚsuperÚ__repr__r ©Ú    __class__r rrszAuthenticatorId.__repr__)Ú__name__Ú
__module__Ú __qualname__rÚ classmethodrrÚ __classcell__r r rrr src@s(eZdZdZdZdd„Zedd„ƒZdS)ÚAuthenticatorProtocolZu2fZctap2cCs|jSr ©Úvaluer r r rrszAuthenticatorProtocol.to_jsoncCs||ƒSr r rr r rr szAuthenticatorProtocol.from_jsonN)rrrZU2FZCTAP2rrrr r r rrs
rc@s4eZdZdZdZdZdZdZdd„Ze    dd    „ƒZ
d
S) ÚAuthenticatorTransportZusbZnfcZbleZcableZinternalcCs|jSr r r r r rr,szAuthenticatorTransport.to_jsoncCs||ƒSr r rr r rr/sz AuthenticatorTransport.from_jsonN) rrrZUSBÚNFCZBLEZCABLEZINTERNALrrrr r r rr"%sr"c@sbeZdZUded<ded<dZded<dZded<dZded    <dZded
<d d „Ze    d d„ƒZ
dS)ÚVirtualAuthenticatorOptionsrÚprotocolr"Ú    transportNztyping.Optional[bool]Úhas_resident_keyÚhas_user_verificationÚautomatic_presence_simulationÚis_user_verifiedcCsvtƒ}|j ¡|d<|j ¡|d<|jdk    r6|j|d<|jdk    rJ|j|d<|jdk    r^|j|d<|jdk    rr|j|d<|S)Nr%r&ÚhasResidentKeyÚhasUserVerificationÚautomaticPresenceSimulationÚisUserVerified)Údictr%rr&r'r(r)r*©rrr r rrHs
 
 
 
 
 
 
 
z#VirtualAuthenticatorOptions.to_jsonc    Csx|t |d¡t |d¡d|kr.t|dƒndd|krDt|dƒndd|krZt|dƒndd|krpt|dƒnddS)Nr%r&r+r,r-r.)r%r&r'r(r)r*)rrr"Úboolrr r rrVs  úz%VirtualAuthenticatorOptions.from_json) rrrÚ__annotations__r'r(r)r*rrrr r r rr$4s
    r$c@sZeZdZUded<ded<ded<ded<dZd    ed
<dZd    ed <d d „Zedd„ƒZdS)Ú
CredentialrÚ credential_idr1Úis_resident_credentialÚ private_keyÚintÚ
sign_countNztyping.Optional[str]Úrp_idÚ user_handlecCsZtƒ}|j|d<|j|d<|j|d<|j|d<|jdk    rB|j|d<|jdk    rV|j|d<|S)NÚ credentialIdÚisResidentCredentialÚ
privateKeyÚ    signCountÚrpIdÚ
userHandle)r/r4r5r6r8r9r:r0r r rrxs
 
 
 
 
 
 
 
zCredential.to_jsonc    Cs\|t|dƒt|dƒt|dƒt|dƒd|kr>t|dƒndd|krTt|dƒnddS)Nr;r<r=r>r?r@)r4r5r6r8r9r:)rr1r7rr r rr„s
 
 
 
úzCredential.from_json)    rrrr2r9r:rrrr r r rr3bs
   r3z0typing.Generator[T_JSON_DICT, T_JSON_DICT, None]r    ccsddi}|V}dS)z~
    Enable the WebAuthn domain and start intercepting credential storage and
    retrieval with a virtual authenticator.
    ÚmethodzWebAuthn.enableNr ©Úcmd_dictrr r rÚenablesÿrDccsddi}|V}dS)z&
    Disable the WebAuthn domain.
    rAzWebAuthn.disableNr rBr r rÚdisable›sÿrEz;typing.Generator[T_JSON_DICT, T_JSON_DICT, AuthenticatorId])Úoptionsr
ccs0tƒ}| ¡|d<d|dœ}|V}t |d¡S)zW
    Creates and adds a virtual authenticator.
 
    :param options:
    :returns: 
    rFz WebAuthn.addVirtualAuthenticator©rAÚparamsÚauthenticatorId)r/rrr)rFrHrCrr r rÚadd_virtual_authenticator¥s     þrJ)Úauthenticator_idr
ccs&tƒ}| ¡|d<d|dœ}|V}dS)zH
    Removes the given authenticator.
 
    :param authenticator_id:
    rIz#WebAuthn.removeVirtualAuthenticatorrGN©r/r©rKrHrCrr r rÚremove_virtual_authenticator¸s  þrN)rKÚ
credentialr
ccs2tƒ}| ¡|d<| ¡|d<d|dœ}|V}dS)zr
    Adds the credential to the specified authenticator.
 
    :param authenticator_id:
    :param credential:
    rIrOzWebAuthn.addCredentialrGNrL)rKrOrHrCrr r rÚadd_credentialÉs
  þrPrz6typing.Generator[T_JSON_DICT, T_JSON_DICT, Credential])rKr4r
ccs8tƒ}| ¡|d<||d<d|dœ}|V}t |d¡S)zº
    Returns a single credential stored in the given virtual authenticator that
    matches the credential ID.
 
    :param authenticator_id:
    :param credential_id:
    :returns: 
    rIr;zWebAuthn.getCredentialrGrO)r/rr3r©rKr4rHrCrr r rÚget_credentialÝs  þrRzCtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[Credential]]ccs4tƒ}| ¡|d<d|dœ}|V}dd„|dDƒS)z}
    Returns all the credentials stored in the given virtual authenticator.
 
    :param authenticator_id:
    :returns: 
    rIzWebAuthn.getCredentialsrGcSsg|]}t |¡‘qSr )r3r)Ú.0Úir r rÚ
<listcomp>sz#get_credentials.<locals>.<listcomp>Ú credentialsrLrMr r rÚget_credentialsôs     þrWccs.tƒ}| ¡|d<||d<d|dœ}|V}dS)zn
    Removes a credential from the authenticator.
 
    :param authenticator_id:
    :param credential_id:
    rIr;zWebAuthn.removeCredentialrGNrLrQr r rÚremove_credentials
 þrXccs&tƒ}| ¡|d<d|dœ}|V}dS)z]
    Clears all the credentials from the specified device.
 
    :param authenticator_id:
    rIzWebAuthn.clearCredentialsrGNrLrMr r rÚclear_credentialss  þrYr1)rKr*r
ccs.tƒ}| ¡|d<||d<d|dœ}|V}dS)z¤
    Sets whether User Verification succeeds or fails for an authenticator.
    The default is true.
 
    :param authenticator_id:
    :param is_user_verified:
    rIr.zWebAuthn.setUserVerifiedrGNrL)rKr*rHrCrr r rÚset_user_verified,s  þrZ)Ú
__future__rÚutilrrZ dataclassesrÚenumÚtypingrrÚEnumrr"r$r3rDrErJrNrPrRrWrXrYrZr r r rÚ<module>s*    --