hub-core/hub_core/security/context.py

9 lines
336 B
Python
Raw Normal View History

"""Request-scoped, verified authority for transaction attribution (never tokens)."""
from contextvars import ContextVar
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from hub_core.security.boundary import Authorization
current_authorization: ContextVar['Authorization | None'] = ContextVar('hub_authorization', default=None)