Browse Source

Restructure -> easier checkout on app server

patch-1
Nico Schottelius 3 years ago
parent
commit
fc9e14dd5d
  1. 1
      .gitignore
  2. 0
      manage.py
  3. 0
      otpauth/__init__.py
  4. 0
      otpauth/admin.py
  5. 0
      otpauth/apps.py
  6. 0
      otpauth/migrations/0001_initial.py
  7. 0
      otpauth/migrations/__init__.py
  8. 0
      otpauth/models.py
  9. 0
      otpauth/serializer.py
  10. 0
      otpauth/tests.py
  11. 0
      otpauth/views.py
  12. 45
      requests/gendata.py
  13. 0
      requirements.txt
  14. 0
      ungleichotpserver/__init__.py
  15. 0
      ungleichotpserver/settings/__init__.py
  16. 0
      ungleichotpserver/settings/dev.py
  17. 0
      ungleichotpserver/settings/prod.py
  18. 0
      ungleichotpserver/urls.py
  19. 0
      ungleichotpserver/wsgi.py

1
.gitignore vendored

@ -1,2 +1,3 @@
venv/
db.sqlite3
aux/

0
ungleichotpserver/manage.py → manage.py

0
ungleichotpserver/otpauth/__init__.py → otpauth/__init__.py

0
ungleichotpserver/otpauth/admin.py → otpauth/admin.py

0
ungleichotpserver/otpauth/apps.py → otpauth/apps.py

0
ungleichotpserver/otpauth/migrations/0001_initial.py → otpauth/migrations/0001_initial.py

0
ungleichotpserver/otpauth/migrations/__init__.py → otpauth/migrations/__init__.py

0
ungleichotpserver/otpauth/models.py → otpauth/models.py

0
ungleichotpserver/otpauth/serializer.py → otpauth/serializer.py

0
ungleichotpserver/otpauth/tests.py → otpauth/tests.py

0
ungleichotpserver/otpauth/views.py → otpauth/views.py

45
requests/gendata.py

@ -1,45 +0,0 @@
import json
import pyotp
import urllib.request
import urllib.parse
serverurl="http://localhost:8000/ungleichotp/verify/"
totp=pyotp.TOTP("PZKBPTHDGSLZBKIZ")
to_send={}
to_send['name'] = "info@ungleich.ch"
to_send['verifyname'] = to_send['name']
to_send['token'] = totp.now()
to_send['verifytoken'] = to_send['token']
to_send['realm'] = "ungleich-admin"
to_send['verifyrealm'] = to_send['realm']
data = json.dumps(to_send)
print(data)
with open("outdata", "w") as fd:
fd.write(data)
fd.write("\n")
# Post to test server!
#data = urllib.parse.urlencode(bytes(data, encoding="utf-8"))
#data = urllib.parse.urlencode(to_send)
#data = bytes(data, encoding="utf-8")
data = data.encode("utf-8")
print(data)
req = urllib.request.Request(url=serverurl, data=data, headers={'Content-Type': 'application/json'}, method='POST')
print(req)
with urllib.request.urlopen(req) as f:
print(f.status)
if f.status == 200:
print("all good")
print(f.reason)
print(f.getcode())

0
ungleichotpserver/requirements.txt → requirements.txt

0
ungleichotpserver/ungleichotpserver/__init__.py → ungleichotpserver/__init__.py

0
ungleichotpserver/ungleichotpserver/settings/__init__.py → ungleichotpserver/settings/__init__.py

0
ungleichotpserver/ungleichotpserver/settings/dev.py → ungleichotpserver/settings/dev.py

0
ungleichotpserver/ungleichotpserver/settings/prod.py → ungleichotpserver/settings/prod.py

0
ungleichotpserver/ungleichotpserver/urls.py → ungleichotpserver/urls.py

0
ungleichotpserver/ungleichotpserver/wsgi.py → ungleichotpserver/wsgi.py

Loading…
Cancel
Save