Releases: yezz123/authx
🔖 0.3.1 - SessionStorage
Session
This is a supported Redis Based Session Storage for your FastAPI Application, you can use it with any Session Backend.
pip install authx[session]Note: The requirements in authx[redis] are not the same used in Sessions features.
Features
- Dependency injection to protect routes
- Compatible with FastAPI's auto-generated docs
- Pydantic models for verifying session data
- Abstract session backend so you can build one that fits your needs
- Abstract frontends to choose how you extract the session ids (cookies, header, etc.)
- Create verifiers based on the session data.
- Compatible with any Redis Configuration.
Redis Configuration
Before setting up our Sessions Storage and our CRUD Backend, we need to configure our Redis Instance.
BasicConfig is a function that helps us set up the Instance Information like Redis Link Connection or ID Name or Expiration Time.
Default Config
- url of Redis:
redis://localhost:6379/0 - name of sessionId:
ssid - generator function of
sessionId:lambda :uuid.uuid4().hex - expire time of session in redis:
6 hours
import random
from datetime import timedelta
from authx.cache import basicConfig
basicConfig(
redisURL="redis://localhost:6379/1",
sessionIdName="sessionId",
sessionIdGenerator=lambda: str(random.randint(1000, 9999)),
expireTime=timedelta(days=1),
)- Read the Changelog https://authx.yezz.codes/release/
What's Changed
- chore(dev): Add Sessions Requirements by @yezz123 in #207
- chore(docs): Documented the Functionality of Session Storing by @yezz123 in #208
Full Changelog: 0.3.0...0.3.1
0.3.0
What's Changed
Release Notes
Finally, we drop the full support from MongoDB Thanks to @stephane That's implemented some functionality under the name of BaseDBBackend and Create some Database Crud Functionality without a database.
- Database Plugins:
-
MongoDB: Using MongoDB as a Database Backend is now supported as a plugin based on
BaseDBBackend. -
EncodeDB: Databases give you simple asyncio support for a range of databases.
It allows you to make queries using the powerful
SQLAlchemy Coreexpression language and provides support forPostgreSQL,MySQL, andSQLite.We can now provide some SQL queries to the database on the top of
BaseDBBackend.
-
MongoDB
from authx import MongoDBBackendEncodeDB
from authx import EncodeDBBackendNote: Don't forget to set up the database connection as a client that will be functioned under pre-built Methods.
- Improve the package by Switching to
flitto build the package.- Improve Workflow and integrate
codecov.yml. - Use the issue of new Functionalities in Github.
- Create New Directory called
scriptsto store the shell scripts to run tests or linting.
- Improve Workflow and integrate
- Improve Importing the package https://github.com/yezz123/authx/blob/main/authx/__init__.py.
- Calling the function or the class directly from the
__init__.pyfile.
- Calling the function or the class directly from the
- Improve Documentation, and Describe different new Addons, that AuthX now provide such as new Database Backends or Plugins or the new middleware add-ons, Thanks to @AbderrahimSoubaiElidrissi
- Update and upgrade Dependencies.
- Inline and improve IDLE Support.
Full Changelog: 0.2.0...0.3.0
Support Oauth2 Middleware 🎉
What's Changed
Middleware - Oauth2
The OAuth 2.0 authorization framework is a protocol that allows a user to grant a third-party website or application access to the user's protected resources, without necessarily revealing their long-term credentials or even their identity.
Starlette middleware for authentication through oauth2's via a secret key, which is often used to add authentication and authorization to a web application that interacts with an API on behalf of the user.
That's why AuthX provides a Configuration MiddlewareOauth2 to configure the OAuth2 middleware.
from authx import MiddlewareOauth2
class AuthenticateMiddleware(MiddlewareOauth2):
PUBLIC_PATHS = {"/public"}Code Enhancement
- Remove unnecessary calls to
enumeratewhen the index variable is not used. by @yezz123 in #179 - chore: Create a Basic Example to serve the utility of AuthX by @yezz123 in #178
- Clean DocString & Define Functions by @yezz123 in #189
Full Changelog: 0.1.4...0.2.0
0.1.4✨
Bump PyJWT version from 1.7.1 to 2.3.0 ✨
What's Changed
- chore: add sameSite attribute to the http only cookie by @smakosh in #134
- docs: add smakosh as a contributor for code, security by @allcontributors in #138
- chore: update Requirements ✨ by @yezz123 in #139
- CI: Add Code Security Analyse ✨ by @yezz123 in #140
- empty Scheduled daily dependency update on Tuesday by @pyup-bot in #141
- chore: Add JWT Algorithm Choices ✨ by @yezz123 in #143
- Docs: Add financial Supporters ✨ by @yezz123 in #144
- Bump PyJWT version from 1.7.1 to 2.3.0 by @mojixcoder in #151
- docs: add MojixCoder as a contributor for code, bug by @allcontributors in #152
- chore: Remove Todos assign 🖇 by @yezz123 in #153
- Upgrade
pre-commitrequirements ✨ by @yezz123 in #154
New Contributors
- @smakosh made their first contribution in #134
- @mojixcoder made their first contribution in #151
Full Changelog: 0.1.2...0.1.3
pep-0008: Fix Package and Module Names ✨
After this discussion #124 with @stephane we need to change the package name that what pep's rules provide.
Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged.
What's Changed
- Bump mkdocs-material from 7.2.6 to 7.3.5 by @dependabot in #101
- Docs: Prepare Project for Being Public ✨ by @yezz123 in #102
- Bump mkdocs-material from 7.3.5 to 7.3.6 by @dependabot in #103
- Bump python from 3.9.2 to 3.10.0 by @dependabot in #104
- docs: add yezz123 as a contributor for code, doc, maintenance, infra by @allcontributors in #105
- docs: add AbderrahimSoubaiElidrissi as a contributor for review, doc by @allcontributors in #106
- CI: Delete Docs Build ✨ by @yezz123 in #108
- Docs: Delete a part of FAQ ✨ by @yezz123 in #109
- chore: Fix workflows ✨ by @yezz123 in #112
- chore: Rename Website name & Fix Build Issue 🚀 by @yezz123 in #113
- Chore: Delete
aiohttpby @yezz123 in #114 - WIP: Add Code owner 🖇 by @yezz123 in #117
- Chore: Fix Key Directory 🔑 by @yezz123 in #115
- Configure
.pyup✨ by @yezz123 in #120 - pep-0008: Fix Package and Module Names✨ by @yezz123 in #126
- chore: Change project Name by @yezz123 in #128
- chore: fix dockerfile commands by @yezz123 in #130
- Chore: change Name from
AuthXtoauthx✨ by @yezz123 in #131 - Bump version from 0.1.1 to 0.1.2 ✨ by @yezz123 in #132
New Contributors
- @allcontributors made their first contribution in #105
Full Changelog: 0.1.1...0.1.2
Fix Partial Database Route ✨
- Kuddos to @AbderrahimSoubaiElidrissi for fixing multiple issues in docs ✨
- Fix Database partial router.
- Now we can call the
cacheormongoonly from a partial router.
Example:
What's Changed
- Add a partial router to Database ✨ by @yezz123 in #97
- Docs: Update documentation by @yezz123 in #98
- Bump from 0.1.0 to 0.1.1 ✨ by @yezz123 in #99
Full Changelog: 0.1.0...0.1.1
Bump to py3.10 ✨
Code Coverage ✨
What's Changed
- Bump mkdocs from 1.2.2 to 1.2.3 by @dependabot in #78
- Bump pytest-asyncio from 0.14.0 to 0.16.0 by @dependabot in #77
- 🐳 DockerFile Checker ✨ by @yezz123 in #80
- chore: Provide DocString for Functions ✨ by @yezz123 in #84
- Docs: Create a Release Notes ✨ by @yezz123 in #85
- Chore: Add Local Testing & Code Coverage ✨ by @yezz123 in #86
- Docs: Add Coverage Badge ✨ by @yezz123 in #87
- ⬆️ Bump Version from 0.0.8 to 0.0.9 by @yezz123 in #88
Full Changelog: 0.0.8...0.0.9
Switch License ✨
What's Changed
- Fix Highlighting Issue ✨ by @yezz123 in #69
- Docs: Add some Typo ✨ by @yezz123 in #70
- Add Code of Conducts & License ✨ by @yezz123 in #71
- Switch to MIT License ✨ by @yezz123 in #73
- Test Documentation Build ✨ by @yezz123 in #74
- ⬆️ Bump from 0.0.7 to 0.0.8 ✨ by @yezz123 in #75
Full Changelog: 0.0.7...0.0.8

