+
    ÆÚjè6  ã                   óÒ  € R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt ^ RIHt  ]P                  t]P                  ! ]4      tR tR t ! R R]4      t ! R	 R
]4      t ! R R]4      t ! R R]4      tR t ! R R]4      tR t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      tR#   ]	 d
    ^ RI
Ht  LŸi ; i  ] d    ]P                  ! R]3RR/4      t L¶i ; i)aP  A generic persistence layer, optionally encrypted on Windows, OSX, and Linux.

Should a certain encryption is unavailable, exception will be raised at run-time,
rather than at import time.

By successfully creating and using a certain persistence object,
app developer would naturally know whether the data are protected by encryption.
N)ÚPathÚABCÚ	__slots__c                ób  € V '       g   R# \         P                  R8¼  d   \        P                  ! V RR7       R#  \        P                  ! V 4       R#   \         dQ   pTP
                  \
        P                  8X  d,   \        P                  P                  T 4      '       d    Rp?R# h Rp?ii ; i)z¶Creates a directory, and any necessary parents.

If the path provided is an existing file, this function raises an exception.
:param path: The directory name that should be created.
NT)Úexist_ok)é   é   )	ÚsysÚversion_infoÚosÚmakedirsÚOSErrorÚerrnoÚEEXISTÚpathÚisdir)r   Úexps   & Ú’/opt/data/installs/351f81cc06284494/environments/aa258815729c481f8402f54f4c368f83/venv/lib/python3.14/site-packages/msal_extensions/persistence.pyÚ_mkdir_pr      sr   € ÷ Ùä
×Ñ˜6Ô!Ü
�Š�D 4Õ(Ùð
Ü
�Š�DÖøÜô Ø�9‰9œŸ™Ô$¬¯©¯©°t×)<Ò)<Ýàûð	ús   »A ÁB.ÁAB)Â(B)Â)B.c                 óh   € \         P                  ! V P                  R 4      4      P                  4       # )zutf-8)ÚhashlibÚsha256ÚencodeÚ	hexdigest)Úinput_strings   &r   Ú
_auto_hashr   6   s%   € Ü�>Š>˜,×-Ñ-¨gÓ6Ó7×AÑAÓCÐCó    c                   ó:   a a€ ] tR t^=t oRtRV 3R lltRtVtV ;t# )ÚPersistenceErrorz#The base exception for persistence.c                ó0   <€ \         \        V `  WV4       R # ©N)Úsuperr   Ú__init__©ÚselfÚerr_noÚmessageÚlocationÚ	__class__s   &&&&€r   r"   ÚPersistenceError.__init__C   s   ø€ ÜÔ Ñ.¨vÀÖIr   © ©NNN©	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r"   Ú__static_attributes__Ú__classdictcell__Ú__classcell__©r(   Ú__classdict__s   @@r   r   r   =   s   ù‡ € Ù-÷
J÷ Jr   r   c                   ó:   a a€ ] tR t^Gt oRtRV 3R lltRtVtV ;t# )ÚPersistenceNotFoundzZThis happens when attempting BasePersistence.load() on a non-existent persistence instancec                ód   <€ \         \        T `  \        P                  T;'       g    R VR7       R# )zPersistence not found©r%   r&   r'   N)r!   r8   r"   r   ÚENOENTr#   s   &&&&€r   r"   ÚPersistenceNotFound.__init__I   s.   ø€ ÜÔ! 4Ñ1Ü—<‘<Ø×6Ð6Ð6Øð 	2ö 	r   r*   r+   r,   r5   s   @@r   r8   r8   G   s   ù‡ € Ùd÷÷ r   r8   c                   ó   € ] tR t^OtRtRtR# )ÚPersistenceEncryptionErrorz*This could be raised by persistence.save()r*   N©r-   r.   r/   r0   r1   r2   r*   r   r   r>   r>   O   ó   † Ý4r   r>   c                   ó   € ] tR t^RtRtRtR# )ÚPersistenceDecryptionErrorz*This could be raised by persistence.load()r*   Nr?   r*   r   r   rB   rB   R   r@   r   rB   c                ór  € \         P                  P                  R4      '       d   \        V 4      # \         P                  P                  R4      '       d   \	        V 4      # \         P                  P                  R4      '       d   \        V 4      # \        RP                  \         P                  4      4      h)z˜Build a suitable encrypted persistence instance based your current OS.

