weenspace-django-jwt


Nameweenspace-django-jwt JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/WeenSpace/weenspacce-django-jwt
SummaryJSON Web Token for Django REST and GraphQL.
upload_time2023-03-15 09:44:01
maintainer
docs_urlNone
authorHuynh Doan Thinh
requires_python>=3.10.0,<4.0.0
licenseMIT
keywords django jwt api rest graphql
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <a href="https://github.com/WeenSpace/weenspace-django-jwt/"><img width="420px" src="https://github.com/WeenSpace/weenspace-django-jwt/_static/logo.png" alt='Django GraphQL JWT'></a>
</p>

<p align="center">
    JSON Web Token authentication for Django GraphQL.
    <br>Fantastic <strong>documentation</strong> is available at <a href="https://github.com/WeenSpace/weenspace-django-jwt">https://github.com/WeenSpace/weenspace-django-jwt</a>.
</p>
<p align="center">
    <a href="https://github.com/WeenSpace/weenspace-django-jwt/actions">
        <img src="https://github.com/WeenSpace/weenspace-django-jwt/actions/workflows/test-suite.yml/badge.svg" alt="Test">
    </a>
    <a href="https://codecov.io/gh/flavors/weenspace-django-jwt">
        <img src="https://img.shields.io/codecov/c/github/flavors/weenspace-django-jwt?color=%2334D058" alt="Coverage">
    </a>
    <a href="https://www.codacy.com/gh/flavors/weenspace-django-jwt/dashboard">
        <img src="https://app.codacy.com/project/badge/Grade/4f9fd439fbc74be88a215b9ed2abfcf9" alt="Codacy">
    </a>
    <a href="https://pypi.python.org/pypi/weenspace-django-jwt">
        <img src="https://img.shields.io/pypi/v/weenspace-django-jwt.svg" alt="Package version">
    </a>
</p>

## Installation

Install last stable version from Pypi:

```sh
pip install weenspace-django-jwt
```

Add `AuthenticationMiddleware` middleware to your *MIDDLEWARE* settings:


```py
MIDDLEWARE = [
    # ...
    "django.contrib.auth.middleware.AuthenticationMiddleware",
    # ...
]
```

Add `JWTMiddleware` middleware to your *GRAPHENE* settings:

```py
GRAPHENE = {
    "SCHEMA": "mysite.myschema.schema",
    "MIDDLEWARE": [
        "django_jwt.middleware.JWTMiddleware",
    ],
}
```

Add `JWTBackend` backend to your *AUTHENTICATION_BACKENDS*:

```py
AUTHENTICATION_BACKENDS = [
    "django_jwt.backends.JWTBackend",
    "django.contrib.auth.backends.ModelBackend",
]
```

## Schema

Add *weenspace-django-jwt* mutations to the root schema:

