SILENT KILLERPanel

Current Path: > > opt > cloudlinux > venv > lib64 > python3.11 > > site-packages > > jwt


Operation   : Linux premium131.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
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/cloudlinux/venv/lib64/python3.11//site-packages//jwt

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
__init__.py File 1670 bytes April 17 2025 13:10:58.
algorithms.py File 29800 bytes April 17 2025 13:10:58.
api_jwk.py File 4196 bytes April 17 2025 13:10:58.
api_jws.py File 11099 bytes April 17 2025 13:10:58.
api_jwt.py File 12638 bytes April 17 2025 13:10:58.
exceptions.py File 1046 bytes April 17 2025 13:10:58.
help.py File 1749 bytes April 17 2025 13:10:58.
jwk_set_cache.py File 959 bytes April 17 2025 13:10:58.
jwks_client.py File 4222 bytes April 17 2025 13:10:58.
py.typed File 0 bytes April 17 2025 13:10:58.
types.py File 99 bytes April 17 2025 13:10:58.
utils.py File 3903 bytes April 17 2025 13:10:58.
warnings.py File 59 bytes April 17 2025 13:10:58.

Reading File: //opt/cloudlinux/venv/lib64/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
        )

SILENT KILLER Tool