.. | ||
restapp | ||
ungleichotpclient | ||
manage.py | ||
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()