Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

OAuth2 token validation for UTVS API

Project description

A little Python class that allows to check a token against ČVUT OAAS and get s personal number form Usermap API. Used in ÚTVS API.


from utvsapitoken import TokenClient
client = TokenClient()
info = client.token_to_info('token')

You can provide custom URIs for the constructor:

client = TokenClient(check_token_uri='http://localhost:8080/token',

This comes with a fake OAAS that can be used for various testing, including the tests of this very project. To start the fake server, just run:

from utvsapitoken import fakeserver

In order to run the testsuite, no need to start the server, just run:

PYTHONPATH=. py.test-3 -v --port 8080

You can omit the port argument to use the default (8080).

This requires Python 3 and requests.


This software is licensed under the terms of the MIT license, see LICENSE for full text and copyright information.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for utvsapitoken, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size utvsapitoken-0.0.2.tar.gz (4.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page