Gitlab CSE Unil

auth.py 607 Bytes
Newer Older
Julien Furrer's avatar
Julien Furrer committed
1
2
3
4
5
6
7
8
AUTHENTICATION_BACKENDS = (
    'shibauth.shibbolethbackends.ShibbolethBackend',
    'django.contrib.auth.backends.ModelBackend',
)

LOGIN_REDIRECT_URL = "adim.app:annotate_new"
LOGIN_URL = "adim.app:home"

9
SHIB_UID_ATTR = 'uniqueID'
Julien Furrer's avatar
Julien Furrer committed
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
SHIB_USERNAME_ATTR = 'mail'
SHIB_ATTR_MAP = {
    'user': (
        ('first_name', 'givenName'),
        ('last_name', 'surname'),
        ('email', 'mail'),
    ),
    'profile': (
        ('homeOrganization', 'homeOrganization'),
        ('uniqueID', 'uniqueID'),
    )
}

SESSION_EXPIRE_AT_BROWSER_CLOSE = True

SESSION_COOKIE_PATH = BASE_URL
CSRF_COOKIE_PATH = BASE_URL