Skip to main content

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.

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)

Uploaded Source

Built Distribution

libmytoken-0.1.0-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page