Python authentication for FIWARE Data Space
Project description
fdsauth
Python authentication for FIWARE Data Space
Installation
In your project folder run:
pip install fdsauth
Usage
First, define following environment variables in your .env
file. Substitute example values for your own:
KEYCLOAK_PROTOCOL=http
KEYCLOAK_ENDPOINT=keycloak-consumer.127.0.0.1.nip.io:8080
KEYCLOAK_USERNAME=test-user
KEYCLOAK_PASSWORD=test
Usage example:
from dotenv import load_dotenv
from fdsauth import Consumer
# Load environment variables from .env file
load_dotenv()
# Create a Consumer instance and retrieve the verifiable credential
consumer = Consumer()
jwt_credential = consumer.get_auth_token()
print(jwt_credential)
Development
# Create virtual env
python3 -m venv ./venv && source ./venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Build
python setup.py sdist bdist_wheel
# Local testing
pip install dist/fdsauth-X.X.X-py3-none-any.whl
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fdsauth-0.0.3.tar.gz
(3.5 kB
view details)
Built Distribution
File details
Details for the file fdsauth-0.0.3.tar.gz
.
File metadata
- Download URL: fdsauth-0.0.3.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c13566b017dab78e22a36873fe4ce4c8e5e3de4c545c6200d02e8a453c9eb9f6 |
|
MD5 | ccb58e1ae24aae57ddfc59380ce59eb1 |
|
BLAKE2b-256 | 2346f95010b40a6638341096cdc226b8399b61eb7d712ecdbaa9ff4571a9fdd1 |
File details
Details for the file fdsauth-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: fdsauth-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf553e3a8ac19c109b2af42e1a65304003c2161db2d7cc5df9aac64de5157dbc |
|
MD5 | 67b8439d26719d95d34d2de97c6cee4b |
|
BLAKE2b-256 | b7d6d6bdc47637ab24870967eabbc16de54e15f13999d66db0328a8d88e3b2d8 |