From 83ac627e2ffffb00b9e663d0287a1ba4ffe6391c Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 10 Apr 2023 19:33:13 +0000 Subject: automatic import of python-django-graphql-jwt --- .gitignore | 1 + python-django-graphql-jwt.spec | 313 +++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 315 insertions(+) create mode 100644 python-django-graphql-jwt.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..d62ca74 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/django-graphql-jwt-0.3.4.tar.gz diff --git a/python-django-graphql-jwt.spec b/python-django-graphql-jwt.spec new file mode 100644 index 0000000..f18a64f --- /dev/null +++ b/python-django-graphql-jwt.spec @@ -0,0 +1,313 @@ +%global _empty_manifest_terminate_build 0 +Name: python-django-graphql-jwt +Version: 0.3.4 +Release: 1 +Summary: JSON Web Token for Django GraphQL. +License: MIT +URL: https://github.com/flavors/django-graphql-jwt +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/cd/8f/1bf2b7dc8b32b257e5d988820242562bda4318c00abed3d95fc37ca986ca/django-graphql-jwt-0.3.4.tar.gz +BuildArch: noarch + +Requires: python3-Django +Requires: python3-graphene +Requires: python3-graphene-django +Requires: python3-PyJWT + +%description +

+ Django GraphQL JWT +

+ +

+ JSON Web Token authentication for Django GraphQL. +
Fantastic documentation is available at https://django-graphql-jwt.domake.io. +

+

+ + Test + + + Coverage + + + Codacy + + + Package version + +

+ +## Installation + +Install last stable version from Pypi: + +```sh +pip install django-graphql-jwt +``` + +Add `AuthenticationMiddleware` middleware to your *MIDDLEWARE* settings: + + +```py +MIDDLEWARE = [ + # ... + "django.contrib.auth.middleware.AuthenticationMiddleware", + # ... +] +``` + +Add `JSONWebTokenMiddleware` middleware to your *GRAPHENE* settings: + +```py +GRAPHENE = { + "SCHEMA": "mysite.myschema.schema", + "MIDDLEWARE": [ + "graphql_jwt.middleware.JSONWebTokenMiddleware", + ], +} +``` + +Add `JSONWebTokenBackend` backend to your *AUTHENTICATION_BACKENDS*: + +```py +AUTHENTICATION_BACKENDS = [ + "graphql_jwt.backends.JSONWebTokenBackend", + "django.contrib.auth.backends.ModelBackend", +] +``` + +## Schema + +Add *django-graphql-jwt* mutations to the root schema: + +```py +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) +``` + + +%package -n python3-django-graphql-jwt +Summary: JSON Web Token for Django GraphQL. +Provides: python-django-graphql-jwt +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-django-graphql-jwt +

+ Django GraphQL JWT +

+ +

+ JSON Web Token authentication for Django GraphQL. +
Fantastic documentation is available at https://django-graphql-jwt.domake.io. +

+

+ + Test + + + Coverage + + + Codacy + + + Package version + +

+ +## Installation + +Install last stable version from Pypi: + +```sh +pip install django-graphql-jwt +``` + +Add `AuthenticationMiddleware` middleware to your *MIDDLEWARE* settings: + + +```py +MIDDLEWARE = [ + # ... + "django.contrib.auth.middleware.AuthenticationMiddleware", + # ... +] +``` + +Add `JSONWebTokenMiddleware` middleware to your *GRAPHENE* settings: + +```py +GRAPHENE = { + "SCHEMA": "mysite.myschema.schema", + "MIDDLEWARE": [ + "graphql_jwt.middleware.JSONWebTokenMiddleware", + ], +} +``` + +Add `JSONWebTokenBackend` backend to your *AUTHENTICATION_BACKENDS*: + +```py +AUTHENTICATION_BACKENDS = [ + "graphql_jwt.backends.JSONWebTokenBackend", + "django.contrib.auth.backends.ModelBackend", +] +``` + +## Schema + +Add *django-graphql-jwt* mutations to the root schema: + +```py +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) +``` + + +%package help +Summary: Development documents and examples for django-graphql-jwt +Provides: python3-django-graphql-jwt-doc +%description help +

+ Django GraphQL JWT +

+ +

+ JSON Web Token authentication for Django GraphQL. +
Fantastic documentation is available at https://django-graphql-jwt.domake.io. +

+

+ + Test + + + Coverage + + + Codacy + + + Package version + +

+ +## Installation + +Install last stable version from Pypi: + +```sh +pip install django-graphql-jwt +``` + +Add `AuthenticationMiddleware` middleware to your *MIDDLEWARE* settings: + + +```py +MIDDLEWARE = [ + # ... + "django.contrib.auth.middleware.AuthenticationMiddleware", + # ... +] +``` + +Add `JSONWebTokenMiddleware` middleware to your *GRAPHENE* settings: + +```py +GRAPHENE = { + "SCHEMA": "mysite.myschema.schema", + "MIDDLEWARE": [ + "graphql_jwt.middleware.JSONWebTokenMiddleware", + ], +} +``` + +Add `JSONWebTokenBackend` backend to your *AUTHENTICATION_BACKENDS*: + +```py +AUTHENTICATION_BACKENDS = [ + "graphql_jwt.backends.JSONWebTokenBackend", + "django.contrib.auth.backends.ModelBackend", +] +``` + +## Schema + +Add *django-graphql-jwt* mutations to the root schema: + +```py +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) +``` + + +%prep +%autosetup -n django-graphql-jwt-0.3.4 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-django-graphql-jwt -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon Apr 10 2023 Python_Bot - 0.3.4-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..4b8c408 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +2f5418d499d9d5db1fae3920cb019e21 django-graphql-jwt-0.3.4.tar.gz -- cgit v1.2.3