summaryrefslogtreecommitdiff
path: root/idp/shib-entrypoint.sh
diff options
context:
space:
mode:
Diffstat (limited to 'idp/shib-entrypoint.sh')
-rwxr-xr-xidp/shib-entrypoint.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/idp/shib-entrypoint.sh b/idp/shib-entrypoint.sh
index 5439cc5..b0aa661 100755
--- a/idp/shib-entrypoint.sh
+++ b/idp/shib-entrypoint.sh
@@ -27,6 +27,22 @@ if [ -e /opt/data ]; then
fi
fi
+
+# Set sessiontimeout
+if [ -n "$IDP_SESSION_TIMEOUT" ]; then
+ sed -i -e "/#idp.session.timeout\s*=/ s/^#//" \
+ -e "/#idp.authn.defaultLifetime\s*=/ s/^#//" "$IDP_PROPERTIES"
+
+ sed -i -e "/idp.session.timeout\s*=/ s/=.*/= $IDP_SESSION_TIMEOUT/" \
+ -e "/idp.authn.defaultLifetime\s*=/ s/=.*/= $IDP_SESSION_TIMEOUT/" "$IDP_PROPERTIES"
+
+fi
+if [ -n "$IDP_AUTHN_TIMEOUT" ]; then
+ sed -i -e "/#idp.authn.defaultTimeout\s*=/ s/^#//" "$IDP_PROPERTIES"
+
+ sed -i -e "/idp.authn.defaultTimeout\s*=/ s/=.*/= $IDP_AUTHN_TIMEOUT/" "$IDP_PROPERTIES"
+fi
+
# Default property changes
# Use secure cookies (https only)
sed -i -e "/idp.cookie.secure/ s/^#//" -e "/idp.cookie.secure/ s/false/true/" $IDP_PROPERTIES