Skip to content

Commit 98b9810

Browse files
committed
Work on end_session_endpoint
1 parent 6a250a8 commit 98b9810

File tree

3 files changed

+42
-41
lines changed

3 files changed

+42
-41
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"[python]": {
33
"editor.codeActionsOnSave": {
4-
"source.organizeImports": true
4+
"source.sortImports": "explicit"
55
}
66
},
77
"python.formatting.provider": "black",

example/app/settings.py

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,75 @@
11
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
22
import os
3+
34
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
45

56

6-
SECRET_KEY = 'c14d549c574e4d8cf162404ef0b04598'
7+
SECRET_KEY = "c14d549c574e4d8cf162404ef0b04598"
78

89
DEBUG = True
910

1011
TEMPLATE_DEBUG = False
1112

12-
ALLOWED_HOSTS = ['*']
13+
ALLOWED_HOSTS = ["*"]
1314

1415
# Application definition
1516

1617
INSTALLED_APPS = [
17-
'django.contrib.admin',
18-
'django.contrib.auth',
19-
'django.contrib.contenttypes',
20-
'django.contrib.sessions',
21-
'django.contrib.messages',
22-
'django.contrib.staticfiles',
23-
'app',
24-
'oidc_provider',
18+
"django.contrib.admin",
19+
"django.contrib.auth",
20+
"django.contrib.contenttypes",
21+
"django.contrib.sessions",
22+
"django.contrib.messages",
23+
"django.contrib.staticfiles",
24+
"app",
25+
"oidc_provider",
2526
]
2627

2728
MIDDLEWARE_CLASSES = [
28-
'django.contrib.sessions.middleware.SessionMiddleware',
29-
'django.middleware.common.CommonMiddleware',
30-
'django.middleware.csrf.CsrfViewMiddleware',
31-
'django.contrib.auth.middleware.AuthenticationMiddleware',
32-
'django.contrib.messages.middleware.MessageMiddleware',
33-
'django.middleware.clickjacking.XFrameOptionsMiddleware',
34-
'oidc_provider.middleware.SessionManagementMiddleware',
29+
"django.contrib.sessions.middleware.SessionMiddleware",
30+
"django.middleware.common.CommonMiddleware",
31+
"django.middleware.csrf.CsrfViewMiddleware",
32+
"django.contrib.auth.middleware.AuthenticationMiddleware",
33+
"django.contrib.messages.middleware.MessageMiddleware",
34+
"django.middleware.clickjacking.XFrameOptionsMiddleware",
35+
"oidc_provider.middleware.SessionManagementMiddleware",
3536
]
3637
MIDDLEWARE = MIDDLEWARE_CLASSES
3738

3839
TEMPLATES = [
3940
{
40-
'BACKEND': 'django.template.backends.django.DjangoTemplates',
41-
'DIRS': [],
42-
'APP_DIRS': True,
43-
'OPTIONS': {
44-
'context_processors': [
45-
'django.template.context_processors.debug',
46-
'django.template.context_processors.request',
47-
'django.contrib.auth.context_processors.auth',
48-
'django.contrib.messages.context_processors.messages',
41+
"BACKEND": "django.template.backends.django.DjangoTemplates",
42+
"DIRS": [],
43+
"APP_DIRS": True,
44+
"OPTIONS": {
45+
"context_processors": [
46+
"django.template.context_processors.debug",
47+
"django.template.context_processors.request",
48+
"django.contrib.auth.context_processors.auth",
49+
"django.contrib.messages.context_processors.messages",
4950
],
5051
},
5152
},
5253
]
5354

54-
ROOT_URLCONF = 'app.urls'
55+
ROOT_URLCONF = "app.urls"
5556

56-
WSGI_APPLICATION = 'app.wsgi.application'
57+
WSGI_APPLICATION = "app.wsgi.application"
5758

5859
# Database
5960

6061
DATABASES = {
61-
'default': {
62-
'ENGINE': 'django.db.backends.sqlite3',
63-
'NAME': os.path.join(BASE_DIR, 'DATABASE.sqlite3'),
62+
"default": {
63+
"ENGINE": "django.db.backends.sqlite3",
64+
"NAME": os.path.join(BASE_DIR, "DATABASE.sqlite3"),
6465
}
6566
}
6667

6768
# Internationalization
6869

69-
LANGUAGE_CODE = 'en-us'
70+
LANGUAGE_CODE = "en-us"
7071

71-
TIME_ZONE = 'UTC'
72+
TIME_ZONE = "UTC"
7273

7374
USE_I18N = True
7475

@@ -78,14 +79,14 @@
7879

7980
# Static files (CSS, JavaScript, Images)
8081

81-
STATIC_URL = '/static/'
82-
STATIC_ROOT = os.path.join(BASE_DIR, 'static/')
82+
STATIC_URL = "/static/"
83+
STATIC_ROOT = os.path.join(BASE_DIR, "static/")
8384

8485
# Custom settings
8586

86-
LOGIN_REDIRECT_URL = '/'
87+
LOGIN_REDIRECT_URL = "/"
8788

8889
# OIDC Provider settings
8990

90-
SITE_URL = 'http://localhost:8000'
91+
SITE_URL = "http://localhost:8000"
9192
OIDC_SESSION_MANAGEMENT_ENABLE = True

example/app/templates/oidc_provider/authorize.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends 'base.html' %}
2-
{% load i18n staticfiles %}
2+
{% load i18n static %}
33

44
{% block content %}
55

@@ -16,10 +16,10 @@ <h2>{% trans 'Request for Permission' %}</h2>
1616
{% endfor %}
1717
</ul>
1818
<br>
19-
<input type="submit" class="btn btn-primary btn-block btn-lg" name="allow" value="{% trans 'Accept' %}" />
19+
<input type="submit" class="btn btn-primary btn-block btn-lg" name="allow" value="{% trans 'Accept' %}" />
2020
<input type="submit" class="btn btn-secondary btn-block" value="{% trans 'Decline' %}" />
2121
</form>
2222
</div>
2323
</div>
2424

25-
{% endblock %}
25+
{% endblock %}

0 commit comments

Comments
 (0)