%global _empty_manifest_terminate_build 0 Name: python-dj-rest-auth Version: 3.0.0 Release: 1 Summary: Authentication and Registration in Django Rest Framework License: MIT URL: http://github.com/iMerica/dj-rest-auth Source0: https://mirrors.nju.edu.cn/pypi/web/packages/d0/6f/ea89f2d928f2d56edfbfb3511552968b92d62b2fc6a68b7904af050c0135/dj-rest-auth-3.0.0.tar.gz BuildArch: noarch %description # Dj-Rest-Auth [![](https://circleci.com/gh/iMerica/dj-rest-auth.svg?style=svg)](https://app.circleci.com/pipelines/github/iMerica/dj-rest-auth) Drop-in API endpoints for handling authentication securely in Django Rest Framework. Works especially well with SPAs (e.g React, Vue, Angular), and Mobile applications. ## Requirements - Django 2, 3 or 4 (See Unit Test Coverage in CI) - Python 3 ## Quick Setup Install package pip install dj-rest-auth Add `dj_rest_auth` app to INSTALLED_APPS in your django settings.py: ```python INSTALLED_APPS = ( ..., 'rest_framework', 'rest_framework.authtoken', ..., 'dj_rest_auth' ) ``` Add URL patterns ```python urlpatterns = [ path('dj-rest-auth/', include('dj_rest_auth.urls')), ] ``` (Optional) Use Http-Only cookies ```python REST_AUTH = { 'USE_JWT': True, 'JWT_AUTH_COOKIE': 'jwt-auth', } ``` ### Testing Install required modules with `pip install -r dj_rest_auth/tests/requirements.pip` To run the tests within a virtualenv, run `python runtests.py` from the repository directory. The easiest way to run test coverage is with [`coverage`](https://pypi.org/project/coverage/), which runs the tests against all supported Django installs. To run the test coverage within a virtualenv, run `coverage run ./runtests.py` from the repository directory then run `coverage report`. #### Tox Testing may also be done using [`tox`](https://pypi.org/project/tox/), which will run the tests against all supported combinations of python and django. Install tox, either globally or within a virtualenv, and then simply run `tox` from the repository directory. As there are many combinations, you may run them in [`parallel`](https://tox.readthedocs.io/en/latest/config.html#cmdoption-tox-p) using `tox --parallel`. The `tox.ini` includes an environment for testing code [`coverage`](https://pypi.org/project/coverage/) and you can run it and view this report with `tox -e coverage`. Linting may also be performed via [`flake8`](https://pypi.org/project/flake8/) by running `tox -e flake8`. ### Documentation View the full documentation here: https://dj-rest-auth.readthedocs.io/en/latest/index.html ### Acknowledgements This project began as a fork of `django-rest-auth`. Big thanks to everyone who contributed to that repo! #### A note on Django AllAuth from @iMerica This project has an optional and very narrow support for Django-AllAuth. As maintainer I have no intererest in making this package support every and all use case in Django All Auth. I would rather focus on improving the quality of the base funtionality or focus on OIDC support instead. Pull requests that extend or add more support for Django AllAuth will most likely be declined. Do you disagreee? Feel free to fork this repo! %package -n python3-dj-rest-auth Summary: Authentication and Registration in Django Rest Framework Provides: python-dj-rest-auth BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-dj-rest-auth # Dj-Rest-Auth [![](https://circleci.com/gh/iMerica/dj-rest-auth.svg?style=svg)](https://app.circleci.com/pipelines/github/iMerica/dj-rest-auth) Drop-in API endpoints for handling authentication securely in Django Rest Framework. Works especially well with SPAs (e.g React, Vue, Angular), and Mobile applications. ## Requirements - Django 2, 3 or 4 (See Unit Test Coverage in CI) - Python 3 ## Quick Setup Install package pip install dj-rest-auth Add `dj_rest_auth` app to INSTALLED_APPS in your django settings.py: ```python INSTALLED_APPS = ( ..., 'rest_framework', 'rest_framework.authtoken', ..., 'dj_rest_auth' ) ``` Add URL patterns ```python urlpatterns = [ path('dj-rest-auth/', include('dj_rest_auth.urls')), ] ``` (Optional) Use Http-Only cookies ```python REST_AUTH = { 'USE_JWT': True, 'JWT_AUTH_COOKIE': 'jwt-auth', } ``` ### Testing Install required modules with `pip install -r dj_rest_auth/tests/requirements.pip` To run the tests within a virtualenv, run `python runtests.py` from the repository directory. The easiest way to run test coverage is with [`coverage`](https://pypi.org/project/coverage/), which runs the tests against all supported Django installs. To run the test coverage within a virtualenv, run `coverage run ./runtests.py` from the repository directory then run `coverage report`. #### Tox Testing may also be done using [`tox`](https://pypi.org/project/tox/), which will run the tests against all supported combinations of python and django. Install tox, either globally or within a virtualenv, and then simply run `tox` from the repository directory. As there are many combinations, you may run them in [`parallel`](https://tox.readthedocs.io/en/latest/config.html#cmdoption-tox-p) using `tox --parallel`. The `tox.ini` includes an environment for testing code [`coverage`](https://pypi.org/project/coverage/) and you can run it and view this report with `tox -e coverage`. Linting may also be performed via [`flake8`](https://pypi.org/project/flake8/) by running `tox -e flake8`. ### Documentation View the full documentation here: https://dj-rest-auth.readthedocs.io/en/latest/index.html ### Acknowledgements This project began as a fork of `django-rest-auth`. Big thanks to everyone who contributed to that repo! #### A note on Django AllAuth from @iMerica This project has an optional and very narrow support for Django-AllAuth. As maintainer I have no intererest in making this package support every and all use case in Django All Auth. I would rather focus on improving the quality of the base funtionality or focus on OIDC support instead. Pull requests that extend or add more support for Django AllAuth will most likely be declined. Do you disagreee? Feel free to fork this repo! %package help Summary: Development documents and examples for dj-rest-auth Provides: python3-dj-rest-auth-doc %description help # Dj-Rest-Auth [![](https://circleci.com/gh/iMerica/dj-rest-auth.svg?style=svg)](https://app.circleci.com/pipelines/github/iMerica/dj-rest-auth) Drop-in API endpoints for handling authentication securely in Django Rest Framework. Works especially well with SPAs (e.g React, Vue, Angular), and Mobile applications. ## Requirements - Django 2, 3 or 4 (See Unit Test Coverage in CI) - Python 3 ## Quick Setup Install package pip install dj-rest-auth Add `dj_rest_auth` app to INSTALLED_APPS in your django settings.py: ```python INSTALLED_APPS = ( ..., 'rest_framework', 'rest_framework.authtoken', ..., 'dj_rest_auth' ) ``` Add URL patterns ```python urlpatterns = [ path('dj-rest-auth/', include('dj_rest_auth.urls')), ] ``` (Optional) Use Http-Only cookies ```python REST_AUTH = { 'USE_JWT': True, 'JWT_AUTH_COOKIE': 'jwt-auth', } ``` ### Testing Install required modules with `pip install -r dj_rest_auth/tests/requirements.pip` To run the tests within a virtualenv, run `python runtests.py` from the repository directory. The easiest way to run test coverage is with [`coverage`](https://pypi.org/project/coverage/), which runs the tests against all supported Django installs. To run the test coverage within a virtualenv, run `coverage run ./runtests.py` from the repository directory then run `coverage report`. #### Tox Testing may also be done using [`tox`](https://pypi.org/project/tox/), which will run the tests against all supported combinations of python and django. Install tox, either globally or within a virtualenv, and then simply run `tox` from the repository directory. As there are many combinations, you may run them in [`parallel`](https://tox.readthedocs.io/en/latest/config.html#cmdoption-tox-p) using `tox --parallel`. The `tox.ini` includes an environment for testing code [`coverage`](https://pypi.org/project/coverage/) and you can run it and view this report with `tox -e coverage`. Linting may also be performed via [`flake8`](https://pypi.org/project/flake8/) by running `tox -e flake8`. ### Documentation View the full documentation here: https://dj-rest-auth.readthedocs.io/en/latest/index.html ### Acknowledgements This project began as a fork of `django-rest-auth`. Big thanks to everyone who contributed to that repo! #### A note on Django AllAuth from @iMerica This project has an optional and very narrow support for Django-AllAuth. As maintainer I have no intererest in making this package support every and all use case in Django All Auth. I would rather focus on improving the quality of the base funtionality or focus on OIDC support instead. Pull requests that extend or add more support for Django AllAuth will most likely be declined. Do you disagreee? Feel free to fork this repo! %prep %autosetup -n dj-rest-auth-3.0.0 %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-dj-rest-auth -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Mon Apr 10 2023 Python_Bot - 3.0.0-1 - Package Spec generated