Metadata-Version: 2.1
Name: yhttp-auth
Version: 2.0.0
Summary: A very micro http framework.
Home-page: http://github.com/yhttp/yhttp-auth
Author: Vahid Mardani
Author-email: vahid.mardani@gmail.com
License: MIT
Description: # yhttp-auth
        
        [![PyPI](http://img.shields.io/pypi/v/yhttp-auth.svg)](https://pypi.python.org/pypi/yhttp-auth)
        [![Build](https://github.com/yhttp/yhttp-auth/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/yhttp/yhttp-auth/actions/workflows/build.yml)
        [![Coverage Status](https://coveralls.io/repos/github/yhttp/yhttp-auth/badge.svg?branch=master)](https://coveralls.io/github/yhttp/yhttp-auth?branch=master)
        
        
        Authentication extension for [yhttp](https://github.com/yhttp/yhttp).
        
        
        ### Install
        
        ```bash
        pip install yhttp-pony
        ```
        
        
        ### Usage
        
        ```python
        from yhttp import Application
        from yhttp.ext.auth import install as auth_install
        
        
        app = Application()
        auth = auth_install(app)
        app.settings.merge(f'''
        jwt:
          secret: 12345678
        ''')
        
        
        @app.route()
        @auth()
        @text
        def get(req):
            return req.identity.name
        
        
        @app.route('/admin')
        @auth(roles='admin, god')
        @json
        def get(req):
            return req.identity.roles
        
        
        app.ready()
        ```
        
        ### Command line interface
        
        setup.py
        
        ```python
        
        setup(
            ...
            entry_points={
                'console_scripts': [
                    'myapp = myapp:app.climain'
                ]
            },
            ...
        )
        
        ```
        
        ```bash
        myapp jwt --help
        ```
        
Platform: UNKNOWN
Classifier: Environment :: Console
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Software Development
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
