A python library for interacting with a mytoken server.
Project description
libmytoken
A python library for interacting with a mytoken server.
This is the very first alpha version of the library, which currently only supports obtaining OpenID Connect access tokens from a mytoken.
Usage
import libmytoken
at = libmytoken.get_access_token_from_jwt_mytoken(mytoken)
mytoken_server = libmytoken.MytokenServer("https://mytoken.data.kit.edu")
at = mytoken_server.AccessToken.get(mytoken)
full_response = mytoken_server.AccessToken.api_get(mytoken)
Error Handling
The library will raise an exception of type MytokenError
if something goes wrong.
Error Handling can be done the following way:
try:
print(libmytoken.get_access_token_from_jwt_mytoken(mytoken))
except libmytoken.MytokenError as e:
print("ERROR mytoken: {}".format(e))
Installation
pip install libmytoken
License
libmytoken
is provided under the MIT License.
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
libmytoken-0.1.0.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for libmytoken-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 082d3d25ca7a4059ee31517eb3f5f87b4e6c6abb0232e48da08e385b61ee0279 |
|
MD5 | 807c345031aafff809f573d5504ace9c |
|
BLAKE2b-256 | ba74ee6c82ab06ca6a2864b812f3641a04ad8f81d253be3d1f17b7628b835200 |