Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/bavspeed/venvxxx/lib/python3.12/site-packages/rest_framework_simplejwt/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/bavspeed/venvxxx/lib/python3.12/site-packages/rest_framework_simplejwt/exceptions.py

from typing import Any, Optional, Union

from django.utils.translation import gettext_lazy as _
from rest_framework import exceptions, status


class TokenError(Exception):
    pass


class ExpiredTokenError(TokenError):
    pass


class TokenBackendError(Exception):
    pass


class TokenBackendExpiredToken(TokenBackendError):
    pass


class DetailDictMixin:
    default_detail: str
    default_code: str

    def __init__(
        self,
        detail: Union[dict[str, Any], str, None] = None,
        code: Optional[str] = None,
    ) -> None:
        """
        Builds a detail dictionary for the error to give more information to API
        users.
        """
        detail_dict = {"detail": self.default_detail, "code": self.default_code}

        if isinstance(detail, dict):
            detail_dict.update(detail)
        elif detail is not None:
            detail_dict["detail"] = detail

        if code is not None:
            detail_dict["code"] = code

        super().__init__(detail_dict)  # type: ignore


class AuthenticationFailed(DetailDictMixin, exceptions.AuthenticationFailed):
    pass


class InvalidToken(AuthenticationFailed):
    status_code = status.HTTP_401_UNAUTHORIZED
    default_detail = _("Token is invalid or expired")
    default_code = "token_not_valid"

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net