https://github.com/zemfrog/zemfrog-auth
Authentication for the zemfrog framework
https://github.com/zemfrog/zemfrog-auth
zemfrog
Last synced: 8 months ago
JSON representation
Authentication for the zemfrog framework
- Host: GitHub
- URL: https://github.com/zemfrog/zemfrog-auth
- Owner: zemfrog
- License: mit
- Created: 2021-03-30T22:13:28.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-09T21:07:07.000Z (about 5 years ago)
- Last Synced: 2025-10-05T19:55:31.303Z (8 months ago)
- Topics: zemfrog
- Language: Python
- Homepage:
- Size: 62.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zemfrog-auth
Authentication for the zemfrog framework
Currently only supports JWT (JSON Web Token) authentication.
# Features
* JWT Authentication Blueprint
* Event signal support for user information (login, register, etc)
Usage
=====
Install the module
```sh
pip install zemfrog-auth
```
Add jwt blueprints to your zemfrog application
```python
BLUEPRINTS = ["zemfrog_auth.jwt"]
```
Using event signals
-------------------
In this section I will give an example of using the event signal using a blinker.
```python
# Add this to wsgi.py
from zemfrog_auth.signals import on_user_logged_in
@on_user_logged_in.connect
def on_logged_in(user):
print("Signal user logged in:", user)
```
For a list of available signals, you can see it [here](https://github.com/zemfrog/zemfrog-auth/blob/main/zemfrog_auth/signals.py).
For signal documentation you can visit [here](https://pythonhosted.org/blinker/).