A OAuth2 service to authenticate c-base members and allow them access to c-base-owned services
<Location "/oauth/">
RequestHeader set X-Forwarded-Proto 'https' env=HTTPS
ProxyPass "http://127.0.0.1:8000/oauth/"
ProxyPassReverse "http://127.0.0.1:8000/oauth/"
</Location>
apt install python3 python3-dev libldap2-dev libsasl2-dev
adduser oauth
sudo -u oauth -i
# then install poetry as user oauth
Generate RSA key for OpenID Connect:
see: https://django-oauth-toolkit.readthedocs.io/en/latest/oidc.html
openssl genrsa -out /home/oauth/oidc.key 4096
If you username is not 'uk', please replace 'uk' with your own username.
$ ./manage.py shell
...
>>> from c_base_oauth2.apps.users.models import User
>>> User.objects.get(username="uk")
<User: uk>
>>> u = User.objects.get(username="uk")
>>> u.is_s
u.is_staff u.is_superuser
>>> u.is_staff = True
>>> u.is_superuser = True
>>> u.save()
>>>