string m_appId;
#ifndef SHIBSP_LITE
LogoutRequest* buildRequest(
- const Application& application, const Session& session, const RoleDescriptor& role, const MessageEncoder* encoder=NULL
+ const Application& application, const Session& session, const RoleDescriptor& role, const MessageEncoder* encoder=nullptr
) const;
XMLCh* m_outgoing;
SAML2LogoutInitiator::SAML2LogoutInitiator(const DOMElement* e, const char* appId)
: AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".LogoutInitiator.SAML2")), m_appId(appId),
#ifndef SHIBSP_LITE
- m_outgoing(NULL),
+ m_outgoing(nullptr),
#endif
m_protocol(samlconstants::SAML20P_NS)
{
try {
auto_ptr_char b(start);
MessageEncoder * encoder =
- SAMLConfig::getConfig().MessageEncoderManager.newPlugin(b.get(),pair<const DOMElement*,const XMLCh*>(e,NULL));
+ SAMLConfig::getConfig().MessageEncoderManager.newPlugin(b.get(),pair<const DOMElement*,const XMLCh*>(e,nullptr));
if (encoder->isUserAgentPresent()) {
m_encoders[start] = encoder;
m_log.debug("supporting outgoing binding (%s)", b.get());
// At this point we know the front-channel is handled.
// We need the session to do any other work.
- Session* session = NULL;
+ Session* session = nullptr;
try {
session = request.getSession(false, true, false); // don't cache it and ignore all checks
if (!session)
// Find application.
const char* aid=in["application_id"].string();
- const Application* app=aid ? SPConfig::getConfig().getServiceProvider()->getApplication(aid) : NULL;
+ const Application* app=aid ? SPConfig::getConfig().getServiceProvider()->getApplication(aid) : nullptr;
if (!app) {
// Something's horribly wrong.
m_log.error("couldn't find application (%s) for logout", aid ? aid : "(missing)");
auto_ptr<HTTPRequest> req(getRequest(in));
// Set up a response shim.
- DDF ret(NULL);
+ DDF ret(nullptr);
DDFJanitor jout(ret);
auto_ptr<HTTPResponse> resp(getResponse(ret));
- Session* session = NULL;
+ Session* session = nullptr;
try {
- session = app->getServiceProvider().getSessionCache()->find(*app, *req.get(), NULL, NULL);
+ session = app->getServiceProvider().getSessionCache()->find(*app, *req.get(), nullptr, nullptr);
}
catch (exception& ex) {
m_log.error("error accessing current session: %s", ex.what());
);
}
- const EndpointType* ep=NULL;
- const MessageEncoder* encoder=NULL;
+ const EndpointType* ep=nullptr;
+ const MessageEncoder* encoder=nullptr;
vector<const XMLCh*>::const_iterator b;
for (b = m_bindings.begin(); b!=m_bindings.end(); ++b) {
if (ep=EndpointManager<SingleLogoutService>(role->getSingleLogoutServices()).getByBinding(*b)) {
shibsp::SOAPClient soaper(policy);
MetadataCredentialCriteria mcc(*role);
- LogoutResponse* logoutResponse=NULL;
+ LogoutResponse* logoutResponse=nullptr;
auto_ptr_XMLCh binding(samlconstants::SAML20_BINDING_SOAP);
const vector<SingleLogoutService*>& endpoints=role->getSingleLogoutServices();
for (vector<SingleLogoutService*>::const_iterator epit=endpoints.begin(); !logoutResponse && epit!=endpoints.end(); ++epit) {
}
else {
// Check the status, looking for non-success or a partial logout code.
- const StatusCode* sc = logoutResponse->getStatus() ? logoutResponse->getStatus()->getStatusCode() : NULL;
+ const StatusCode* sc = logoutResponse->getStatus() ? logoutResponse->getStatus()->getStatusCode() : nullptr;
bool partial = (!sc || !XMLString::equals(sc->getValue(), StatusCode::SUCCESS));
if (!partial && sc->getStatusCode()) {
// Success, but still need to check for partial.
if (session) {
session->unlock();
- session = NULL;
+ session = nullptr;
application.getServiceProvider().getSessionCache()->remove(application, httpRequest, &httpResponse);
}
if (session) {
session->unlock();
- session = NULL;
+ session = nullptr;
application.getServiceProvider().getSessionCache()->remove(application, httpRequest, &httpResponse);
}