Skip to content

Commit e9cf60c

Browse files
authored
Merge branch 'master' into develop
2 parents 6b020f1 + 432110d commit e9cf60c

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

config.example.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ class Config():
88
# Flask testing
99
TESTING = False
1010
# SSO auth enabled
11+
1112
SSO_AUTH = True
1213
# Authentication is done outside the app, use HTTP header to get the user uuid.
1314
# If SSO_AUTH is set to True, this option is ignored and SSO auth is used.
1415
HEADER_AUTH = False
16+
1517
# Name of HTTP header containing the UUID of authenticated user.
1618
# Only used when HEADER_AUTH is set to True
1719
AUTH_HEADER_NAME = 'X-Authenticated-User'

docs/AUTH.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ In general the whole app should be protected by Shiboleth. However, there certai
1515
Shibboleth configuration example:
1616

1717
#### shibboleth config (shib.conf):
18+
1819
```
1920
<Location />
2021
AuthType shibboleth
2122
ShibRequestSetting requireSession 1
2223
require shib-session
2324
</Location>
2425
26+
2527
<LocationMatch /api/>
2628
Satisfy Any
2729
allow from All

flowapp/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def ext_login():
8888
header_name = app.config.get("AUTH_HEADER_NAME", 'X-Authenticated-User')
8989
if header_name not in request.headers:
9090
return render_template("errors/401.html")
91+
9192
uuid = request.headers.get(header_name)
9293
if uuid:
9394
try:

flowapp/templates/errors/401.j2

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{% extends 'layouts/default.j2' %}
2+
{% block content %}
3+
<h1>Could not log you in.</h1>
4+
<p class="form-text">401: Unauthorized</p>
5+
<p>Please log out and try logging in again.</p>
6+
<p><a href="{{url_for('logout')}}">Log out</a></p>
7+
{% endblock %}

0 commit comments

Comments
 (0)