IDIN Module
Project description
python-idin
This is a Python library to authenticate users via iDIN (https://www.idin.nl/). iDIN is a service offered by banks which allows consumers to use their bank’s secure and reliable login methods to either identify, login or confirm their age on your platform.
Requirements
Requires Python 3.7, xmlsec1 and libxml2-dev libraries
Installation
Not released yet
Usage
First intialize the idin client object:
import idin
client = idin.Client(
language="nl",
merchant_id="<your merchant id>",
merchant_sub_id="<optional merchant subaccount id>",
endpoint="<endpoint of acquirer>",
certificate=idin.Certificate(
private_key="<private key (content)>",
certificate="<certificate data (content)>",
password="<optional private key password>",
),
certificate_acquirer=idin.Certificate(
certificate="<certificate data (acquirer)>"
)
)
Now you can start a transaction using:
transaction = client.start_transaction(
issuer="<ISSUER ID>",
service_id=idin.ServiceID.ConsumerID | idin.ServiceID.Name,
merchant_return_url="<URL to redirect the user to after identification>",
)
assert transaction.redirect_url
assert transaction.transaction_id
After the user finished the transaction you can retrieve the status using:
status = client.get_status(
transaction_id="<transaction id>",
entrance_code="<entrance code>"
)
print(status.user)
Error handling
The following exceptions might be raised:
idin.IdinException
- Error raised at the IDIN systemidin.RequesterException
- Invalid requestidin.ValidationError
- The response couldn't be validated
More information
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
idin-0.2.0.tar.gz
(74.0 kB
view details)
Built Distribution
idin-0.2.0-py3-none-any.whl
(19.4 kB
view details)
File details
Details for the file idin-0.2.0.tar.gz
.
File metadata
- Download URL: idin-0.2.0.tar.gz
- Upload date:
- Size: 74.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e8924b2c39b12ab7ffc4cb04da4b7933e61d838015825ec4af5ad3d6a2c14e1 |
|
MD5 | 1cb2059efc4d699e591a6418a94298df |
|
BLAKE2b-256 | 415779b9df04002935836c406e414a60453bb1e46cc8f4b0d0547985a20310fd |
File details
Details for the file idin-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: idin-0.2.0-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1ffff34df5cf4fe6b7cbe184fba082a09055a09811011c559c69c15663bc63c |
|
MD5 | 1a26ed02bf14e50d05225db829224605 |
|
BLAKE2b-256 | 0705f32051def1ac6d9d0856c4d4050a365306a6752364d2a80a5c246b5edfb4 |