/*
* Copyright 2001-2007 Internet2
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
/**
* Application.cpp
- *
+ *
* Interface to a Shibboleth Application instance.
*/
delete m_lock;
}
-pair<string,const char*> Application::getCookieNameProps(const char* prefix) const
+pair<string,const char*> Application::getCookieNameProps(const char* prefix, time_t* lifetime) const
{
static const char* defProps="; path=/";
-
+
+ if (lifetime)
+ *lifetime = 0;
const PropertySet* props=getPropertySet("Sessions");
if (props) {
+ if (lifetime) {
+ pair<bool,unsigned int> lt = props->getUnsignedInt("cookieLifetime");
+ if (lt.first)
+ *lifetime = lt.second;
+ }
pair<bool,const char*> p=props->getString("cookieProps");
if (!p.first)
p.second=defProps;
return make_pair(string(prefix) + p2.second,p.second);
return make_pair(string(prefix) + getHash(),p.second);
}
-
+
// Shouldn't happen, but just in case..
return pair<string,const char*>(prefix,defProps);
}
+void Application::clearHeader(SPRequest& request, const char* rawname, const char* cginame) const
+{
+ request.clearHeader(rawname, cginame);
+}
+
+void Application::setHeader(SPRequest& request, const char* name, const char* value) const
+{
+ request.setHeader(name, value);
+}
+
+string Application::getSecureHeader(const SPRequest& request, const char* name) const
+{
+ return request.getSecureHeader(name);
+}
+
void Application::clearAttributeHeaders(SPRequest& request) const
{
if (SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess)) {