https://github.com/marktennyson/chalice-jwt
JWT based authentication service for Python Chalice micro framework.
https://github.com/marktennyson/chalice-jwt
aws chalice jwt serverless
Last synced: 4 days ago
JSON representation
JWT based authentication service for Python Chalice micro framework.
- Host: GitHub
- URL: https://github.com/marktennyson/chalice-jwt
- Owner: marktennyson
- License: mit
- Created: 2021-04-12T07:05:16.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-09T10:16:50.000Z (about 4 years ago)
- Last Synced: 2025-09-10T10:25:19.492Z (about 1 month ago)
- Topics: aws, chalice, jwt, serverless
- Language: Python
- Homepage: https://pypi.org/project/chalice-jwt/
- Size: 14.6 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Json Web Token based authentication for Python Chalice
# Maintainers wanted# Chalice-JWT
# Downloads
[](https://pepy.tech/project/chalice-jwt) [](https://pepy.tech/project/chalice-jwt/month) [](https://pepy.tech/project/chalice-jwt/week)`chalice-jwt` provides a simple interface for jwt based authentication with AWS Chalice microframework(serverless).
source code available at: https://github.com/marktennyson/chalice-jwt## Usage
```python
from chalice import Chalice
from chalice_jwt import JWTManager
from datetime import timedeltaapp = Chalice(app_name='test-jwt')
jwt = JWTManager(jwtSecret="top-secret-key", app=app)
@app.route('/')
def index():
return {'hello': 'world'}@app.route('/get-token')
def token():
Identity:dict = {"email":"aniketsarkar@yahoo.com"}
return {'token': jwt.create_access_token(identity=Identity, expires_in=timedelta(seconds=60)),}@app.route('/get-identity')
@jwt.its_required
def login():
return jwt.get_jwt_identity()
```## Installation
`chalice-jwt` is available from `pypi`.
#### install using pip
```shell
pip install chalice-jwt
```
#### install from source code
```shell
git clone https://github.com/marktennyson/chalice-jwt && cd chalice-jwt
python setup.py install --user
```## Compatibility
`chalice-jwt` is compatiable with all python3 versions.
Not available for Python version 2.## Contributing
We welcome contributions of all types!