[cpp-sp] branch master updated: Eliminate some duplicative methods.
Scott Cantor
cantor.2 at osu.edu
Tue Feb 20 12:55:33 EST 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-sp.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=7dff72799e9e1d9d1dc953ab46932b1c682d0fa6
The following commit(s) were added to refs/heads/master by this push:
new 7dff727 Eliminate some duplicative methods.
7dff727 is described below
commit 7dff72799e9e1d9d1dc953ab46932b1c682d0fa6
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Feb 20 12:55:26 2018 -0500
Eliminate some duplicative methods.
---
shibsp/SessionCache.h | 28 +++-------------------------
shibsp/handler/impl/SAML2Logout.cpp | 4 ++--
shibsp/handler/impl/SAML2NameIDMgmt.cpp | 4 ++--
shibsp/impl/StorageServiceSessionCache.cpp | 15 +--------------
shibsp/impl/StorageServiceSessionCache.h | 5 ++---
5 files changed, 10 insertions(+), 46 deletions(-)
diff --git a/shibsp/SessionCache.h b/shibsp/SessionCache.h
index a2f1f3e..5a86b1a 100644
--- a/shibsp/SessionCache.h
+++ b/shibsp/SessionCache.h
@@ -283,7 +283,7 @@ namespace shibsp {
*/
virtual bool matches(
const Application& application,
- const xmltooling::HTTPRequest& request,
+ xmltooling::HTTPRequest& request,
const opensaml::saml2md::EntityDescriptor* issuer,
const opensaml::saml2::NameID& nameid,
const std::set<std::string>* indexes
@@ -336,25 +336,6 @@ namespace shibsp {
* <p>If the client address is supplied, then a check will be performed against
* the address recorded in the record.
*
- * @param application reference to Application that owns the Session
- * @param request request from client bound to session
- * @param client_addr network address of client (if known)
- * @param timeout inactivity timeout to enforce (0 for none, nullptr to bypass check/update of last access)
- * @return pointer to locked Session, or nullptr
- */
- virtual Session* find(
- const Application& application,
- const xmltooling::HTTPRequest& request,
- const char* client_addr=nullptr,
- time_t* timeout=nullptr
- )=0;
-
- /**
- * Locates an existing session bound to a request.
- *
- * <p>If the client address is supplied, then a check will be performed against
- * the address recorded in the record.
- *
* <p>If a bound session is found to have expired, be invalid, etc., and if the request
* can be used to "clear" the session from subsequent client requests, then it may be cleared.
*
@@ -365,11 +346,8 @@ namespace shibsp {
* @return pointer to locked Session, or nullptr
*/
virtual Session* find(
- const Application& application,
- xmltooling::HTTPRequest& request,
- const char* client_addr=nullptr,
- time_t* timeout=nullptr
- );
+ const Application& application, xmltooling::HTTPRequest& request, const char* client_addr=nullptr, time_t* timeout=nullptr
+ )=0;
/**
* Deletes an existing session bound to a request.
diff --git a/shibsp/handler/impl/SAML2Logout.cpp b/shibsp/handler/impl/SAML2Logout.cpp
index 8e09301..57ff2ea 100644
--- a/shibsp/handler/impl/SAML2Logout.cpp
+++ b/shibsp/handler/impl/SAML2Logout.cpp
@@ -103,7 +103,7 @@ namespace shibsp {
}
private:
- pair<bool,long> doRequest(const Application& application, const HTTPRequest& httpRequest, HTTPResponse& httpResponse) const;
+ pair<bool,long> doRequest(const Application& application, HTTPRequest& httpRequest, HTTPResponse& httpResponse) const;
#ifndef SHIBSP_LITE
pair<bool,long> sendResponse(
@@ -258,7 +258,7 @@ void SAML2Logout::receive(DDF& in, ostream& out)
out << ret;
}
-pair<bool,long> SAML2Logout::doRequest(const Application& application, const HTTPRequest& request, HTTPResponse& response) const
+pair<bool,long> SAML2Logout::doRequest(const Application& application, HTTPRequest& request, HTTPResponse& response) const
{
#ifndef SHIBSP_LITE
// First capture the active session ID.
diff --git a/shibsp/handler/impl/SAML2NameIDMgmt.cpp b/shibsp/handler/impl/SAML2NameIDMgmt.cpp
index 4a7fe7d..9909385 100644
--- a/shibsp/handler/impl/SAML2NameIDMgmt.cpp
+++ b/shibsp/handler/impl/SAML2NameIDMgmt.cpp
@@ -107,7 +107,7 @@ namespace shibsp {
}
private:
- pair<bool,long> doRequest(const Application& application, const HTTPRequest& httpRequest, HTTPResponse& httpResponse) const;
+ pair<bool,long> doRequest(const Application& application, HTTPRequest& httpRequest, HTTPResponse& httpResponse) const;
#ifndef SHIBSP_LITE
bool notifyBackChannel(const Application& application, const char* requestURL, const NameID& nameid, const NewID* newid) const;
@@ -239,7 +239,7 @@ void SAML2NameIDMgmt::receive(DDF& in, ostream& out)
out << ret;
}
-pair<bool,long> SAML2NameIDMgmt::doRequest(const Application& application, const HTTPRequest& request, HTTPResponse& response) const
+pair<bool,long> SAML2NameIDMgmt::doRequest(const Application& application, HTTPRequest& request, HTTPResponse& response) const
{
#ifndef SHIBSP_LITE
SessionCache* cache = application.getServiceProvider().getSessionCache();
diff --git a/shibsp/impl/StorageServiceSessionCache.cpp b/shibsp/impl/StorageServiceSessionCache.cpp
index 037c593..9dce5ba 100644
--- a/shibsp/impl/StorageServiceSessionCache.cpp
+++ b/shibsp/impl/StorageServiceSessionCache.cpp
@@ -90,11 +90,6 @@ SessionCache::~SessionCache()
{
}
-Session* SessionCache::find(const Application& application, HTTPRequest& request, const char* client_addr, time_t* timeout)
-{
- return find(application, const_cast<const HTTPRequest&>(request), client_addr, timeout);
-}
-
SSCache::SSCache(const DOMElement* e)
: m_log(Category::getInstance(SHIBSP_LOGCAT ".SessionCache")), inproc(true),
#ifndef SHIBSP_LITE
@@ -256,14 +251,6 @@ string SSCache::active(const Application& app, const HTTPRequest& request)
return (session_id ? session_id : "");
}
-Session* SSCache::find(const Application& app, const HTTPRequest& request, const char* client_addr, time_t* timeout)
-{
- string id = active(app, request);
- if (!id.empty())
- return find(app, id.c_str(), client_addr, timeout);
- return nullptr;
-}
-
#ifndef SHIBSP_LITE
void SSCache::test()
@@ -534,7 +521,7 @@ void SSCache::insert(
bool SSCache::matches(
const Application& app,
- const xmltooling::HTTPRequest& request,
+ xmltooling::HTTPRequest& request,
const saml2md::EntityDescriptor* issuer,
const saml2::NameID& nameid,
const set<string>* indexes
diff --git a/shibsp/impl/StorageServiceSessionCache.h b/shibsp/impl/StorageServiceSessionCache.h
index 1a00060..9222811 100644
--- a/shibsp/impl/StorageServiceSessionCache.h
+++ b/shibsp/impl/StorageServiceSessionCache.h
@@ -96,7 +96,7 @@ namespace shibsp {
}
bool matches(
const shibsp::Application& app,
- const xmltooling::HTTPRequest& request,
+ xmltooling::HTTPRequest& request,
const opensaml::saml2md::EntityDescriptor* issuer,
const opensaml::saml2::NameID& nameid,
const std::set<std::string>* indexes
@@ -107,8 +107,7 @@ namespace shibsp {
void test();
std::string active(const shibsp::Application& app, const xmltooling::HTTPRequest& request);
- shibsp::Session* find(const shibsp::Application& app, const xmltooling::HTTPRequest& request, const char* client_addr = nullptr, time_t* timeout = nullptr);
- shibsp::Session* find(const shibsp::Application& app, xmltooling::HTTPRequest& request, const char* client_addr=nullptr, time_t* timeout=nullptr);
+ shibsp::Session* find(const shibsp::Application& app, xmltooling::HTTPRequest& request, const char* client_addr = nullptr, time_t* timeout = nullptr);
void remove(const shibsp::Application& app, const xmltooling::HTTPRequest& request, xmltooling::HTTPResponse* response=nullptr);
unsigned long getCacheTimeout(const shibsp::Application& app) const;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list