2 * Copyright 2001-2007 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @file shibsp/AbstractSPRequest.h
20 * Abstract base for SPRequest implementations
23 #ifndef __shibsp_abstreq_h__
24 #define __shibsp_abstreq_h__
26 #include <shibsp/exceptions.h>
27 #include <shibsp/SPRequest.h>
29 # include <saml/util/CGIParser.h>
31 # include <shibsp/lite/CGIParser.h>
36 #if defined (_MSC_VER)
37 #pragma warning( push )
38 #pragma warning( disable : 4251 )
42 * Abstract base for SPRequest implementations
44 class SHIBSP_API AbstractSPRequest : public virtual SPRequest
50 virtual ~AbstractSPRequest();
52 const ServiceProvider& getServiceProvider() const {
56 RequestMapper::Settings getRequestSettings() const;
58 const Application& getApplication() const;
60 Session* getSession(bool checkTimeout=true) const;
62 const char* getRequestURL() const;
64 const char* getParameter(const char* name) const;
66 std::vector<const char*>::size_type getParameters(const char* name, std::vector<const char*>& values) const;
68 const char* getCookie(const char* name) const;
70 const char* getHandlerURL(const char* resource=NULL) const;
72 void log(SPLogLevel level, const std::string& msg) const;
74 bool isPriorityEnabled(SPLogLevel level) const;
77 ServiceProvider* m_sp;
78 mutable RequestMapper* m_mapper;
79 mutable RequestMapper::Settings m_settings;
80 mutable const Application* m_app;
81 mutable bool m_sessionTried;
82 mutable Session* m_session;
83 mutable std::string m_url;
84 void* m_log; // declared void* to avoid log4cpp header conflicts in Apache
85 mutable std::string m_handlerURL;
86 mutable std::map<std::string,std::string> m_cookieMap;
87 mutable opensaml::CGIParser* m_parser;
90 #if defined (_MSC_VER)
91 #pragma warning( pop )
96 #endif /* __shibsp_abstreq_h__ */