Buckets:

download
raw
646 Bytes
from fastapi import Request, Response
from fastapi_fullauth.backends.base import AbstractBackend
class BearerBackend(AbstractBackend):
async def read_token(self, request: Request) -> str | None:
auth = request.headers.get("Authorization")
if auth and auth[:7].lower() == "bearer ":
return auth[7:]
return None
async def write_token(self, response: Response, token: str) -> None:
# Bearer tokens are returned in the response body, not set on the response.
pass
async def delete_token(self, response: Response) -> None:
# Nothing to clear for bearer tokens.
pass

Xet Storage Details

Size:
646 Bytes
·
Xet hash:
4d1d85ef366557923a5642971725f4f6aa6edca9a3ca248c9cebe34500670aa9

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.