Browse Source

++notes

master
Nico Schottelius 8 months ago
parent
commit
196ab2787e
  1. 18
      README.md
  2. 4
      ungleichuser/templates/registration/login.html
  3. 4
      ungleichuser/ungleichuser/forms.py
  4. 6
      ungleichuser/ungleichuser/v6v4.py

18
README.md

@ -4,6 +4,24 @@ This service runs on [account.ungleich.ch](https://account.ungleich.ch/) and
allows customers manage their ungleich account (register, edit mail & password,
...).
## Todos for v2:
* Rewrite/create new app Django 4.0 based (ungleichuser)
* Do not use django-auth-ldap, because it uses python-ldap
* Update the template HTML to bootstrap5
* Use ldap3
* Check/verify the ldap registration
* Ensure multiple ldap servers are supported
* Cleanup this readme
* Use the following "captcha" for all forms:
* Extra form field named "random"
* Present the user the following text:
* Create Dockerfile / ensure it works in kubernetes
## Next steps
* Override/use custom form to allow captcha
## Development Setup
```

4
ungleichuser/templates/registration/login.html

@ -26,6 +26,10 @@
<td>{{ form.password.label_tag }}</td>
<td>{{ form.password }}</td>
</tr>
<tr>
<td>{{ form.random.label_tag }}</td>
<td>{{ form.random }}</td>
</tr>
</table>
<input type="submit" value="login">

4
ungleichuser/ungleichuser/forms.py

@ -0,0 +1,4 @@
import django.contrib.auth.forms as forms
class UngleichAuthenticationForm(forms.AuthenticationForm):
address = forms.CharField(max_length=45)

6
ungleichuser/ungleichuser/v6v4.py

@ -2,4 +2,8 @@ import ipaddress
import random
v4_addr = ipaddress.IPv4Address(random.randint(0, 2**32))
v6_addr = ipaddress.IPv6Address(random.randint(0, 2**128)
v6_addr = ipaddress.IPv6Address(random.randint(0, 2**128))
if __name__ == '__main__':
addr_type = random.choice(["ipv6", "ipv4"])
if addr_type == "ipv6":

Loading…
Cancel
Save