Repository navigation
Releases: rb58853/fastauth-api
Releases · rb58853/fastauth-api
Release list
v0.0.3
version 0.0.3 ⚙️
-
🏗️ New Structure: The
set_auth()function has been replaced with a new class calledFastauth(). From now on, it should be used in the wayFastauth().set_auth(...). -
⚙️ Customizable FastauthSettings via Parameters: The
FastauthSettingscan now be customized through parameters. It is possible to pass settings directly to the class:Fastauth(settings: FastauthSettings | dict). These options follow exactly the same configuration and format as defined in thefastauth.configfile.class FastauthSettings(BaseModel): app_name: str = "fastauth-api" database_api_path: str | None = None master_token: str | None = None cryptography_key: str | None = None headers: dict | None = None master_token_paths: list | None = [] access_token_paths: list | None = []
v0.0.2
What is new ?
- 🔌Master Token WebSocket integration: Master token integration for using the WebSocket decorator. You can now choose between access or master token. see example
v0.0.1
Start Project
- 🔐 Token-based authentication system (Access + Refresh) with endpoints ready: check the
/authrouter and the/token/newand/token/refreshendpoints in auth.py. - ⚙️ Easy integration with
FastAPI: functionset_auth(app)applies middleware, registers routes and replaces the OpenAPI with FastauthOpenAPI. - 🛡 Configurable middleware: Master / Access level protection based on routes defined in the configuration. Supports validation of MASTER-TOKEN and ACCESS-TOKEN headers.
- 🧾 Flexible configuration: values from
fastauth.config.jsonor environment variables (.env). - 🔑 Basic key management and utilities:
- Generate
CRYPTOGRAPHY_KEYwithgenerate_cryptography_key(). - Read/write variables in
.envusingwritekey2env(...).
- Generate
- 🧠 JWT tokens signed with HS256 and payloads containing
client_id,type,iat,exp. - 💾 Decoupled token persistence:
save_token/load_access_tokeninteract with an external API configurable via"database-api-path"in the configuration file. - 🔌 WebSocket support: authentication decorator for websockets (checks ACCESS-TOKEN in headers).
- 🧰 Extensible:
TokenRoutercan be extended to customize token generation/renewal; middleware and OpenAPI are easily replaceable/adjustable.