Metadata-Version: 1.1
Name: django-graphql-jwt
Version: 0.2.1
Summary: JSON Web Token for Django GraphQL
Home-page: https://github.com/flavors/django-graphql-jwt
Author: mongkok
Author-email: domake.io@gmail.com
License: MIT
Description: Django GraphQL JWT
        ==================
        
        |Pypi| |Build Status| |Codecov| |Code Climate|
        
        
        `JSON Web Token <https://jwt.io/>`_ authentication for `Django GraphQL <https://github.com/graphql-python/graphene-django>`_
        
        
        Installation
        ------------
        
        Install last stable version from Pypi:
        
        ::
        
            pip install django-graphql-jwt
        
        Add ``AuthenticationMiddleware`` middleware to your *MIDDLEWARE* settings:
        
        .. code:: python
        
            MIDDLEWARE = [
                ...
                'django.contrib.auth.middleware.AuthenticationMiddleware',
                ...
            ]
        
        Add ``JSONWebTokenMiddleware`` middleware to your *GRAPHENE* settings:
        
        .. code:: python
        
            GRAPHENE = {
                'SCHEMA': 'mysite.myschema.schema',
                'MIDDLEWARE': [
                    'graphql_jwt.middleware.JSONWebTokenMiddleware',
                ],
            }
        
        Add ``JSONWebTokenBackend`` backend to your *AUTHENTICATION_BACKENDS*:
        
        .. code:: python
        
            AUTHENTICATION_BACKENDS = [
                'graphql_jwt.backends.JSONWebTokenBackend',
                'django.contrib.auth.backends.ModelBackend',
            ]
        
        
        Schema
        ------
        
        Add *django-graphql-jwt* mutations to the root schema:
        
        .. code:: python
        
            import graphene
            import graphql_jwt
        
        
            class Mutation(graphene.ObjectType):
                token_auth = graphql_jwt.ObtainJSONWebToken.Field()
                verify_token = graphql_jwt.Verify.Field()
                refresh_token = graphql_jwt.Refresh.Field()
        
        
            schema = graphene.Schema(mutation=Mutation)
        
        
        Documentation
        -------------
        
        Fantastic documentation is available at https://django-graphql-jwt.domake.io.
        
        
        .. |Pypi| image:: https://img.shields.io/pypi/v/django-graphql-jwt.svg
           :target: https://pypi.python.org/pypi/django-graphql-jwt
           :alt: Pypi
        
        .. |Build Status| image:: https://travis-ci.org/flavors/django-graphql-jwt.svg?branch=master
           :target: https://travis-ci.org/flavors/django-graphql-jwt
           :alt: Build Status
        
        .. |Codecov| image:: https://img.shields.io/codecov/c/github/flavors/django-graphql-jwt.svg
           :target: https://codecov.io/gh/flavors/django-graphql-jwt
           :alt: Codecov
        
        .. |Code Climate| image:: https://api.codeclimate.com/v1/badges/c79a185d546f7e34fdd6/maintainability
           :target: https://codeclimate.com/github/flavors/django-graphql-jwt
           :alt: Codeclimate
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Framework :: Django
Classifier: Framework :: Django :: 1.11
Classifier: Framework :: Django :: 2.0
Classifier: Framework :: Django :: 2.1
Classifier: Framework :: Django :: 2.2
