Metadata-Version: 2.1
Name: fly_jwt
Version: 0.2.0
Summary: JWT library for fly
Home-page: https://github.com/tatsuya4649/fly_jwt
Author: tatsuya.s
License: MIT
Description: 
        # fly-jwt
        
        ![Test](https://github.com/tatsuya4649/fly_jwt/actions/workflows/test.yaml/badge.svg)
        
        fly-jwt is JWT library for [fly](https://github.com/tatsuya4649/fly).
        
        ## Hello World
        
        ```python
        
        from fly import Fly
        from fly.types import Request
        from fly_jwt import require_jwt
        
        app = Fly()
        
        def auth_handler(payload):
            return payload["username"] is "test_user"
        
        @app.get("/")
        @require_jwt(
            algorithm="HS256",
            private_key="secret",
            auth_handler=auth_handler
        )
        def hello(jwt_payload: Request):
            return f"Hello World {jwt_payload["username"]}"
        
        ```
        
        client send request.
        
        ```bash
        
        GET / HTTP1.1
        .
        . 
        .
        Authorization: Bearer `JWT TOKEN`
        
        ```
        
        if authentication successed, execute `hello` function.
        
        if authentication failed, return 401 response.
        
        # Dependency
        
        * fly >= 1.3.0
        
        * cryptography
        
        * PyJWT
        
Keywords: fly,jwt,security
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Internet
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Classifier: Topic :: Security
Classifier: Topic :: System :: Networking
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Provides-Extra: develop
