Datapunt authorization
Project description
Interface to authorization logic in the backend of Amsterdam’s (Netherlands) open data distribution platform, [Datapunt](http://data.amsterdam.nl).
In Datapunt authorization levels associated with users are stored in a central database. When a user accesses a resource she needs to provide a cryptographically secure token. That token contains the user’s authorization level. The resource in turn uses that information to decide what information the user can access.
Install
$ pip install datapunt-authorization
In order to use this library you need to have access to a Postgress database.
Usage
import authorization import authorization_levels # pip install datapunt-authorization-levels authzmap = authorization.AuthzMap(**psycopgconf) if authzmap['myuser'] == authorization_levels.LEVEL_EMPLOYEE: ... # do some eployee-e things
Contribute
Activate your virtualenv, install the egg in editable mode, and start coding:
$ source env/bin/activate $ pip install -e .
Testing:
make test
Documentation
The docs can be found at [datapunt-authorization.readthedocs.io](https://datapunt-authorization.readthedocs.io).
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
Hashes for datapunt-authorization-0.2.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5bd9ce6740a9a43403da817fb020b7136a883d9aed3c8af0ce90d8593514f50 |
|
MD5 | 776c5cd3c054fbca3c6ef2169ebabd22 |
|
BLAKE2b-256 | 0e87125fbf6dc8d0ac0cc94d3066e0c618f6c2983e6934d9cc200577c4560e53 |