graphene-django-jwt-middleware

Middleware to check JWT validation in GraphQL schemas


Keywords
graphene, django, jwt, middleware, graphql
License
MIT
Install
pip install graphene-django-jwt-middleware==0.0.7

Documentation

Graphene Django JWT Middleware

This is a Graphene Django middleware to check JWT in GraphQL schemas.

Installing

with pipenv:

pipenv install graphene-django-jwt-middleware

or poetry:

poetry add graphene-django-jwt-middleware

Usage

In your django settings.py file, find GRAPHENE configuration and insert at the MIDDLEWARE section:

...

GRAPHENE = {
    "SCHEMA": "...",
    'MIDDLEWARE': [
        'graphene_django_jwt_middleware.middleware.JWTAuthorizationMiddleware'
    ]
}

...