Populate standard claims

This commit is contained in:
Kumi 2022-08-02 11:49:45 +02:00
parent 3785bff002
commit 51a480569a
Signed by: kumi
GPG key ID: 5D1CE6AF1805ECA2
4 changed files with 19 additions and 0 deletions

1
core/oidc/__init__.py Normal file
View file

@ -0,0 +1 @@
from .userinfo import userinfo

4
core/oidc/userinfo.py Normal file
View file

@ -0,0 +1,4 @@
def userinfo(claims, user):
claims['email'] = user.email
return claims

10
doc/uwsgi.ini Normal file
View file

@ -0,0 +1,10 @@
[uwsgi]
uid = kumidc
gid = kumidc
chdir = /opt/kumidc
threads = 20
chmod-socket = 666
socket = /var/sockets/kumidc.sock
virtualenv = /opt/kumidc/venv/
module = kumidc.wsgi:application
plugins = python

View file

@ -126,3 +126,7 @@ STATIC_ROOT = CONFIG_FILE.config.get("App", "StaticDir", fallback=BASE_DIR / "st
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
# OIDC Configuration
OIDC_USERINFO = 'core.oidc.userinfo'