ungleich-otp/ungleichotpclient
Nico Schottelius 11ab190ebc Update 2018-12-24 20:28:21 +01:00
..
restapp Be python friendly, don't use dashes 2018-11-18 14:33:30 +01:00
ungleichotpclient Be python friendly, don't use dashes 2018-11-18 14:33:30 +01:00
README.md Update 2018-12-24 20:28:21 +01:00
manage.py Be python friendly, don't use dashes 2018-11-18 14:33:30 +01:00

README.md

Run

Use your favorite uwsgi configuration or

UNGLEICHOTPSERVER=https://your-server-address/
UNGLEICHOTPREALM=admin \
UNGLEICHOTPNAME=sampleapp \
UNGLEICHOTPSEED=CEKXVG3235PO2HDW \
   python manage.py runserver

This triple will be used to connect to the

Use

curl

def index(request): answer = {} answer['token'] = pyotp.TOTP(settings.UNGLEICHOTP['UNGLEICHOTPSEED']).now() answer['name'] = settings.UNGLEICHOTP['UNGLEICHOTPNAME'] answer['realm'] = settings.UNGLEICHOTP['UNGLEICHOTPREALM']

return HttpResponse(json.dumps(answer))

elif request.method == 'POST': do_something_else()