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
Release files for idin 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| idin-0.2.0.tar.gz | 74.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| idin-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 93.4 kB
Release files / idin-0.2.0.tar.gz
| Download URL | idin-0.2.0.tar.gz |
|---|---|
| Size | 74.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e8924b2c39b12ab7ffc4cb04da4b7933e61d838015825ec4af5ad3d6a2c14e1
|
|
BLAKE2b-256 checksum How to use checksums |
415779b9df04002935836c406e414a60453bb1e46cc8f4b0d0547985a20310fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / idin-0.2.0-py3-none-any.whl
| Download URL | idin-0.2.0-py3-none-any.whl |
|---|---|
| Size | 19.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e1ffff34df5cf4fe6b7cbe184fba082a09055a09811011c559c69c15663bc63c
|
|
BLAKE2b-256 checksum How to use checksums |
0705f32051def1ac6d9d0856c4d4050a365306a6752364d2a80a5c246b5edfb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|