+
     hZ  c                  s.   ^ RI Ht ^ RIt^ RIHt ^ RIHtHt ^ RIH	t	H
t
 ^RIHtHtHt ^RIHtHtHtHtHt ^RIHtHtHt ^R	IHt ^R
IHtHt  ! R R]P<                  4      t ! R R]4      t  ! R R]4      t! ! R R]P<                  4      t"]! RRR7       ! R R]4      4       t#]! RRR7       ! R R]4      4       t$R t%]! RRR7       ! R R]4      4       t&]! RRR7       ! R R]4      4       t']! RRR7       ! R R ]4      4       t(R! t)R" t* ! R# R$]"4      t+]! RRR7       ! R% R&]4      4       t,]! RRR7       ! R' R(]4      4       t- ! R) R*]"4      t. ! R+ R,]"4      t/ ! R- R.]"4      t0 ! R/ R0]"4      t1]! RRR7       ! R1 R2]4      4       t2 ! R3 R4]"4      t3]! RRR7       ! R5 R6]4      4       t4]! RRR7       ! R7 R8]4      4       t5]! RRR7       ! R9 R:]4      4       t6 ! R; R<]"4      t7]+! 4       ].! 4       ]/! 4       ]0! 4       ]1! 4       ]3! 4       .t8R# )=i    )annotationsN)	dataclass)Enumunique)AnyMapping)_JsonDataObjectsha256websafe_encode)AuthenticatorSelectionCriteria"PublicKeyCredentialCreationOptionsPublicKeyCredentialDescriptor!PublicKeyCredentialRequestOptionsResidentKeyRequirement)AssertionResponseAttestationResponseCtap2)
LargeBlobs)	ClientPinPinProtocolc                  sP    ] tR t^0tRt]P                  ! ^ 4      RR3R R lltRtR# )ExtensionProcessorzBase class for CTAP2 extension processing.

See: :class:`RegistrationExtensionProcessor` and
:class:`AuthenticationExtensionProcessor`.
Nc               s$    V ^8  d   QhRRRRRR/# )   permissionszClientPin.PERMISSIONinputsdict[str, Any] | Noneoutputs Zformat   ";/usr/lib/python3.14/site-packages/fido2/ctap2/extensions.py__annotate__ZExtensionProcessor.__annotate__7   s(        )  &  '	     c                	s*    Wn         W n        W0n        R # N)r   _inputs_outputs)selfr   r   r      &&&&r   __init__ZExtensionProcessor.__init__7   s     'r   )r!   r"   r   )	__name__
__module____qualname____firstlineno____doc__r   
PERMISSIONr%   __static_attributes__r   r   r   r   r   0   s'     -6,@,@,C(,)-	   r   r   c                  s2    ] tR t^BtRtR R ltR R ltRtR# )RegistrationExtensionProcessora  Processing state for a CTAP2 extension, for single use.

The ExtensionProcessor holds state and logic for client processing of an extension,
for a registration (MakeCredential) call.

:param permissions: PinUvAuthToken permissions required by the extension.
:param inputs: Default authenticator inputs, if prepare_inputs is not overridden.
:param outputs: Default client outputs, if prepare_outputs is not overridden.
c                    V ^8  d   QhRRRR/# )r   	pin_tokenbytes | Nonereturnr   r   r   r   r   r   +RegistrationExtensionProcessor.__annotate__M   s       9N r   c                    V P                   # zLPrepare authenticator extension inputs, to be passed to the Authenenticator.r!   r#   r/      &&r   prepare_inputsZ-RegistrationExtensionProcessor.prepare_inputsM   s    ||r   c               $    V ^8  d   QhRRRRRR/# )r   responser   r/   r0   r1   r   r   r   r   r   r   r2   Q   s(      %   
	r   c                r3   z?Prepare client extension outputs, to be returned to the caller.r"   r#   r:   r/      &&&r   prepare_outputsZ.RegistrationExtensionProcessor.prepare_outputsQ        }}r   r   Nr&   r'   r(   r)   r*   r8   r?   r,   r   r   r   r-   r-   B   s     r   r-   c                  s2    ] tR t^ZtRtR R ltR R ltRtR# ) AuthenticationExtensionProcessora  Processing state for a CTAP2 extension, for single use.