If you do not need encryption, then simply use ``FilePersistence`` constructor.
ÚwinÚdarwinÚlinuxzUnsupported platform: {})r	   ÚplatformÚ
startswithÚ!FilePersistenceWithDataProtectionÚKeychainPersistenceÚLibsecretPersistenceÚRuntimeErrorÚformat©r'   s   &r   Úbuild_encrypted_persistencerO   V   s   € ô ‡|�|×Ñ˜u×%Ò%Ü0°Ó:Ð:Ü
‡|�|×Ñ˜x×(Ò(Ü" 8Ó,Ð,Ü
‡|�|×Ñ˜w×'Ò'Ü# HÓ-Ð-Ü
Ð1×8Ñ8¼¿¹ÓFÓ
GÐGr   c                   ó¸   a € ] tR t^ft o RtRt]P                  R 4       t]P                  R 4       t	]P                  R 4       t
]P                  R 4       tRtV tR# )	ÚBasePersistencezDAn abstract persistence defining the common interface of this familyFc                ó   € \         h)ú&Save the content into this persistence©ÚNotImplementedError©r$   Úcontents   &&r   ÚsaveÚBasePersistence.savek   s
   € ô "Ð!r   c                ó   € \         h)zeLoad content from this persistence.

Could raise PersistenceNotFound if no save() was called before.
rT   ©r$   s   &r   ÚloadÚBasePersistence.loadq   s
   € ô "Ð!r   c                ó   € \         h)z|Get the last time when this persistence has been modified.

Could raise PersistenceNotFound if no save() was called before.
rT   r[   s   &r   Útime_last_modifiedÚ"BasePersistence.time_last_modifiedz   s
   € ô "Ð!r   c                ó   € \         h)zBReturn the file path which this persistence stores (meta)data intorT   r[   s   &r   Úget_locationÚBasePersistence.get_location‚   s
   € ô "Ð!r   r*   N)r-   r.   r/   r0   r1   Úis_encryptedÚabcÚabstractmethodrX   r\   r_   rb   r2   r3   ©r6   s   @r   rQ   rQ   f   ss   ø‡ € ÙNà€Là×Ññ"ó ð"ð
 	×Ññ"ó ð"ð 	×Ññ"ó ð"ð 	×Ññ"ó ö"r   rQ   c                 ó¢   € \         P                  ! V \         P                  \         P                  ,          \         P                  ,          R 4      # )i€  )r   ÚopenÚO_RDWRÚO_CREATÚO_TRUNCrN   s   &r   Ú_openrm   ˆ   s+   € Ü�7Š7�8œRŸY™Y¬¯©Õ3´b·j±jÕ@À%ÓHÐHr   c                   óH   a € ] tR t^�t o RtR tR tR tR tR t	R t
RtV tR	# )
ÚFilePersistencez8A generic persistence, storing data in a plain-text filec                óØ   € V'       g   \        R 4      h\        P                  P                  V4      V n        \        \        P                  P                  V P                  4      4       R# )zRequires a file pathN)Ú
ValueErrorr   r   Ú
expanduserÚ	_locationr   Údirname)r$   r'   s   &&r   r"   ÚFilePersistence.__init__�   s@   € ßÜÐ3Ó4Ð4ÜŸ™×+Ñ+¨HÓ5ˆŒÜ”—‘—‘ §¡Ó0Ö1r   c                óÆ   € \         P                  ! \        V P                  4      R4      ;_uu_ 4       pVP	                  V4       RRR4       R#   + '       g   i     R# ; i)rS   zw+N)r   Úfdopenrm   rs   Úwrite)r$   rW   Úhandles   && r   rX   ÚFilePersistence.save–   s;   € ô �YŠY”u˜TŸ^™^Ó,¨d×3Ô3°vØ�L‰L˜Ô!÷ 4×3×3Ò3ús   ³AÁA 	c                ó2  €  \        V P                  R4      ;_uu_ 4       pVP                  4       uuRRR4       #   + '       g   i     R# ; i  \         d=   pTP                  \        P
                  8X  d   \        RT P                  R7      hh Rp?ii ; i)z"Load content from this persistenceÚrNúGPersistence not initialized. You can recover by calling a save() first.©r&   r'   )ri   rs   ÚreadÚEnvironmentErrorr   r;   r8   )r$   ry   r   s   &  r   r\   ÚFilePersistence.loadœ   sp   € ð	Ü�d—n‘n c×*Ô*¨fØ—{‘{“}÷ +×*×*Ó*ûäô 	Ø�y‰yœEŸL™LÔ(Ü)ðEà!Ÿ^™^ô	ð ð ûð	ús1   ‚A  ;°
