MCPcopy Index your code
hub / github.com/vastsa/FileCodeBox / get_admin_session

Function get_admin_session

apps/admin/dependencies.py:93–102  ·  view source on GitHub ↗
(authorization: str = Header(default=None))

Source from the content-addressed store, hash-verified

91
92
93def get_admin_session(authorization: str = Header(default=None)) -> dict:
94 token = _extract_bearer_token(authorization)
95 payload = _require_admin_payload(authorization)
96 return {
97 "id": "admin",
98 "username": "admin",
99 "token": token,
100 "token_type": "Bearer",
101 "expires_at": payload.get("exp"),
102 }
103
104
105ADMIN_PUBLIC_ENDPOINTS = {("POST", "/admin/login")}

Callers

nothing calls this directly

Calls 2

_extract_bearer_tokenFunction · 0.85
_require_admin_payloadFunction · 0.85

Tested by

no test coverage detected