mirror of
https://github.com/d3vyce/fastapi-toolsets.git
synced 2026-08-04 23:54:09 +00:00
* feat: add security module * feat(security): add oauth helpers * docs: add authentication example * fix: cleanup + simplify * docs: update module and reference * fix: multiple security bugs + remove example for now * feat: use async_lru for caching * fix: rename nonce by state_token
27 lines
674 B
Python
27 lines
674 B
Python
"""Authentication helpers for FastAPI using Security()."""
|
|
|
|
from .abc import AuthSource
|
|
from .oauth import (
|
|
oauth_build_authorization_redirect,
|
|
oauth_decode_state,
|
|
oauth_encode_state,
|
|
oauth_fetch_userinfo,
|
|
oauth_generate_state_token,
|
|
oauth_resolve_provider_urls,
|
|
)
|
|
from .sources import APIKeyHeaderAuth, BearerTokenAuth, CookieAuth, MultiAuth
|
|
|
|
__all__ = [
|
|
"APIKeyHeaderAuth",
|
|
"AuthSource",
|
|
"BearerTokenAuth",
|
|
"CookieAuth",
|
|
"MultiAuth",
|
|
"oauth_build_authorization_redirect",
|
|
"oauth_decode_state",
|
|
"oauth_encode_state",
|
|
"oauth_fetch_userinfo",
|
|
"oauth_generate_state_token",
|
|
"oauth_resolve_provider_urls",
|
|
]
|