Files
wg-backend-django/dell-env/lib/python3.11/site-packages/itsdangerous/__pycache__/timed.cpython-311.pyc

90 lines
9.9 KiB
Plaintext
Raw Normal View History

2023-10-30 14:40:43 +07:00
<EFBFBD>
v]?e<><00><00>N<00>ddlZddlZddlZddlmZddlmZddlmZddlmZddlmZddlm Z dd lm
Z
dd
l m Z dd l m Z dd l mZdd lmZddlmZejeefZejeZejeZejrddlZGd<0F>de<12><00>ZGd<11>de<10><00>ZdS)<13>N)<01>datetime)<01>timezone<6E>)<01> base64_decode)<01> base64_encode)<01> bytes_to_int)<01> int_to_bytes)<01>
want_bytes)<01> BadSignature)<01>BadTimeSignature)<01>SignatureExpired)<01>
Serializer)<01>Signerc <00>:<00><00>eZdZdZdefd<03>Zdedefd<05>Zdede fd<07>Z
e j dd
ed e d d de fd<0E><05><00>Ze j dd
ed e d ddeje effd<11><05><00>Z dd
ed e d edejeje efe ff<08>fd<12> Zdd
ed e defd<13>Z<13>xZS)<17>TimestampSignerz<72>Works like the regular :class:`.Signer` but also records the time
of the signing and can be used to expire signatures. The
:meth:`unsign` method can raise :exc:`.SignatureExpired` if the
unsigning failed because the signature is expired.
<20>returnc<00>B<00>ttj<00><00><00><00>S)zTReturns the current timestamp. The function must return an
integer.
)<02>int<6E>time)<01>selfs <20>k/home/infidel/Sync/TIP/WireGuard/ocp-wg-backend/dell-env/lib/python3.11/site-packages/itsdangerous/timed.py<70> get_timestampzTimestampSigner.get_timestamp!s<00><00><13>4<EFBFBD>9<EFBFBD>;<3B>;<3B><1F><1F><1F><00>tsc<00>B<00>tj|tj<00><01><00>S)a Convert the timestamp from :meth:`get_timestamp` into an
aware :class`datetime.datetime` in UTC.
.. versionchanged:: 2.0
The timestamp is returned as a timezone-aware ``datetime``
in UTC rather than a naive ``datetime`` assumed to be UTC.
)<01>tz)r<00> fromtimestampr<00>utc)rrs r<00>timestamp_to_datetimez%TimestampSigner.timestamp_to_datetime's<00><00><18>%<25>b<EFBFBD>X<EFBFBD>\<5C>:<3A>:<3A>:<3A>:r<00>valuec<00><><00>t|<01><00>}tt|<00><00><00><00><00><00><00>}t|j<00><00>}||z|z}||z|<00>|<01><00>zS)z:Signs the given string and also attaches time information.)r
rr r<00>sep<65> get_signature)rr <00> timestampr"s r<00>signzTimestampSigner.sign1sj<00><00><1A>5<EFBFBD>!<21>!<21><05>!<21>,<2C>t<EFBFBD>/A<>/A<>/C<>/C<>"D<>"D<>E<>E<> <09><18><14><18>"<22>"<22><03><15><03> <0B>i<EFBFBD>'<27><05><14>s<EFBFBD>{<7B>T<EFBFBD>/<2F>/<2F><05>6<>6<>6<>6rNF<4E> signed_value<75>max_age<67>return_timestampz_te.Literal[False]c<00><00>dS<00>N<><00>rr&r'r(s r<00>unsignzTimestampSigner.unsign<<00> <00><00> <0C>rTz_te.Literal[True]c<00><00>dSr*r+r,s rr-zTimestampSigner.unsignEr.rc<00><><00><01> t<00><00><00>|<01><00>}d}n"#t$r}|}|jpd}Yd}~nd}~wwxYwt |j<00><00>}||vr|r|<05>t d|<04><04><00><00>|<04>|d<05><00>\}} d}
d} tt| <09><00><00><00>}
n#t$rYnwxYw|<05>i|
<EFBFBD>H |<00> |
<EFBFBD><00>} n1#tttf$r} t d|<08><04><00>| <0C>d} ~ wwxYwt t|<05><00>|| <0B><07><00><00>|
<EFBFBD>t d|<08><04><00><00>|<02>x|<00><00><00>|
z
} | |kr,t#d| <0A>d |<02>d
<EFBFBD>||<00> |
<EFBFBD><00><00><07><00><00>| d kr)t#d| <0A>d <0C>||<00> |
<EFBFBD><00><00><07><00><00>|r||<00> |
<EFBFBD><00>fS|S) a<>Works like the regular :meth:`.Signer.unsign` but can also
validate the time. See the base docstring of the class for
the general behavior. If ``return_timestamp`` is ``True`` the
timestamp of the signature will be returned as an aware
:class:`datetime.datetime` object in UTC.
.. versionchanged:: 2.0
The timestamp is returned as a timezone-aware ``datetime``
in UTC rather than a naive ``datetime`` assumed to be UTC.
Nrztimestamp missing)<01>payloadrzMalformed timestamp)r1<00> date_signedzSignature age z > z secondsrz < 0 seconds)<12>superr-r r1r
r"r <00>rsplitrr<00> Exceptionr<00>
ValueError<EFBFBD>OSError<6F> OverflowError<6F>strrr )rr&r'r(<00>result<6C> sig_error<6F>er"r <00>ts_bytes<65>ts_int<6E>ts_dt<64>exc<78>age<67> __class__s <20>rr-zTimestampSigner.unsignNsu<00><><00>  &<26><1A>W<EFBFBD>W<EFBFBD>^<5E>^<5E>L<EFBFBD>1<>1<>F<EFBFBD><1C>I<EFBFBD>I<EFBFBD><49><1B> &<26> &<26> &<26><19>I<EFBFBD><16>Y<EFBFBD>%<25>#<23>F<EFBFBD>F<EFBFBD>F<EFBFBD>F<EFBFBD>F<EFBFBD>F<EFBFBD><46><EFBFBD><EFBFBD><EFBFBD> &<26><><EFBFBD><EFBFBD><19><14><18>"<22>"<22><03> <0F>f<EFBFBD> <1C> <1C><18> <20><1F><0F>"<22>#6<><06>G<>G<>G<> G<> <20>-<2D>-<2D><03>Q<EFBFBD>/<2F>/<2F><0F><05>x<EFBFBD>!<21><06>'+<2B><05> <11>!<21>-<2D><08>"9<>"9<>:<3A>:<3A>F<EFBFBD>F<EFBFBD><46><18> <11> <11> <11> <10>D<EFBFBD> <11><><EFBFBD><EFBFBD>
<15> <20><15>!<21><1F> <20>6<>6<>v<EFBFBD>><3E>><3E>E<EFBFBD>E<EFBFBD><45>"<22>G<EFBFBD>]<5D>;<3B><1F><1F><1F>+<2B>-<2D>u<EFBFBD><16><16><16><1E><1F><><EFBFBD><EFBFBD><EFBFBD><1F><><EFBFBD><EFBFBD>#<23>3<EFBFBD>y<EFBFBD>><3E>><3E>5<EFBFBD>e<EFBFBD>T<>T<>T<> T<> <12>><3E>"<22>#8<>%<25>H<>H<>H<> H<> <13> <1E><16>$<24>$<24>&<26>&<26><16>/<2F>C<EFBFBD><12>W<EFBFBD>}<7D>}<7D>&<26>><3E>S<EFBFBD>><3E>><3E>W<EFBFBD>><3E>><3E>><3E>!<21> $<24> :<3A> :<3A>6<EFBFBD> B<> B<><12><12><12><12> <13>Q<EFBFBD>w<EFBFBD>w<EFBFBD>&<26>6<>S<EFBFBD>6<>6<>6<>!<21> $<24> :<3A> :<3A>6<EFBFBD> B<> B<><12><12><12><12> <1C> =<3D><18>$<24>4<>4<>V<EFBFBD><<3C><<3C><<3C> <<3C><14> s><00>#'<00>
A<03> A<03>A<03>B1<00>1
B><03>=B><03>C<00>D
<03>3D<03>D
c<00>X<00> |<00>||<02><01><00>dS#t$rYdSwxYw)zeOnly validates the given signed value. Returns ``True`` if
the signature exists and is valid.)r'TF)r-r )rr&r's r<00>validatezTimestampSigner.validate<74>sD<00><00> <19> <10>K<EFBFBD>K<EFBFBD> <0C>g<EFBFBD>K<EFBFBD> 6<> 6<> 6<><17>4<EFBFBD><34><1B> <19> <19> <19><18>5<EFBFBD>5<EFBFBD> <19><><EFBFBD>s <00><00>
)<03>))NF)NTr*)<15>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rrrr<00> _t_str_bytes<65>bytesr%<00>typing<6E>overload<61>
_t_opt_intr-<00>_t<5F>Tuple<6C>bool<6F>UnionrD<00> __classcell__<5F>rBs@rrrs<><00><><00><00><00><00><00><08><08>  <20>s<EFBFBD> <20> <20> <20> <20> ;<3B><03>;<3B><08>;<3B>;<3B>;<3B>;<3B>7<>,<2C>7<>5<EFBFBD>7<>7<>7<>7<> <0C>_<EFBFBD>#<23>16<31>  <0C> <0C>"<22> <0C><1C> <0C>/<2F>  <0C>
<0F>  <0C> <0C> <0C><15>_<EFBFBD> <0C> <0C>_<EFBFBD>#<23>04<30>  <0C> <0C>"<22> <0C><1C> <0C>.<2E>  <0C>
<0C><18>%<25><18>/<2F> "<22>  <0C> <0C> <0C><15>_<EFBFBD> <0C>#<23>!&<26> V<15>V<15>"<22>V<15><1C>V<15><1F> V<15>
<0C><18>"<22>(<28>5<EFBFBD>(<28>?<3F>+<2B>U<EFBFBD>2<> 3<> V<15>V<15>V<15>V<15>V<15>V<15>p<19><19>\<5C><19>J<EFBFBD><19>RV<52><19><19><19><19><19><19><19>rrc <00><><00><00>eZdZUdZeZejeed< d de dej
ef<04>fd<06> Z dde d e d
ede dejf
d <0B>Z dde d e de dejeejffd <0C>Z<12>xZS)<10>TimedSerializerzOUses :class:`TimestampSigner` instead of the default
:class:`.Signer`.
<20>default_signerN<72>saltrc<00>l<00><01>tjdt<00><00><00>|<01><00><00><00>S)Nz_t.Iterator[TimestampSigner])rN<00>castr3<00>iter_unsigners)rrWrBs <20>rrZzTimedSerializer.iter_unsigners<72>s*<00><><00><12>w<EFBFBD>5<>u<EFBFBD>w<EFBFBD>w<EFBFBD>7M<37>7M<37>d<EFBFBD>7S<37>7S<37>T<>T<>TrF<>sr'r(c<00>F<00>t|<01><00>}d}|<00>|<04><00>D]a} |<06>||d<02><03><00>\}}|<00>|<07><00>} |r| |fcS| cS#t$r<00>t
$r }
|
}Yd}
~
<EFBFBD>Zd}
~
wwxYwt jt
|<05><00><00>)a<>Reverse of :meth:`dumps`, raises :exc:`.BadSignature` if the
signature validation fails. If a ``max_age`` is provided it will
ensure the signature is not older than that time in seconds. In
case the signature is outdated, :exc:`.SignatureExpired` is
raised. All arguments are forwarded to the signer's
:meth:`~TimestampSigner.unsign` method.
NT)r'r()r
rZr-<00> load_payloadr r rNrY) rr[r'r(rW<00>last_exception<6F>signer<65>base64dr$r1<00>errs r<00>loadszTimedSerializer.loads<64>s<><00><00> <17>q<EFBFBD>M<EFBFBD>M<EFBFBD><01><1D><0E><1A>)<29>)<29>$<24>/<2F>/<2F> %<25> %<25>F<EFBFBD> %<25>%+<2B>]<5D>]<5D><15>w<EFBFBD><14>&3<>&<12>&<12>"<22><07><19><1F>+<2B>+<2B>G<EFBFBD>4<>4<><07>#<23>.<2E>"<22>I<EFBFBD>-<2D>-<2D>-<2D>-<2D><1E><0E><0E><0E><>#<23> <16> <16> <16><16><1F> %<25> %<25> %<25>!$<24><0E><0E><0E><0E><0E><0E><><EFBFBD><EFBFBD><EFBFBD> %<25><><EFBFBD><EFBFBD><11>g<EFBFBD>l<EFBFBD>N<EFBFBD>3<>3<>3s<00>5A&<02>"A&<02>&B<05>:B<05>Bc<00>6<00>|<00>||d|i<01><02><00>S)Nr')<01> load_kwargs)<01>_loads_unsafe_impl)rr[r'rWs r<00> loads_unsafezTimedSerializer.loads_unsafe<66>s$<00><00> <14>&<26>&<26>q<EFBFBD>$<24>Y<EFBFBD><07><P<>&<26>Q<>Q<>Qrr*)NFN)NN)rErFrGrHrrVrN<00>Type<70>__annotations__<5F>_t_opt_str_bytes<65>IteratorrZrIrMrP<00>AnyrbrOrfrRrSs@rrUrU<00>sD<00><><00><00><00><00><00><00><08><08>0?<3F>N<EFBFBD>B<EFBFBD>G<EFBFBD>O<EFBFBD>,<2C>><3E>><3E>><3E>(,<2C>U<01>U<01>$<24>U<01> <0B><1B>_<EFBFBD> %<25>U<01>U<01>U<01>U<01>U<01>U<01>#<23>!&<26>!%<25> #4<>#4<> <17>#4<><1C>#4<><1F> #4<>
<1F> #4<>
<0C><16> #4<>#4<>#4<>#4<>P#<23>!%<25> R<01>R<01> <17>R<01><1C>R<01><1F> R<01>
<0C><18>$<24><02><06>,<2C> <1F> R<01>R<01>R<01>R<01>R<01>R<01>R<01>RrrU) rrKrNrr<00>encodingrrrr r
r@r r r <00>
serializerrr_rrQr9rJrI<00>OptionalrirrM<00> TYPE_CHECKING<4E>typing_extensions<6E>_terrUr+rr<00><module>rrs<><00><01> <0B> <0B> <0B> <0B> <0A> <0A> <0A> <0A><13><13><13><13><1D><1D><1D><1D><1D><1D><1D><1D><1D><1D><1D><1D>#<23>#<23>#<23>#<23>#<23>#<23>#<23>#<23>#<23>#<23>#<23>#<23>"<22>"<22>"<22>"<22>"<22>"<22>"<22>"<22>"<22>"<22>"<22>"<22> <20> <20> <20> <20> <20> <20><1D><1D><1D><1D><1D><1D>!<21>!<21>!<21>!<21>!<21>!<21>!<21>!<21>!<21>!<21>!<21>!<21>"<22>"<22>"<22>"<22>"<22>"<22><1A><1A><1A><1A><1A><1A><11>x<EFBFBD><03>U<EFBFBD>
<EFBFBD>#<23> <0C><15>;<3B>|<7C>,<2C><10> <0F>[<5B><13> <1D>
<EFBFBD><05><13>$<24>#<23>#<23>#<23>#<23>S<19>S<19>S<19>S<19>S<19>f<EFBFBD>S<19>S<19>S<19>l:R<01>:R<01>:R<01>:R<01>:R<01>j<EFBFBD>:R<01>:R<01>:R<01>:R<01>:Rr