diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-18 05:01:00 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-18 05:01:00 +0000 |
commit | 6fb688a4b053b059ff2a429bde9938edd0bcbc24 (patch) | |
tree | 84a7d68d4d69497b732771136f2ce56d3d2407e8 | |
parent | b4a6ea918aab8b092aa2644c9b587ae2de9439c6 (diff) |
automatic import of python-ob-dj-otp
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-ob-dj-otp.spec | 281 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 283 insertions, 0 deletions
@@ -0,0 +1 @@ +/ob-dj-otp-0.1.1.tar.gz diff --git a/python-ob-dj-otp.spec b/python-ob-dj-otp.spec new file mode 100644 index 0000000..4a48d20 --- /dev/null +++ b/python-ob-dj-otp.spec @@ -0,0 +1,281 @@ +%global _empty_manifest_terminate_build 0 +Name: python-ob-dj-otp +Version: 0.1.1 +Release: 1 +Summary: OBytes django application for managing OTP (OneTruePairing) for authentication, registration and changing phone number. +License: BSD-3-Clause +URL: https://www.obytes.com/ +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/30/ba/5c838507387e18598a378019656ac0671e0abe02df24dc4d77a982f6a010/ob-dj-otp-0.1.1.tar.gz +BuildArch: noarch + +Requires: python3-django +Requires: python3-djangorestframework + +%description +## OBytes Django OTP App + +[](https://github.com/obytes/ob-dj-otp/actions) +[](https://pypi.python.org/pypi/ob-dj-otp) +[](https://opensource.org/licenses/BSD-3-Clause) +[](https://pepy.tech/project/ob-dj-otp) +[](https://pypi.python.org/pypi/ob-dj-otp) +[](https://github.com/obytes/ob-dj-otp/blob/main/docs/source/index.rst) +[](https://snyk.io/advisor/python/ob-dj-otp) + +OTP is a Django app to conduct Web-based one true pairing, for authentication, registration and changing phone number. + +## Quick start + +1. Install `ob_dj_otp` latest version `pip install ob_dj_otp` + +2. Add "ob_dj_otp" to your `INSTALLED_APPS` setting like this: + +```python + # settings.py + INSTALLED_APPS = [ + ... + "ob_dj_otp.core.otp", + ] +``` + + +3. Include the OTP URLs in your project urls.py like this:: + +```python + # urls.py + path("otp/", include("ob_dj_otp.apis.otp.urls")), +``` + +4. Run ``python manage.py migrate`` to create the otp models. + + +## Configuration + +`OTP_FORCE_CODE` Force using this code instead of generating random one, by default it's not setted + +`OTP_RETURN_USAGE` Boolean that determine whether you want to usage in the response, by default is False + +`OTP_TIMEOUT` Number of seconds for the code expirations, by default it's 3 minuts + +`OTP_USER_SERIALIZER` For the registration purpuse, you need to specify th path to you user serializer so you can create the user with full data + +`OTP_AUTH_USAGE_ONLY` Boolean that deactivate the registration + +`OTP_EMAIL_AS_PRIMARY_FIELD` Boolean to make email required + +`OTP_PHONE_NUMBER_AS_PRIMARY_FIELD` Boolean to make phone number required + +`SERIALIZERS_MIXIN` Dict contain mixins paths to customize serializers behavior ( see [tests](https://github.com/obytes/ob-dj-otp/blob/main/tests/apis/otp/test_custom_serializer.py) for better overview) + +## Notifications +Since each project need it custom provider, the notification part should be sone on the project level not the package level, and it can be done easely but `post_save` on `OneTruePairing` model. + +## Developer Guide + +1. Clone github repo `git clone [url]` + +2. `pipenv install --dev` + +3. `pre-commit install` + +4. Run unit tests `pytest` + + + + +%package -n python3-ob-dj-otp +Summary: OBytes django application for managing OTP (OneTruePairing) for authentication, registration and changing phone number. +Provides: python-ob-dj-otp +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-ob-dj-otp +## OBytes Django OTP App + +[](https://github.com/obytes/ob-dj-otp/actions) +[](https://pypi.python.org/pypi/ob-dj-otp) +[](https://opensource.org/licenses/BSD-3-Clause) +[](https://pepy.tech/project/ob-dj-otp) +[](https://pypi.python.org/pypi/ob-dj-otp) +[](https://github.com/obytes/ob-dj-otp/blob/main/docs/source/index.rst) +[](https://snyk.io/advisor/python/ob-dj-otp) + +OTP is a Django app to conduct Web-based one true pairing, for authentication, registration and changing phone number. + +## Quick start + +1. Install `ob_dj_otp` latest version `pip install ob_dj_otp` + +2. Add "ob_dj_otp" to your `INSTALLED_APPS` setting like this: + +```python + # settings.py + INSTALLED_APPS = [ + ... + "ob_dj_otp.core.otp", + ] +``` + + +3. Include the OTP URLs in your project urls.py like this:: + +```python + # urls.py + path("otp/", include("ob_dj_otp.apis.otp.urls")), +``` + +4. Run ``python manage.py migrate`` to create the otp models. + + +## Configuration + +`OTP_FORCE_CODE` Force using this code instead of generating random one, by default it's not setted + +`OTP_RETURN_USAGE` Boolean that determine whether you want to usage in the response, by default is False + +`OTP_TIMEOUT` Number of seconds for the code expirations, by default it's 3 minuts + +`OTP_USER_SERIALIZER` For the registration purpuse, you need to specify th path to you user serializer so you can create the user with full data + +`OTP_AUTH_USAGE_ONLY` Boolean that deactivate the registration + +`OTP_EMAIL_AS_PRIMARY_FIELD` Boolean to make email required + +`OTP_PHONE_NUMBER_AS_PRIMARY_FIELD` Boolean to make phone number required + +`SERIALIZERS_MIXIN` Dict contain mixins paths to customize serializers behavior ( see [tests](https://github.com/obytes/ob-dj-otp/blob/main/tests/apis/otp/test_custom_serializer.py) for better overview) + +## Notifications +Since each project need it custom provider, the notification part should be sone on the project level not the package level, and it can be done easely but `post_save` on `OneTruePairing` model. + +## Developer Guide + +1. Clone github repo `git clone [url]` + +2. `pipenv install --dev` + +3. `pre-commit install` + +4. Run unit tests `pytest` + + + + +%package help +Summary: Development documents and examples for ob-dj-otp +Provides: python3-ob-dj-otp-doc +%description help +## OBytes Django OTP App + +[](https://github.com/obytes/ob-dj-otp/actions) +[](https://pypi.python.org/pypi/ob-dj-otp) +[](https://opensource.org/licenses/BSD-3-Clause) +[](https://pepy.tech/project/ob-dj-otp) +[](https://pypi.python.org/pypi/ob-dj-otp) +[](https://github.com/obytes/ob-dj-otp/blob/main/docs/source/index.rst) +[](https://snyk.io/advisor/python/ob-dj-otp) + +OTP is a Django app to conduct Web-based one true pairing, for authentication, registration and changing phone number. + +## Quick start + +1. Install `ob_dj_otp` latest version `pip install ob_dj_otp` + +2. Add "ob_dj_otp" to your `INSTALLED_APPS` setting like this: + +```python + # settings.py + INSTALLED_APPS = [ + ... + "ob_dj_otp.core.otp", + ] +``` + + +3. Include the OTP URLs in your project urls.py like this:: + +```python + # urls.py + path("otp/", include("ob_dj_otp.apis.otp.urls")), +``` + +4. Run ``python manage.py migrate`` to create the otp models. + + +## Configuration + +`OTP_FORCE_CODE` Force using this code instead of generating random one, by default it's not setted + +`OTP_RETURN_USAGE` Boolean that determine whether you want to usage in the response, by default is False + +`OTP_TIMEOUT` Number of seconds for the code expirations, by default it's 3 minuts + +`OTP_USER_SERIALIZER` For the registration purpuse, you need to specify th path to you user serializer so you can create the user with full data + +`OTP_AUTH_USAGE_ONLY` Boolean that deactivate the registration + +`OTP_EMAIL_AS_PRIMARY_FIELD` Boolean to make email required + +`OTP_PHONE_NUMBER_AS_PRIMARY_FIELD` Boolean to make phone number required + +`SERIALIZERS_MIXIN` Dict contain mixins paths to customize serializers behavior ( see [tests](https://github.com/obytes/ob-dj-otp/blob/main/tests/apis/otp/test_custom_serializer.py) for better overview) + +## Notifications +Since each project need it custom provider, the notification part should be sone on the project level not the package level, and it can be done easely but `post_save` on `OneTruePairing` model. + +## Developer Guide + +1. Clone github repo `git clone [url]` + +2. `pipenv install --dev` + +3. `pre-commit install` + +4. Run unit tests `pytest` + + + + +%prep +%autosetup -n ob-dj-otp-0.1.1 + +%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-ob-dj-otp -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.1-1 +- Package Spec generated @@ -0,0 +1 @@ +70cdc3d31397a60d47513d9ea447b487 ob-dj-otp-0.1.1.tar.gz |