# define _CRT_SECURE_NO_DEPRECATE 1
#endif
+#include <shibsp/AbstractSPRequest.h>
#include <shibsp/RequestMapper.h>
#include <shibsp/SPConfig.h>
#include <xmltooling/util/NDC.h>
}
using namespace shibsp;
-using namespace shibtarget;
using namespace xmltooling;
using namespace std;
if (IO_ERROR==net_write(sn->csd,str,strlen(str))) return REQ_EXIT
namespace {
- ShibTargetConfig* g_Config=NULL;
+ shibtarget::ShibTargetConfig* g_Config=NULL;
string g_ServerName;
string g_ServerScheme;
string g_unsetHeaderValue;
config=getenv("SHIBCONFIG");
if (!config)
config=SHIB_CONFIG;
- g_Config=&ShibTargetConfig::getConfig();
+ g_Config=&shibtarget::ShibTargetConfig::getConfig();
SPConfig::getConfig().setFeatures(
SPConfig::Listener |
SPConfig::Caching |
/********************************************************************************/
// NSAPI Shib Target Subclass
-class ShibTargetNSAPI : public ShibTarget
+class ShibTargetNSAPI : public AbstractSPRequest
{
string m_uri;
mutable string m_body;
ShibTargetNSAPI stn(pb, sn, rq);
// Check user authentication
- pair<bool,long> res = stn.doCheckAuthN();
+ pair<bool,long> res = stn.getServiceProvider().doAuthentication(stn);
if (res.first) return (int)res.second;
// user authN was okay -- export the assertions now
// This seems to be required in order to eventually set
// the auth-user var.
pblock_nvinsert("auth-type","shibboleth",rq->vars);
- res = stn.doExportAssertions();
+ res = stn.getServiceProvider().doExport(stn);
if (res.first) return (int)res.second;
// Check the Authorization
- res = stn.doCheckAuthZ();
+ res = stn.getServiceProvider().doAuthorization(stn);
if (res.first) return (int)res.second;
// this user is ok.
try {
ShibTargetNSAPI stn(pb, sn, rq);
- pair<bool,long> res = stn.doHandler();
+ pair<bool,long> res = stn.getServiceProvider().doHandler(stn);
if (res.first) return (int)res.second;
return WriteClientError(sn, rq, FUNC, "Shibboleth handler did not do anything.");