A »A	ÁA ÁA ÁBÁ7BÂBc                óê   €  \         P                  P                  V P                  4      #   \         d=   pTP
                  \
        P                  8X  d   \        R T P                  R7      hh Rp?ii ; i)r}   r~   N)r   r   Úgetmtimers   r€   r   r;   r8   )r$   r   s   & r   r_   Ú"FilePersistence.time_last_modified­   s_   € ð
	Ü—7‘7×#Ñ# D§N¡NÓ3Ð3øÜô 	Ø�y‰yœEŸL™LÔ(Ü)ðEà!Ÿ^™^ô	ð ð ûð	ús   ‚(+ «A2¶7A-Á-A2c                óL   € \        V P                  4      P                  4        R# )zDTo touch this file-based persistence without writing content into itN)r   rs   Útouchr[   s   &r   r†   ÚFilePersistence.touchº   s   € äˆT�^‰^Ó×"Ñ"Ö$r   c                ó   € V P                   # r    ©rs   r[   s   &r   rb   ÚFilePersistence.get_location¾   s   € Ø�~‰~Ðr   r‰   N)r-   r.   r/   r0   r1   r"   rX   r\   r_   r†   rb   r2   r3   rg   s   @r   ro   ro   �   s+   ø‡ € ÙBò2ò"òò"ò%÷ð r   ro   c                   óJ   a a€ ] tR t^Ât oRtRtRV 3R lltR tR tRt	Vt