The ExtensionProcessor holds state and logic for client processing of an extension,
for an authentication (GetAssertion) call.

:param permissions: PinUvAuthToken permissions required by the extension.
:param inputs: Default authenticator inputs, if prepare_inputs is not overridden.
:param outputs: Default client outputs, if prepare_outputs is not overridden.
c               r9   )r   selectedz$PublicKeyCredentialDescriptor | Noner/   r0   r1   r   r   r   r   r   r   -AuthenticationExtensionProcessor.__annotate__e   s(      6   
	r   c                r3   r4   r5   )r#   rC   r/   r>   r   r8   Z/AuthenticationExtensionProcessor.prepare_inputse   s     ||r   c               r9   )r   r:   r   r/   r0   r1   r   r   r   r   r   r   rD   m   s(      #   
	r   c                r3   r;   r<   r=   r>   r   r?   Z0AuthenticationExtensionProcessor.prepare_outputsm   r@   r   r   NrA   r   r   r   rB   rB   Z   s     r   rB   c                  s\    ] tR t^vtRt]P                  R R l4       tR R ltR R lt	Rt
R	# )
Ctap2Extensiona  Base class for CTAP2 extensions.

As of python-fido2 1.2 these instances can be used for multiple requests and
should be invoked via the make_credential and get_assertion methods.
Subclasses are instantiated for a single request, if the Authenticator supports
the extension.
c               r.   )r   ctapr   r1   boolr   r   r   r   r   Ctap2Extension.__annotate__   s     N N N4 Nr   c                    R# )z?Whether or not the extension is supported by the authenticator.Nr   r#   rF   r7   r   is_supportedZCtap2Extension.is_supported   s    r   c               (    V ^8  d   QhRRRRRRRR/# )	r   rF   r   optionsr
   pin_protocolPinProtocol | Noner1   z%RegistrationExtensionProcessor | Noner   r   r   r   r   rH      s2       4 )	
 
/r   c                rI   )z3Start client extension processing for registration.Nr   r#   rF   rM   rN   r$   r   make_credentialZCtap2Extension.make_credential        r   c               rL   )	r   rF   r   rM   r   rN   rO   r1   z'AuthenticationExtensionProcessor | Noner   r   r   r   r   rH      s2       3 )	
 
