mirror of
https://github.com/d3vyce/fastapi-toolsets.git
synced 2026-08-04 15:44: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
44 lines
1.1 KiB
Markdown
44 lines
1.1 KiB
Markdown
# `security`
|
|
|
|
Here's the reference for the authentication helpers provided by the `security` module.
|
|
|
|
You can import them directly from `fastapi_toolsets.security`:
|
|
|
|
```python
|
|
from fastapi_toolsets.security import (
|
|
AuthSource,
|
|
BearerTokenAuth,
|
|
CookieAuth,
|
|
APIKeyHeaderAuth,
|
|
MultiAuth,
|
|
oauth_build_authorization_redirect,
|
|
oauth_decode_state,
|
|
oauth_encode_state,
|
|
oauth_fetch_userinfo,
|
|
oauth_generate_state_token,
|
|
oauth_resolve_provider_urls,
|
|
)
|
|
```
|
|
|
|
## ::: fastapi_toolsets.security.AuthSource
|
|
|
|
## ::: fastapi_toolsets.security.BearerTokenAuth
|
|
|
|
## ::: fastapi_toolsets.security.CookieAuth
|
|
|
|
## ::: fastapi_toolsets.security.APIKeyHeaderAuth
|
|
|
|
## ::: fastapi_toolsets.security.MultiAuth
|
|
|
|
## ::: fastapi_toolsets.security.oauth_resolve_provider_urls
|
|
|
|
## ::: fastapi_toolsets.security.oauth_fetch_userinfo
|
|
|
|
## ::: fastapi_toolsets.security.oauth_generate_state_token
|
|
|
|
## ::: fastapi_toolsets.security.oauth_build_authorization_redirect
|
|
|
|
## ::: fastapi_toolsets.security.oauth_encode_state
|
|
|
|
## ::: fastapi_toolsets.security.oauth_decode_state
|