V ;t# )rI   z_A generic persistence with data stored in a file,
protected by Win32 encryption APIs on WindowsTc                óV   <€ ^RI Hp V! VR7      V n        \        \        V `  V4       R# )z7Initialization could fail due to unsatisfied dependency)ÚWindowsDataProtectionAgent)ÚentropyN)Úwindowsr�   Ú	_dp_agentr!   rI   r"   )r$   r'   rŽ   r�   r(   s   &&& €r   r"   Ú*FilePersistenceWithDataProtection.__init__Ç   s$   ø€ õ 	8Ù3¸GÔDˆŒÜÔ/°Ñ?ÀÖIr   c                ór  €  V P                   P                  V4      p\        P                  ! \        T P                  4      R4      ;_uu_ 4       pTP                  T4       RRR4       R#   \         d-   p\        \	        TR R4      RP                  T4      R7      hRp?ii ; i  + '       g   i     R# ; i)ÚwinerrorNz2Encryption failed: {} Consider disable encryption.)r%   r&   zwb+)r�   Úprotectr   r>   ÚgetattrrM   r   rw   rm   rs   rx   )r$   rW   ÚdataÚ	exceptionry   s   &&   r   rX   Ú&FilePersistenceWithDataProtection.saveÎ   s“   € ð	Ø—>‘>×)Ñ)¨'Ó2ˆDô �YŠY”u˜TŸ^™^Ó,¨e×4Ô4¸Ø�L‰L˜Ô÷ 5Ñ4øô ô 	Ü,Ü˜y¨*°dÓ;ØL×SÑSÐT]Ó^ôð ûð	ú÷
 5×4Ð4ús#   ‚A+ ÁB%Á+B"Á6'BÂB"Â%B6	c                ó  €  \        V P                  R 4      ;_uu_ 4       pVP                  4       pRRR4        T P                  P                  X4      #   + '       g   i     L,; i  \         dR   pTP                  \        P
                  8X  d   \        RT P                  R7      h\        P                  R4       h Rp?ii ; i  \         d8   p\        \        TRR4      RP                  T4      T P                  R7      hRp?ii ; i)ÚrbNr}   r~   z‚DPAPI error likely caused by file content not previously encrypted. App developer should migrate by calling save(plaintext) first.r“   z©Decryption failed: {} App developer may consider this guidance: https://github.com/AzureAD/microsoft-authentication-extensions-for-python/wiki/PersistenceDecryptionErrorr:   )ri   rs   r   r€   r   r;   r8   Úloggerr—   r�   Ú	unprotectr   rB   r•   rM   )r$   ry   r–   r   r—   s   &    r   r\   Ú&FilePersistenceWithDataProtection.loadÚ   så   € ð	Ü�d—n‘n d×+Ô+¨vØ—{‘{“}�÷ ,ð
	Ø—>‘>×+Ñ+¨DÓ1Ð1÷ ,×+ûäô 	Ø�y‰yœEŸL™LÔ(Ü)ðEà!Ÿ^™^ô	ð ô ×ÑðQôRð ûð	ûô ô 	Ü,Ü˜y¨*°dÓ;ð@÷ ‘V˜IÓ&ØŸ™ôð ûð	úsK   ‚A(  A±A( ºC ÁA%	Á A( Á%A( Á(CÁ3AB?Â?CÃD	Ã2DÄD	)r�   )Ú )r-   r.   r/   r0   r1   rd   r"   rX   r\   r2   r3   r4   r5   s   @@r   rI   rI   Â   s$   ù‡ € ñ5à€L÷Jò
÷ò r   rI   c                   óJ   a € ] tR t^øt o RtRtR
R ltR tR tR t	R t
R	tV tR# )rJ   z\A generic persistence with data stored in,
and protected by native Keychain libraries on OSXTNc                ó¨   € ^RI HpHp \        V4      V n        W@n        WPn        RpT;'       g    TV n        T;'       g    \        V4      V n	        R# )zˆInitialization could fail due to unsatisfied dependency.

:param signal_location: See :func:`persistence.LibsecretPersistence.__init__`
)ÚKeychainÚKeychainErrorzmsal-extensionsN)
Úosxr¡   r¢   ro   Ú_file_persistenceÚ	_KeychainÚ_KeychainErrorÚ_service_namer   Ú_account_name)r$   Úsignal_locationÚservice_nameÚaccount_namer¡   r¢   Údefault_service_names   &&&&   r   r"   ÚKeychainPersistence.__init__ý   sK   € ÷
 	1Ü!0°Ó!AˆÔØ!ŒØ+ÔØ0ÐØ)×AÐAÐ-AˆÔØ)×HÐH¬Z¸Ó-HˆÖr   c                óð   € V P                  4       ;_uu_ 4       pVP                  V P                  V P                  V4       R R R 4       V P                  P                  4        R #   + '       g   i     L,; ir    )r¥   Úset_generic_passwordr§   r¨   r¤   r†   )r$   rW   Úlockers   && r   rX   ÚKeychainPersistence.save
  sU   € Ø�^‰^×Ô Ø×'Ñ'Ø×"Ñ" D×$6Ñ$6¸ôA÷ ð 	×Ñ×$Ñ$Ö&÷ ×ús   ™(A%Á%A5	c           	     óž  € V P                  4       ;_uu_ 4       p VP                  V P                  V P                  4      uuR R R 4       #   T P                   d]   pTP
                  T P                  P                  8X  d2   \        RP                  T P                  T P                  4      RR7      hh R p?ii ; i  + '       g   i     R # ; i)NzService:{} Account:{}zMKeychain persistence not initialized. You can recover by call a save() first.)r'   r&   )	r¥   Úget_generic_passwordr§   r¨   r¦   Úexit_statusÚITEM_NOT_FOUNDr8   rM   )r$   r°   Úexs   &  r   r\   ÚKeychainPersistence.load  s³   € Ø�^‰^×Ô ðØ×2Ñ2Ø×&Ñ&¨×(:Ñ(:ó<÷ Òøð ×&Ñ&ô Ø—>‘> T×%8Ñ%8×%GÑ%GÔGô .Ø!8×!?Ñ!?Ø ×.Ñ.°×0BÑ0Bó"DðFô	ð ð ûðú÷	 ×Ðús)   ™B;›%AÁB8ÁAB3Â3B8Â8B;Â;C	c                ó6   € V P                   P                  4       # r    ©r¤   r_   r[   s   &r   r_   Ú&KeychainPersistence.time_last_modified"  ó   € Ø×%Ñ%×8Ñ8Ó:Ð:r   c                ó6   € V P                   P                  4       # r    ©r¤   rb   r[   s   &r   rb   Ú KeychainPersistence.get_location%  ó   € Ø×%Ñ%×2Ñ2Ó4Ð4r   )r¥   r¦   r¨   r¤   r§   ©NN©r-   r.   r/   r0   r1   rd   r"   rX   r\   r_   rb   r2   r3   rg   s   @r   rJ   rJ   ø   s.   ø‡ € ñ9à€LôIò'òò$;÷5ð 5r   rJ   c                   óJ   a € ] tR tRt o RtRtRR ltR tR tR t	R	 t
R
tV tR# )rK   i)  z_A generic persistence with data stored in,
and protected by native libsecret libraries on LinuxTNc                óœ   € ^RI HpHp V! 4        T! T;'       g    \        V4      T;'       g    / 3/ VB V n        \        V4      V n        R# )a  Initialization could fail due to unsatisfied dependency.

:param string signal_location:
    Besides saving the real payload into encrypted storage,
    this class will also touch this signal file.
    Applications may listen a FileSystemWatcher.Changed event for reload.
    https://docs.microsoft.com/en-us/dotnet/api/system.io.filesystemwatcher.changed?view=netframework-4.8#remarks
:param string schema_name: See :func:`libsecret.LibSecretAgent.__init__`
:param dict attributes: See :func:`libsecret.LibSecretAgent.__init__`
)ÚLibSecretAgentÚ	trial_runN)Ú	libsecretrÄ   rÅ   r   Ú_agentro   r¤   )r$   r©   Úschema_nameÚ
attributesÚkwargsrÄ   rÅ   s   &&&&,  r   r"   ÚLibsecretPersistence.__init__.  sI   € ÷	'áŒÙ$Ø×6Ð6œ: oÓ6¸
×8HÐ8HÀbñTØLRñTˆŒä!0°Ó!AˆÖr   c                ó€   € V P                   P                  V4      '       d   V P                  P                  4        R # R # r    )rÇ   rX   r¤   r†   rV   s   &&r   rX   ÚLibsecretPersistence.saveA  s.   € Ø�;‰;×Ñ˜G×$Ò$Ø×"Ñ"×(Ñ(Ö*ñ %r   c                óZ   € V P                   P                  4       pVf   \        RR7      hV# )NzLKeyring persistence not initialized. You can recover by call a save() first.)r&   )rÇ   r\   r8   )r$   r–   s   & r   r\   ÚLibsecretPersistence.loadE  s4   € Ø�{‰{×ÑÓ!ˆØŠ<ô &ð:ô<ð <ð ˆr   c                ó6   € V P                   P                  4       # r    r¹   r[   s   &r   r_   Ú'LibsecretPersistence.time_last_modifiedO  r»   r   c                ó6   € V P                   P                  4       # r    r½   r[   s   &r   rb   Ú!LibsecretPersistence.get_locationR  r¿   r   )rÇ   r¤   rÀ   rÁ   rg   s   @r   rK   rK   )  s.   ø‡ € ñ<à€LôBò&+òò;÷5ð 5r   rK   r*   ) r1   re   r   r   r   Úloggingr	   Úpathlibr   ÚImportErrorÚpathlib2r   ÚAttributeErrorÚABCMetaÚobjectÚ	getLoggerr-   r›   r   r   ÚIOErrorr   r8   r>   rB   rO   rQ   rm   ro   rI   rJ   rK   r*   r   r   Ú<module>rÝ      s  ðñó Û 	Û Û Û Û 
ðÝð
;Ø
�'‰'€Cð
 
×	Ò	˜8Ó	$€òò0DôJ�wô JôÐ*ô ô5Ð!1ô 5ô5Ð!1ô 5òHô "�cô "òDIô
2�oô 2ôj3¨ô 3ôl.5˜/ô .5ôb*5˜?ö *5øðq ô ßðûð ô ;Ø
�+Š+�e˜f˜Y¨°bÐ(9Ó
:‚Cð;ús"   œB2 £C Â2CÃCÃC&Ã%C&