Add a getType method to handlers to assist with documentation.
[shibboleth/sp.git] / shibsp / handler / impl / SAML2ArtifactResolution.cpp
index fdf31ed..07fa66e 100644 (file)
@@ -51,7 +51,6 @@ using namespace shibsp;
 using namespace opensaml;
 using namespace soap11;
 using namespace xmltooling;
-using namespace log4cpp;
 using namespace std;
 
 namespace shibsp {
@@ -70,6 +69,12 @@ namespace shibsp {
         pair<bool,long> run(SPRequest& request, bool isHandler=true) const;
         void receive(DDF& in, ostream& out);
 
+#ifndef SHIBSP_LITE
+        const char* getType() const {
+            return "ArtifactResolutionService";
+        }
+#endif
+
     private:
         pair<bool,long> processMessage(const Application& application, HTTPRequest& httpRequest, HTTPResponse& httpResponse) const;
 #ifndef SHIBSP_LITE
@@ -284,7 +289,7 @@ pair<bool,long> SAML2ArtifactResolution::processMessage(const Application& appli
         auto_ptr<SAMLArtifact> artobj(SAMLArtifact::parse(artifact.get()));
         auto_ptr<XMLObject> payload(artmap->retrieveContent(artobj.get(), issuer.get()));
 
-        if (!policy.isSecure()) {
+        if (!policy.isAuthenticated()) {
             m_log.error("request for artifact was unauthenticated, purging the artifact mapping");
             return samlError(application, *req, httpResponse, StatusCode::REQUESTER, StatusCode::AUTHN_FAILED, "Unable to authenticate request.");
         }