```py
import graphene
import django_jwt


class Mutation(graphene.ObjectType):
    create_token = django_jwt.Create.Field()
    verify_token = django_jwt.Verify.Field()
    refresh_token = django_jwt.Refresh.Field()


schema = graphene.Schema(mutation=Mutation)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/WeenSpace/weenspacce-django-jwt",
    "name": "weenspace-django-jwt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10.0,<4.0.0",
    "maintainer_email": "",
    "keywords": "django,jwt,API,REST,GraphQL",
    "author": "Huynh Doan Thinh",
    "author_email": "hdthinh@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d9/6a/5d93cdd512a954b7a80dd2bc5a293bcc76839809042464ce5146dd3ae46d/weenspace_django_jwt-1.0.1.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <a href=\"https://github.com/WeenSpace/weenspace-django-jwt/\"><img width=\"420px\" src=\"https://github.com/WeenSpace/weenspace-django-jwt/_static/logo.png\" alt='Django GraphQL JWT'></a>\n</p>\n\n<p align=\"center\">\n    JSON Web Token authentication for Django GraphQL.\n    <br>Fantastic <strong>documentation</strong> is available at <a href=\"https://github.com/WeenSpace/weenspace-django-jwt\">https://github.com/WeenSpace/weenspace-django-jwt</a>.\n</p>\n<p align=\"center\">\n    <a href=\"https://github.com/WeenSpace/weenspace-django-jwt/actions\">\n        <img src=\"https://github.com/WeenSpace/weenspace-django-jwt/actions/workflows/test-suite.yml/badge.svg\" alt=\"Test\">\n    </a>\n    <a href=\"https://codecov.io/gh/flavors/weenspace-django-jwt\">\n        <img src=\"https://img.shields.io/codecov/c/github/flavors/weenspace-django-jwt?color=%2334D058\" alt=\"Coverage\">\n    </a>\n    <a href=\"https://www.codacy.com/gh/flavors/weenspace-django-jwt/dashboard\">\n        <img src=\"https://app.codacy.com/project/badge/Grade/4f9fd439fbc74be88a215b9ed2abfcf9\" alt=\"Codacy\">\n    </a>\n    <a href=\"https://pypi.python.org/pypi/weenspace-django-jwt\">\n        <img src=\"https://img.shields.io/pypi/v/weenspace-django-jwt.svg\" alt=\"Package version\">\n    </a>\n</p>\n\n## Installation\n\nInstall last stable version from Pypi:\n\n```sh\npip install weenspace-django-jwt\n```\n\nAdd `AuthenticationMiddleware` middleware to your *MIDDLEWARE* settings:\n\n\n```py\nMIDDLEWARE = [\n    # ...\n    \"django.contrib.auth.middleware.AuthenticationMiddleware\",\n    # ...\n]\n```\n\nAdd `JWTMiddleware` middleware to your *GRAPHENE* settings:\n\n```py\nGRAPHENE = {\n    \"SCHEMA\": \"mysite.myschema.schema\",\n    \"MIDDLEWARE\": [\n        \"django_jwt.middleware.JWTMiddleware\",\n    ],\n}\n```\n\nAdd `JWTBackend` backend to your *AUTHENTICATION_BACKENDS*:\n\n```py\nAUTHENTICATION_BACKENDS = [\n    \"django_jwt.backends.JWTBackend\",\n    \"django.contrib.auth.backends.ModelBackend\",\n]\n```\n\n## Schema\n\nAdd *weenspace-django-jwt* mutations to the root schema:\n\n```py\nimport graphene\nimport django_jwt\n\n\nclass Mutation(graphene.ObjectType):\n    create_token = django_jwt.Create.Field()\n    verify_token = django_jwt.Verify.Field()\n    refresh_token = django_jwt.Refresh.Field()\n\n\nschema = graphene.Schema(mutation=Mutation)\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "JSON Web Token for Django REST and GraphQL.",
    "version": "1.0.1",
    "split_keywords": [
        "django",
        "jwt",
        "api",
        "rest",
        "graphql"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "380085741b941c9e3f67bc9bda0203ec5ab6947b39fabdd887c8c387d878023d",
                "md5": "63cb579a92b1d4e690126543044574cf",
                "sha256": "dc3c1e2398fe5902d92e40ef95356c8abf24263c7e60c7bb9a0f838f578a2d05"
            },
            "downloads": -1,
            "filename": "weenspace_django_jwt-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "63cb579a92b1d4e690126543044574cf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10.0,<4.0.0",
            "size": 47497,
            "upload_time": "2023-03-15T09:43:58",
            "upload_time_iso_8601": "2023-03-15T09:43:58.745518Z",
            "url": "https://files.pythonhosted.org/packages/38/00/85741b941c9e3f67bc9bda0203ec5ab6947b39fabdd887c8c387d878023d/weenspace_django_jwt-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d96a5d93cdd512a954b7a80dd2bc5a293bcc76839809042464ce5146dd3ae46d",
                "md5": "6bc520f65227dc0e492b00a1ce2134ab",
                "sha256": "d52b8c8735f23c9c29d8a9bc6f90a63c9b260239e0a0f18bf1a70f4575441366"
            },
            "downloads": -1,
            "filename": "weenspace_django_jwt-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "6bc520f65227dc0e492b00a1ce2134ab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10.0,<4.0.0",
            "size": 21922,
            "upload_time": "2023-03-15T09:44:01",
            "upload_time_iso_8601": "2023-03-15T09:44:01.042974Z",
            "url": "https://files.pythonhosted.org/packages/d9/6a/5d93cdd512a954b7a80dd2bc5a293bcc76839809042464ce5146dd3ae46d/weenspace_django_jwt-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-15 09:44:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "WeenSpace",
    "github_project": "weenspacce-django-jwt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "weenspace-django-jwt"
}
        
Elapsed time: 0.05225s