summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2021-06-28 16:45:18 -0400
committerB. Stack <bgstack15@gmail.com>2021-06-28 16:45:18 -0400
commit26144a23f94c9cbddeb2ec2ba7d2513bb347ea8f (patch)
treeb449c2349adeb1bf5c4bbc7ca488105508d362f0
parentclear session at logout (diff)
downloadsession_app-master.tar.gz
session_app-master.tar.bz2
session_app-master.zip
minor fixes, mostly cosmeticHEADmaster
-rw-r--r--INTERACT.md5
-rwxr-xr-xsession_app.py1
-rw-r--r--templates/index.html4
-rw-r--r--templates/login_form.html1
-rw-r--r--templates/settings.html1
-rw-r--r--templates/view.html3
6 files changed, 13 insertions, 2 deletions
diff --git a/INTERACT.md b/INTERACT.md
index 0ead9fe..1a770f0 100644
--- a/INTERACT.md
+++ b/INTERACT.md
@@ -57,3 +57,8 @@ Basic auth can be provided as a POST to /login/basic/.
<meta http-equiv="Refresh" content="1; url=/protected/">success with ldap
$ curl -X POST -L http://d2-03a:5000/login/basic/ -b ~/cookiejar.txt -c ~/cookiejar.txt --header "Authorization: Basic $( printf '%s' "${username}:${pw}" | base64 )"
<meta http-equiv="Refresh" content="1; url=/protected/">success with ldap
+
+To set any settings that are currently supported by the /protected/settings/ page, you need to be a member of the ldap group "admins."
+
+ $ curl -L http://d2-03a:5000/protected/settings/ -b ~/cookiejar.txt -c ~/cookiejar.txt -X POST --data 'ldap_uri=ldaps://dns1.ipa.example.com'
+ Settings updated:<ul><li>LDAP_URI</li></ul><form action='/protected/settings/' method='get'><input type='submit' value='Return to settings'/></form>
diff --git a/session_app.py b/session_app.py
index 1743b2a..e49ad53 100755
--- a/session_app.py
+++ b/session_app.py
@@ -386,6 +386,7 @@ def protected_settings(user,groups):
if 'LDAP_HOSTS' in app.config:
app.config.pop('LDAP_HOSTS')
message += "<li>LDAP_URI</li>"
+ print(f"Updated setting: LDAP_URI")
if "" != message:
message = "Settings updated:<ul>" + message + "</ul>"
message += f"<form action='{url_for('protected_settings')}' method='get'><input type='submit' value='Return to settings'/></form>"
diff --git a/templates/index.html b/templates/index.html
index daa6893..27b3a7e 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,10 +1,10 @@
<html>
<head>
<title>Front page</title>
+<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
Welcome to this sample application! To access protected pages you need to <a href="/login/">log in</a>. Accepted methods are kerberos and ldap.
-
-{{ session }}
+<p>{{ session }}
</body>
</html>
diff --git a/templates/login_form.html b/templates/login_form.html
index 254d45c..b3d5a3b 100644
--- a/templates/login_form.html
+++ b/templates/login_form.html
@@ -1,6 +1,7 @@
<html>
<head>
<title>Login Form</title>
+<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<center>
diff --git a/templates/settings.html b/templates/settings.html
index 884ea04..994a8b2 100644
--- a/templates/settings.html
+++ b/templates/settings.html
@@ -1,6 +1,7 @@
<html>
<head>
<title>Session_app settings</title>
+<meta name="viewport" content="width=device-width, initial-scale=1">
<!--<style type="text/css" media="screen">
input {
width: 500px;
diff --git a/templates/view.html b/templates/view.html
index 0496cae..0723d60 100644
--- a/templates/view.html
+++ b/templates/view.html
@@ -1,5 +1,8 @@
<html>
+<head>
+<meta name="viewport" content="width=device-width, initial-scale=1">
<title>View Session Cookie</title>
+</head>
Username: {{ s_user }}<br/>{#
Cookie user: {{ c_user }}<br/>
Session: {{ session }}<br/>
bgstack15