settings.py 444 Bytes
Newer Older
1
import validators
Jean-Baptiste's avatar
Jean-Baptiste committed
2
from django.conf import settings
3
from django.urls import reverse_lazy
4
from django.views.decorators.csrf import csrf_exempt
5

6

Jean-Baptiste's avatar
Jean-Baptiste committed
7 8 9 10
def userinfo(claims, user):
    # Populate claims dict.
    claims['name'] = '{0} {1}'.format(user.first_name, user.last_name)
    claims['email'] = user.email
11 12
    claims['website'] = user.webid()
    claims['webid'] = user.webid()
Jean-Baptiste's avatar
Jean-Baptiste committed
13
    return claims
14 15 16


def sub_generator(user):
17
    return user.webid()