Metadata-Version: 2.1
Name: alastria-auth
Version: 0.0.12
Summary: A small alastria_auth app for django
Author-email: Alejandro <agarrido@izertis.com>
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: alastria-identity
Requires-Dist: Django (==4.1.3)
Requires-Dist: djangorestframework (==3.14.0)
Requires-Dist: drf-yasg (==1.21.4)
Requires-Dist: pillow (==9.3.0)
Requires-Dist: pyjwt (==2.6.0)
Requires-Dist: qrcode (==7.3.1)
Requires-Dist: web3 (==5.31.3)
Requires-Dist: network-service-client (==0.0.2)
Requires-Dist: alastria-service-client (==0.0.12)
Requires-Dist: django-waffle (==3.0.0)

**Alastria ID authentication**

- Descripción: Librería para poder autenticarse con alastria ID
- URL: [https://pypi.org/project/alastria-auth/](https://pypi.org/project/alastria-auth/)
- Requisitos: Django
- Instalar: alastria-auth==0.0.9
- Cómo usar:

Añadir en settings.py:

```python
INSTALLED_APPS = [
....
"alastria_auth.apps.AlastriaAuthConfig"
]
# ALASTRIA AUTH VARS
BACKEND_DOMAIN = os.environ.get("BACKEND_DOMAIN", "http://localhost:8000")
NETWORK_SERVICE_HOST = os.environ.get("NETWORK_SERVICE_HOST", "http://host.docker.internal:8001")
ISSUER_PRIVATE_KEY = os.environ.get("ISSUER_PRIVATE_KEY", "")
ISSUER_PUBLIC_KEY = os.environ.get(
    "ISSUER_PUBLIC_KEY",
    "",
)
ISSUER_ADDRESS = os.environ.get("ISSUER_ADDRESS", "")
ALASTRIA_T_NETWORK_ID = os.environ.get("ALASTRIA_T_NETWORK_ID", "redT")
ALASTRIA_AUTH_SECRET = os.environ.get("ALASTRIA_AUTH_SECRET", "")
ALASTRIA_SERVICE_HOST = os.environ.get("ALASTRIA_SERVICE_HOST", "http://host.docker.internal:5000")
#####################
```

Añadir en [url.py](http://url.py) las urls:

```python
from alastria_auth.views import AlastriaAuthView

....
urlpatterns = [
	path("alastria/", include("alastria_auth.urls")),
....
]
```
