Current Path: > > opt > cloudlinux > venv > lib64 > python3.11 > site-packages > aiohttp_security >
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 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
__pycache__ | Directory | - | - | |
__init__.py | File | 791 bytes | April 17 2025 13:10:59. | |
abc.py | File | 1489 bytes | April 17 2025 13:10:59. | |
api.py | File | 5886 bytes | April 17 2025 13:10:59. | |
cookies_identity.py | File | 887 bytes | April 17 2025 13:10:59. | |
jwt_identity.py | File | 1205 bytes | April 17 2025 13:10:59. | |
session_identity.py | File | 1113 bytes | April 17 2025 13:10:59. |
"""Identity policy for storing info in the jwt token. """ from .abc import AbstractIdentityPolicy try: import jwt except ImportError: # pragma: no cover jwt = None AUTH_HEADER_NAME = 'Authorization' AUTH_SCHEME = 'Bearer ' class JWTIdentityPolicy(AbstractIdentityPolicy): def __init__(self, secret, algorithm='HS256'): if jwt is None: raise RuntimeError('Please install `PyJWT`') self.secret = secret self.algorithm = algorithm async def identify(self, request): header_identity = request.headers.get(AUTH_HEADER_NAME) if header_identity is None: return if not header_identity.startswith(AUTH_SCHEME): raise ValueError('Invalid authorization scheme. ' + 'Should be `Bearer <token>`') token = header_identity.split(' ')[1].strip() identity = jwt.decode(token, self.secret, algorithms=[self.algorithm]) return identity async def remember(self, *args, **kwargs): # pragma: no cover pass async def forget(self, request, response): # pragma: no cover pass
SILENT KILLER Tool