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 details)
Built Distribution
File details
Details for the file libmytoken-0.1.0.tar.gz
.
File metadata
- Download URL: libmytoken-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b6b1735928abfe686349424a235885ab762244a06fb2a60bcbfe14639233efe |
|
MD5 | 2a68ff1337c4d53d1a0d19c300201fd8 |
|
BLAKE2b-256 | 0dfa1f38147f3300e8181c818acede582959196b1f664c402e7247623e79fdc8 |
File details
Details for the file libmytoken-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: libmytoken-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 082d3d25ca7a4059ee31517eb3f5f87b4e6c6abb0232e48da08e385b61ee0279 |
|
MD5 | 807c345031aafff809f573d5504ace9c |
|
BLAKE2b-256 | ba74ee6c82ab06ca6a2864b812f3641a04ad8f81d253be3d1f17b7628b835200 |