+
     hY  c                   s    ^ RI Ht ^RIHt ^RIHtHtHt ^RIH	t	 ^RI
HtHtHtHtHtHt  ]! RRRR7       ! R	 R
]	4      4       t]! RRRR7       ! R R]4      4       t ! R R]4      tR# )i    )	dataclass)DefaultClientDataCollector)%AuthenticationExtensionsPaymentInputsPaymentCredentialInstrumentPaymentCurrencyAmount)_JsonDataObject)AuthenticatorAttachmentCollectedClientData"PublicKeyCredentialCreationOptions!PublicKeyCredentialRequestOptionsResidentKeyRequirementUserVerificationRequirementFT)Zeqfrozenkw_onlyc                   s4   a  ] tR t^5t o RtRtV 3R ltRtV tR# )$CollectedClientAdditionalPaymentDataNc                s~   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[ R,          ;R&   S[ R,          ;R&   S[;R&   S[;R&   # )   rp_id
top_originN
payee_namepayee_origintotal
instrument)strr   r   Zformat__classdict__   "2/usr/lib/python3.14/site-packages/fido2/payment.py__annotate__Z1CollectedClientAdditionalPaymentData.__annotate__5   sW     J  O  d
!	 
 *#  !   ,+      )	__name__
__module____qualname____firstlineno__r   r   __annotate_func____static_attributes____classdictcell__)r   s   @r   r   r   5   s      "J#L  r   r   )Zinitr   r   c                   sp   a a ] tR t^?t oV3R lV 3R llt]RV3R lV 3R lll4       tV3R ltRtVt	V ;t
# )CollectedClientPaymentDatac                s    < V ^8  d   QhRS[ /# )r   
serialized)bytesr   r   r   r   'CollectedClientPaymentData.__annotate__C   s     5 55 5r   c                s   < \         SV `  V4       \        P                  V P                  R ,          4      p\
        P                  V R V4       R# )paymentN)super__init__r   	from_dictZ_dataZobjectZ__setattr__)selfr&   r)   	__class__s   && r   r+   Z#CollectedClientPaymentData.__init__C   s;    $6@@IAVW4G4r   c          
      sH   < V ^8  d   QhRS[ RS[S[ ,          RS[ RS[RS[/# )r   type	challengeorigincross_originZreturn)r   r'   Zboolr   r   r   r   r   r(   J   sA     
 

 3;
 	

 
 

r   c                sh   < \         SV `  ! RR VRVRVRVR\        VP                  R4      4      /VB # )r/   r0   r1   r2   r)   r   )r*   createZdictZpop)Zclsr/   r0   r1   r2   Zkwargsr.   s   &&&&&,r   r3   Z!CollectedClientPaymentData.createI   s\     w~ 


 
 &	

 I./
 
 	
r   c                s&   < V ^8  d   Qh/ S[ ;R&   # )r   r)   )r   r   r   r   r   r(   ?   s     11 r   r   )F)r   r   r    r!   r+   Zclassmethodr3   r"   r#   r$   __classcell__r.   r      @@r   r%   r%   ?   s/     5 5 
 
 
  r   r%   c                   s6   a a ] tR t^\t oRtV 3R ltRtVtV ;t# )PaymentClientDataCollectora  ClientDataCollector for the WebAuthn "payment" extension.

This class can be used together with the CTAP2 "thirdPartyPayment" extension to
enable third-party payment confirmation. It collects the necessary client data and
validates the options provided by the client.
c                s  < V P                  WP                  4      pVP                  ;'       g    / p\        P                  ! VP                  R 4      4      pV'       EdW   VP                  '       EdD   \        V\        4      '       d   VP                  pV'       d~   VP                  \        P                  \        P                  39  gO   VP                  \        P                   \        P"                  39  g    VP$                  \&        P                   8w  d   \)        R4      hM\        V\*        4      '       d{   \,        P/                  RV P                  VP0                  \3        VP4                  VP6                  VP8                  VP:                  VP<                  VP>                  R7      R7      V3# V PA                  W P                  4       \B        SV `  V4      # )r)   z%Invalid options for payment extensionzpayment.get)r   r   r   r   r   r   )r/   r1   r0   r)   )#Z	get_rp_idZ_originZ
extensionsr   r,   ZgetZ
is_paymentZ
isinstancer   Zauthenticator_selectionZauthenticator_attachmentr   ZPLATFORMZCROSS_PLATFORMZresident_keyr
   ZREQUIREDZ	PREFERREDZuser_verificationr   Z
ValueErrorr	   r%   r3   r0   r   r   r   r   r   r   r   Zverify_rp_idr*   collect_client_data)r-   Zoptionsr   ZinputsZdataZselr.   s   &&    r   r8   Z.PaymentClientDataCollector.collect_client_datad   s~   w5##))r4>>vzz)?TU4DOOO'#EFF5533/88/>> ''.77.88
 ,,0K0T0TT$%LMM U G%FGG /55*#||")"3"3 D"&**'+'+)-):):"&**'+!	 6   $ 	%.w*733r   r   )	r   r   r    r!   Z__doc__r8   r#   r$   r4   r5   r6   r   r7   r7   \   s     -4 -4r   r7   N)Zdataclassesr    Zclientr   Zctap2.extensionsr   r   r   Zutilsr   Zwebauthnr   r   r   r	   r
   r   r   r%   r7   r   r   r   <module>r9      s   8 " . 
 #  eD$/,? , 0, dD1
!4 
 2
854!; 54r   