django-cryptolock/README.rst

71 lines
1.7 KiB
ReStructuredText
Raw Normal View History

=============================
Django-Cryptolock
=============================
2020-04-21 12:34:47 +02:00
Authentication using cryptocurrency wallets for Django projects.
2020-03-31 19:37:34 +02:00
2020-04-21 12:34:47 +02:00
This package provides a django app containing a set of utilities to
2020-03-31 19:37:34 +02:00
implement the BitId and Monero Cryptolock authentication "protocols".
Future releases might include other cryptocurrencies but for the being
2020-04-21 12:34:47 +02:00
(until we reach some stability) all the focus will remain on BTC and XMR.
2020-02-19 16:04:19 +01:00
2020-04-21 12:34:47 +02:00
**DISCLAIMER:** This package is on a early stage of development, It isn't meant to be
used on production (in other words, only test projects for now).
Documentation
-------------
The full documentation is at https://django-cryptolock.readthedocs.io.
Quickstart
----------
2020-03-31 19:37:34 +02:00
1. Install Django-Cryptolock::
pip install django-cryptolock
2020-03-31 19:37:34 +02:00
2. Add it to your `INSTALLED_APPS`:
.. code-block:: python
INSTALLED_APPS = (
...
2020-05-12 14:53:39 +02:00
"django_cryptolock.apps.DjangoCryptolockConfig",
...
)
2020-03-31 19:37:34 +02:00
3. Migrate your database::
2019-12-01 01:07:03 +01:00
2020-03-31 19:37:34 +02:00
python manage.py migrate
2020-03-31 19:37:34 +02:00
4. Add the following settings to your project for the Monero Backend:
2020-03-31 19:37:34 +02:00
.. code-block:: python
2020-03-31 19:37:34 +02:00
AUTHENTICATION_BACKENDS = [
"django_cryptolock.backends.MoneroAddressBackend",
...
]
2020-03-31 19:37:34 +02:00
DJCL_MONERO_NETWORK = "mainnet"
DJCL_MONERO_WALLET_RPC_PROTOCOL = "<http_or_https>"
DJCL_MONERO_WALLET_RPC_HOST = "<wallet_rpc_host>:<port>"
DJCL_MONERO_WALLET_RPC_USER = "<user>"
DJCL_MONERO_WALLET_RPC_PASS = "<password>"
2020-03-31 19:37:34 +02:00
5. Add Django-Cryptolock's URL patterns:
2020-03-31 19:37:34 +02:00
.. code-block:: python
2020-03-31 19:37:34 +02:00
from django.conf.urls import url
2020-03-31 19:37:34 +02:00
urlpatterns = [
...
url(r"^auth/", include("django_cryptolock.urls", namespace="django_cryptolock")),
...
]
More detailed information can be found in the [documentation](#documentation).