1r   c                rI   )z5Start client extension processing for authentication.Nr   rP   r$   r   get_assertionZCtap2Extension.get_assertion   rR   r   r   N)r&   r'   r(   r)   r*   abcZabstractmethodrK   rQ   rS   r,   r   r   r   rE   rE   v   s2     	N N r   rE   FT)ZeqZfrozenc                  s4    ] tR t^t$ RtR]R&   RtR]R&   RtR# )HMACGetSecretInputzClient inputs for hmac-secret.bytessalt1Nr0   salt2r   )r&   r'   r(   r)   r*   __annotations__rX   r,   r   r   r   rU   rU      s    (LE<r   rU   c                  s4    ] tR t^t$ RtR]R&   RtR]R&   RtR# )HMACGetSecretOutputzClient outputs for hmac-secret.rV   output1Nr0   output2r   )r&   r'   r(   r)   r*   rY   r\   r,   r   r   r   rZ   rZ      s    )N G\ r   rZ   c                s&    \        R V ,           4      # )s   WebAuthn PRF )r   )Zsecrets   &r   	_prf_saltr]      s    #f,--r   c                  s4    ] tR t^t$ RtR]R&   RtR]R&   RtR# ) AuthenticatorExtensionsPRFValueszSalt values for use with prf.rV   firstNr0   secondr   )r&   r'   r(   r)   r*   rY   r`   r,   r   r   r   r^   r^      s    'LFLr   r^   c                  s8    ] tR t^t$ RtRtR]R&   RtR]R&   RtR# ) AuthenticatorExtensionsPRFInputszClient inputs for prf.N'AuthenticatorExtensionsPRFValues | Noneevalz5Mapping[str, AuthenticatorExtensionsPRFValues] | Noneeval_by_credentialr   )	r&   r'   r(   r)   r*   rc   rY   rd   r,   r   r   r   ra   ra      s     48D
18PTMTr   ra   c                  s8    ] tR t^t$ RtRtR]R&   RtR]R&   RtR# )!AuthenticatorExtensionsPRFOutputszClient outputs for prf.Nbool | Noneenabledrb   resultsr   )	r&   r'   r(   r)   r*   rg   rY   rh   r,   r   r   r   re   re      s    !G[7;G4;r   re   c                s   V'       d   VP                   pVP                  pV'       d   V '       g   \        R 4      hV  Uu0 uF  p\        VP                  4      kK  	  ppVP                  V4      '       g   \        R4      hV'       d$   \        VP                  4      pW9   d	   WX,          pV'       g   R# \        VP                  4      VP                  e   \        VP                  4      MR3p	M-V'       d$   VP                  VP                  ;'       g    R3p	MR# \        V	^ ,          4      \        P                  8X  d5   V	^,          '       d1   \        V	^,          4      \        P                  8X  g   \        R4      hV	# u upi )z+evalByCredentials requires allowCredentialsz&evalByCredentials contains invalid keyNr   zInvalid salt length)rc   rd   
ValueErrorr   ZidZ
issupersetr]   r_   r`   rW   rX   lenHmacSecretExtensionSALT_LEN)
Z
allow_listrC   prfhmacZsecretsZby_credsZcZidsZkeysaltss
   &&&&      r   _hmac_prepare_saltsrp      s"   
(()) !NOO1;<A>!$$'C<>>(++ !IJJ$X[[1?&mG gmm$*1..*DYw~~&#
 


DJJ--#- 	E!H,555qSq].A.J.JJ.//L5 =s    Fc                s:   V'       d   VR \         P                   MR pV'       d   V\         P                  R  MR pV'       d/   \        T V'       d   \        W44      MR R7      pV'       d   RV/# R # / pV e   WR&   V'       d   \	        W44      VR&   T;'       g    R # )N)rg   rh   rm   hmacCreateSecrethmacGetSecret)rk   rl   re   r^   rZ   )rg   	decryptedrm   r[   r\   Zresultr   s   &&&    r   _hmac_format_outputsrt      s    ;Di6-667$G;Di+4467$G
2FM0BSW
 #)v2d2*1&'':7'LGO$$r   c                  sB    ] tR t^tRtRtRt^ tR
R ltR t	R t
R tRtR	# )rk   a  
Implements the Pseudo-random function (prf) and the hmac-secret CTAP2 extensions.

The hmac-secret extension is not directly available to clients by default, instead
the prf extension is used.

https://www.w3.org/TR/webauthn-3/#prf-extension

https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-hmac-secret-extension

:param allow_hmac_secret: Set to True to allow hmac-secret, in addition to prf.
zhmac-secretzhmac-secret-mcc                	s    Wn         R # r    _allow_hmac_secret)r#   Zallow_hmac_secretr7   r   r%   ZHmacSecretExtension.__init__  s    "3r   c                	H    V P                   VP                  P                  9   # r    NAMEinfo
extensionsrJ   r7   r   rK   Z HmacSecretExtension.is_supported      yyDII0000r   c                	s  aaaa VP                   ;'       g    / pVP                  R 4      RJoV P                  ;'       d    VP                  R4      RJ pS'       Edn   V P                  V4      '       EdT   S'       g
   V'       EdA   \        P
                  R/oV P                  VP                  P                   9   d   \        P                  VP                  R 4      4      p\        V4      ;'       d%    \        P                  VP                  R4      4      p\        RRWg4      pV'       d~   \        VS4      p	V	P                  4       w  p
oSP                  SV^ ,          V^,          ,           4      pSP!                  SV4      p^V
^V^V^SP"                  /S\        P                  &    ! VVVV3R lR\$        4      pV! 4       # R# R# R# )rm   Nrq   Trr   c                  s4   < ] tR tRtV 3R ltVVV3R ltRtR# )6HmacSecretExtension.make_credential.<locals>.Processori/  c                	s   < S# r    r   )r#   r/   r   s   &&r   r8   ZEHmacSecretExtension.make_credential.<locals>.Processor.prepare_inputs0  s    !Mr   c                	s  < VP                   P                  ;'       g    / pVP                  \        P                  R 4      pVP                  \        P
                  4      pV'       d   SP                  S	V4      MRp\        WFS4      # )FN)	auth_datar{   getrk   ry   MC_NAMEdecryptrt   )
r#   r:   r/   r{   rg   valuers   rN   rm   shared_secrets
   &&&    r   r?   ZFHmacSecretExtension.make_credential.<locals>.Processor.prepare_outputs3  sq    !)!3!3!>!>!D!D"J(nn-@-E-EuMG&NN+>+F+FGEFK,,]EBQU  0CHHr   r   Nr&   r'   r(   r)   r8   r?   r,   )r   rN   rm   r   s   r   	Processorr}   /  s    "I Ir   r   )r{   r   rv   rK   rk   ry   r   rz   ra   	from_dictrG   rU   rp   r   _get_shared_secretencryptauthenticateVERSIONr-   )r#   rF   rM   rN   Zc_inputsrn   Z	prf_saltsZ
hmac_saltsro   
client_pinkey_agreementsalt_enc	salt_authr   r   rm   r   s   &&&f          @@@r   rQ   Z#HmacSecretExtension.make_credential  s   %%++ll5!-&&SS8<<8J+Kt+S<D--d33&9&>&>%EF||tyy333<FFLL'	 "$Z  ,>,H,HLL1-
 ,D$	N!*4!>J3=3P3P3R0M=+33M58eTUhCVWH , 9 9- RI=89<//	;F.667I I: I ;G AE3<r   c                	s  aaaaa	a
 SP                   ;'       g    / p\        P                  VP                  R 4      4      o	V P                  '       d%   \
        P                  VP                  R4      4      MRoS'       di   V P                  V4      '       dP   S	'       g	   S'       d>   \        VS4      pVP                  4       w  oo
 ! VVVVV	V
3R lR\        4      pV! 4       # R# R# R# )rm   rr   Nc                  s>   < ] tR tRtV VVVVV3R ltVVV3R ltRtR# )5HmacSecretExtension.get_assertion.<locals>.ProcessingiK  c           	     	s  < \        SP                  VS
S4      pV'       g   R # S	P                  SV^ ,          V^,          ,           4      pS	P                  SV4      p\        P
                  ^S^V^V^S	P                  //# r    )rp   Zallow_credentialsr   r   rk   ry   r   )r#   rC   r/   ro   r   r   rn   r   rM   rN   rm   r   s   &&&   r   r8   ZDHmacSecretExtension.get_assertion.<locals>.Processing.prepare_inputsL  s    /118S$E !+33M58eTUhCVWH , 9 9- RI ,00}xy|33	3 r   c                	s   < VP                   P                  ;'       g    / pVP                  \        P                  4      pV'       d   SP                  SV4      MR p\        R VS4      # r    )r~   r{   r   rk   ry   r   rt   )	r#   r:   r/   r{   r   rs   rN   rm   r   	   &&&   r   r?   ZEHmacSecretExtension.get_assertion.<locals>.Processing.prepare_outputs_  s\    !)!3!3!>!>!D!D"J&NN+>+C+CDEFK,,]EBQU  0iEEr   r   Nr   )rn   r   rM   rN   rm   r   s   r   
Processingr   K  s     &F Fr   r   )
r{   ra   r   r   rv   rU   rK   r   r   rB   )r#   rF   rM   rN   r   r   r   rn   r   rm   r   s   &&ff   @@@@r   rS   Z!HmacSecretExtension.get_assertion>  s    ##))r.88E9JK &&& ((O)DE 	 D--d33"46J+5+H+H+J(M=F F= F8 <A AE3<r   ru   N)F)r&   r'   r(   r)   r*   ry   r   rl   r%   rK   rQ   rS   r,   r   r   r   rk   rk      s-     DGH41'R) r   rk   c                  sF    ] tR tRt$ RtRtR]R&   RtR]R&   RtR]R	&   R
t	R# )&AuthenticatorExtensionsLargeBlobInputsij  zClient inputs for largeBlob.N
str | Nonesupportrf   readr0   writer   )
r&   r'   r(   r)   r*   r   rY   r   r   r,   r   r   r   r   r   j  s#    &GZD+E<r   r   c                  sF    ] tR tRt$ RtRtR]R&   RtR]R&   RtR]R&   R	t	R# )
'AuthenticatorExtensionsLargeBlobOutputsis  zClient outputs for largeBlob.Nrf   	supportedr0   blobwrittenr   )
r&   r'   r(   r)   r*   r   rY   r   r   r,   r   r   r   r   r   s  s#    '!I{!D,G[r   r   c                  0    ] tR tRtRtRtR tR tR tRt	R# )	LargeBlobExtensioni|  z
Implements the Large Blob storage (largeBlob) WebAuthn extension.

https://www.w3.org/TR/webauthn-3/#sctn-large-blob-extension
ZlargeBlobKeyc                	s    V P                   VP                  P                  9   ;'       d'    VP                  P                  P	                  R R4      # )Z
largeBlobsF)ry   rz   r{   rM   r   rJ   r7   r   rK   ZLargeBlobExtension.is_supported  sC    yyDII000 
 
TYY5F5F5J5J%6
 	
r   c                	sz   VP                   ;'       g    / p\        P                  VP                  R 4      4      pV'       dy   VP                  '       g   VP
                  '       d   \        R4      hVP                  R8X  d#   V P                  V4      '       g   \        R4      h ! R R\        4      pV! 4       # R# )	largeBlobInvalid set of parametersZrequired1Authenticator does not support large blob storagec                  s"    ] tR tRtR tR tRtR# )5LargeBlobExtension.make_credential.<locals>.Processori  c                	s&    \         P                  R /# T)r   ry   r6   r7   r   r8   ZDLargeBlobExtension.make_credential.<locals>.Processor.prepare_inputs  s    .33T::r   c                	s6    R \        VP                  RJR7      /# )r   N)r   )r   large_blob_keyr=   r>   r   r?   ZELargeBlobExtension.make_credential.<locals>.Processor.prepare_outputs  s%    #%L&.&=&=T&I& r   r   Nr   r   r   r   r   r     s    ;r   r   N)
r{   r   r   r   r   r   ri   r   rK   r-   )r#   rF   rM   rN   r   datar      &&&&   r   rQ   Z"LargeBlobExtension.make_credential  s    ##))r5??

;@WXyyyDJJJ !<==||z)$2C2CD2I2I !TUU	: 	 ;# r   c                	s2  aaa VP                   ;'       g    / p\        P                  VP                  R 4      4      oS'       d   SP                  '       g%   SP
                  '       d   SP                  '       d   \        R4      hV P                  S4      '       g   \        R4      h ! VVV3R lR\        4      pT! SP                  '       d   \        P                  P                  M\        P                  ! ^ 4      \        P                  R/R7      # R# )r   r   r   c                  s(   < ] tR tRtV VV3R ltRtR# )3LargeBlobExtension.get_assertion.<locals>.Processori  c                	s>  < VP                   pV'       d   SP                  '       d+   \        S4      pVP                  V4      pR \	        VR7      /# SP
                  '       d8   \        SSV4      pVP                  VSP
                  4       R \	        RR7      /# R# R# )r   )r   T)r   N)r   r   r   Zget_blobr   r   Zput_blob)	r#   r:   r/   Zblob_keyZlarge_blobsr   rF   r   rN   r   r   r?   ZCLargeBlobExtension.get_assertion.<locals>.Processor.prepare_outputs  s    '66H999*4T*:K#.#7#7#AD +-T)-."$ 
 "ZZZ*4T<*SK'004::F +-T,0."$  (  r   r   N)r&   r'   r(   r)   r?   r,   )rF   r   rN   s   r   r   r     s     r   r   Tr   N)r{   r   r   r   r   r   r   ri   rK   rB   r   r+   ZLARGE_BLOB_WRITEr   ry   )r#   rF   rM   rN   r   r   r   s   &f&f  @r   rS   Z LargeBlobExtension.get_assertion  s    ##))r5??

;@WX|||			djjj !<==$$T** !TUU < *  zzz ((99"--a0*//6 7 r   r   N
r&   r'   r(   r)   r*   ry   rK   rQ   rS   r,   r   r   r   r   r   |  s     D

,%r   r   c                  r   )	CredBlobExtensioni  z
Implements the Credential Blob (credBlob) CTAP2 extension.

https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credBlob-extension
credBlobc                	rw   r    rx   rJ   r7   r   rK   ZCredBlobExtension.is_supported  r|   r   c                	sF   VP                   ;'       g    / pV P                  V4      '       dt   VP                  R 4      pVP                  P                  f   Q hV'       d?   \        V4      VP                  P                  8:  d   \        V P                  V/R7      # R# R# R# )r   Nr   )r{   rK   r   rz   Zmax_cred_blob_lengthrj   r-   ry   )r#   rF   rM   rN   r   r      &&&&  r   rQ   Z!CredBlobExtension.make_credential  s    ##))rT""::j)D9911===D	TYY%C%CC5dii=NOO Dt #r   c                	s    VP                   ;'       g    / pV P                  V4      '       d0   VP                  R 4      RJ d   \        V P                  R/R7      # R# R# )ZgetCredBlobTr   N)r{   rK   r   rB   ry   r#   rF   rM   rN   r      &&&& r   rS   ZCredBlobExtension.get_assertion  sS    ##))rT""vzz-'@D'H3DIIt;LMM (I"r   r   Nr   r   r   r   r   r     s     D1PNr   r   c                  sJ    ] tR tRtRt] ! R R]4      4       tRtR t	R t
RtR	# )
CredProtectExtensioni  z
Implements the Credential Protection CTAP2 extension.

https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credProtect-extension
c                  s"    ] tR tRtRtRtRtRtR# )CredProtectExtension.POLICYi  ZuserVerificationOptionalZ,userVerificationOptionalWithCredentialIDListZuserVerificationRequiredr   N)r&   r'   r(   r)   ZOPTIONALZOPTIONAL_WITH_LISTREQUIREDr,   r   r   r   POLICYr     s    -K-r   r   ZcredProtectc                	rw   r    rx   rJ   r7   r   rK   Z!CredProtectExtension.is_supported  r|   r   c                	s   VP                   ;'       g    / pVP                  R 4      pV'       d   \        \        P                  4      P                  \        P	                  V4      4      pVP                  RR4      pV'       d*   V P                  V4      '       g   V^ 8  d   \        R4      h\        V P                  V^,           /R7      # R# )ZcredentialProtectionPolicyZ!enforceCredentialProtectionPolicyFz4Authenticator does not support Credential Protectionr   N)
r{   r   Zlistr   r   indexrK   ri   r-   ry   )r#   rF   rM   rN   r   Zpolicyr   Zenforces   &&&&    r   rQ   Z$CredProtectExtension.make_credential  s    ##))r89-445;;$++F3E jj!DeLGt0066519 !WXX1$))UQY9OPP r   r   N)r&   r'   r(   r)   r*   r   r   r   ry   rK   rQ   r,   r   r   r   r   r     s4     . . .
 D1Qr   r   c                  *    ] tR tRtRtRtR tR tRtR# )MinPinLengthExtensioni  z
Implements the Minimum PIN Length (minPinLength) CTAP2 extension.

https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-minpinlength-extension
ZminPinLengthc                	s4    R VP                   P                  9   # )ZsetMinPINLength)rz   rM   rJ   r7   r   rK   Z"MinPinLengthExtension.is_supported  s     DII$5$555r   c                	s    VP                   ;'       g    / pV P                  V4      '       d:   VP                  V P                  4      R J d   \	        V P                  R /R7      # R# R# )Tr   N)r{   rK   r   ry   r-   r   r   r   rQ   Z%MinPinLengthExtension.make_credential  sW    ##))rT""vzz$))'<'D1$))T9JKK (E"r   r   N	r&   r'   r(   r)   r*   ry   rK   rQ   r,   r   r   r   r   r     s     D6Lr   r   c                  s*    ] tR tRt$ RtRtR]R&   RtR# )CredentialPropertiesOutputi  zClient outputs for credProps.Nrf   rkr   )r&   r'   r(   r)   r*   r   rY   r,   r   r   r   r   r     s    'Br   r   c                  r   )CredPropsExtensioni  z
Implements the Credential Properties (credProps) WebAuthn extension.

https://www.w3.org/TR/webauthn-3/#sctn-authenticator-credential-properties-extension
Z	credPropsc                	s    R # r   r   rJ   r7   r   rK   ZCredPropsExtension.is_supported%  s    r   c                	s   VP                   ;'       g    / pVP                  V P                  4      R J d   VP                  ;'       g    \	        4       pVP
                  \        P                  8H  ;'       gK    VP
                  \        P                  8H  ;'       d&    VP                  P                  P                  R4      p\        V P                  \        VR7      /R7      # R# )Tr   )r   )r   N)r{   r   ry   Zauthenticator_selectionr	   Zresident_keyr   r   Z	PREFERREDrz   rM   r-   r   )r#   rF   rM   rN   r   Z	selectionr   r   r   rQ   Z"CredPropsExtension.make_credential)  s    ##))r::dii D(//SS3Q3S  ''+A+J+JJ  &&*@*J*JJ 0 0II%%))$/ 
 2$>"$EF  )r   r   Nr   r   r   r   r   r     s     Dr   r   c                  s,    ] tR tRt$ R]R&   R]R&   RtR# )PaymentCurrencyAmounti9  strZcurrencyr   r   N)r&   r'   r(   r)   rY   r,   r   r   r   r   r   9  s    MJr   r   c                  s:    ] tR tRt$ R]R&   R]R&   RtR]R&   RtR	# )
PaymentCredentialInstrumenti?  r   Zdisplay_nameZiconTrG   icon_must_be_shownr   N)r&   r'   r(   r)   rY   r   r,   r   r   r   r   r   ?  s    
I##r   r   c                  s~    ] tR tRt$ RtRtR]R&   RtR]R&   RtR]R&   Rt	R]R	&   Rt
R]R
&   RtR]R&   RtR]R&   RtR# )%AuthenticationExtensionsPaymentInputsiF  zClient inputs for payment.Nrf   
is_paymentr   rp_id
top_origin
payee_namepayee_originzPaymentCurrencyAmount | Nonetotalz"PaymentCredentialInstrument | None
instrumentr   )r&   r'   r(   r)   r*   r   rY   r   r   r   r   r   r   r,   r   r   r   r   r   F  sM    $"J"E:!J
!!J
!#L*#*.E'.59J29r   r   c                  r   )	ThirdPartyPaymentExtensioniS  a=  
Implements the Third Party Payment (thirdPartyPayment) CTAP2.2 extension.

https://fidoalliance.org/specs/fido-v2.2-ps-20250228/fido-client-to-authenticator-protocol-v2.2-ps-20250228.html#sctn-thirdPartyPayment-extension

Note that most of the processing for the WebAuthn extension needs to be done by the
client, see:
https://www.w3.org/TR/secure-payment-confirmation/#sctn-collectedclientpaymentdata-dictionary

As such, this extension is not included in the default extensions list, and should
not be used without a client that supports the WebAuthn payment extension.
ZthirdPartyPaymentc                	rw   r    rx   rJ   r7   r   rK   Z'ThirdPartyPaymentExtension.is_supportedc  r|   r   c                	   VP                   ;'       g    / p\        P                  VP                  R 4      4      pV P	                  V4      '       d7   V'       d-   VP
                  '       d   \        V P                  R/R7      # R# R# R# ZpaymentTr   N)r{   r   r   r   rK   r   r-   ry   r#   rF   rM   rN   r   r   r   r   rQ   Z*ThirdPartyPaymentExtension.make_credentialf  sh    ##))r4>>vzz)?TUT""t1$))T9JKK 1@t"r   c                	r   r   )r{   r   r   r   rK   r   rB   ry   r   r   r   rS   Z(ThirdPartyPaymentExtension.get_assertionl  sh    ##))r4>>vzz)?TUT""t3DIIt;LMM 1@t"r   r   Nr   r   r   r   r   r   S  s     D1LNr   r   )9Z
__future__r    rT   Zdataclassesr   Zenumr   r   Ztypingr   r   Zutilsr   r   r   Zwebauthnr	   r
   r   r   r   Zbaser   r   r   r   r   Zpinr   r   ZABCr   r-   rB   rE   rU   rZ   r]   r^   ra   re   rp   rt   rk   r   r   r   r   r   r   r   r   r   r   r   r   Z_DEFAULT_EXTENSIONSr   r   r   <module>r      s  8 # 
 !   ; ;  @ ?  '   $%7 0'9 8SWW @ eD!  " eD!!/ ! "!. eD!    "  eD!U U "U eD!< < "<"J,j . j Z eD!_  " eD! o   " I IXN N4Q> Q@LN L& eD!  " : eD!O  "
 eD!$/ $ "$ eD!	:O 	: "	:N NB  r   