url[x] = '\0';
}
-/*
- * We need to implement this so the SHIRE (and RM) recodes work
- * in terms of the ShibTarget
- */
-void ShibTarget::log(ShibLogLevel level, const string &msg)
-{
- throw runtime_error("Invalid Usage");
-}
-string ShibTarget::getCookies(void)
-{
- throw runtime_error("Invalid Usage");
-}
-void ShibTarget::setCookie(const string &name, const string &value)
-{
- throw runtime_error("Invalid Usage");
-}
-void ShibTarget::clearHeader(const string &name)
-{
- throw runtime_error("Invalid Usage");
-}
-void ShibTarget::setHeader(const string &name, const string &value)
-{
- throw runtime_error("Invalid Usage");
-}
-string ShibTarget::getHeader(const string &name)
-{
- throw runtime_error("Invalid Usage");
-}
-void ShibTarget::setRemoteUser(const string &name)
-{
- throw runtime_error("Invalid Usage");
-}
-string ShibTarget::getRemoteUser(void)
-{
- throw runtime_error("Invalid Usage");
-}
-string ShibTarget::getArgs(void)
-{
- throw runtime_error("Invalid Usage");
-}
-string ShibTarget::getPostData(void)
-{
- throw runtime_error("Invalid Usage");
-}
-//virtual HTAccessInfo& getAccessInfo(void);
-void* ShibTarget::sendPage(const string &msg, const string content_type, const pair<string,string> headers[], int code)
-{
- throw runtime_error("Invalid Usage");
-}
-void* ShibTarget::sendRedirect(const std::string url)
-{
- throw runtime_error("Invalid Usage");
-}
-
// Subclasses may not need to override these particular virtual methods.
string ShibTarget::getAuthType(void)
{
//
// Send a message to the Webserver log
- virtual void log(ShibLogLevel level, const std::string &msg);
+ virtual void log(ShibLogLevel level, const std::string &msg)=0;
void log(ShibLogLevel level, const char *msg) {
std::string s = msg;
}
// Get/Set a cookie for this connection
- virtual std::string getCookies(void);
- virtual void setCookie(const std::string &name, const std::string &value);
+ virtual std::string getCookies(void)=0;
+ virtual void setCookie(const std::string &name, const std::string &value)=0;
void setCookie(const char *name, const char *value) {
std::string ns = name;
// Get the request's GET arguments or POST data from the server
- virtual std::string getArgs(void);
- virtual std::string getPostData(void);
+ virtual std::string getArgs(void)=0;
+ virtual std::string getPostData(void)=0;
// Clear a header, set a header
// These APIs are used for exporting the Assertions into the
// Headers. It will clear some well-known headers first to make
// sure none remain. Then it will process the set of assertions
// and export them via setHeader().
- virtual void clearHeader(const std::string &name);
- virtual void setHeader(const std::string &name, const std::string &value);
- virtual std::string getHeader(const std::string &name);
- virtual void setRemoteUser(const std::string &user);
- virtual std::string getRemoteUser(void);
+ virtual void clearHeader(const std::string &name)=0;
+ virtual void setHeader(const std::string &name, const std::string &value)=0;
+ virtual std::string getHeader(const std::string &name)=0;
+ virtual void setRemoteUser(const std::string &user)=0;
+ virtual std::string getRemoteUser(void)=0;
void clearHeader(const char *n) {
std::string s = n;
const std::string content_type = "text/html",
const std::pair<std::string, std::string> headers[] = NULL,
int code = 200
- );
+ )=0;
void* sendPage(const char *msg) {
std::string m = msg;
return sendPage(m);
}
- virtual void* sendRedirect(const std::string url);
+ virtual void* sendRedirect(const std::string url)=0;
// These next two APIs are used to obtain the module-specific "OK"
// and "Decline" results. OK means "we believe that this request
// You probably don't care about much below this line
// unless you are using the lower-layer APIs provided by
// the shib target library.
-
+ /*
class SHIBTARGET_EXPORTS SHIRE
{
public:
//mutable std::string m_authnRequest;
//mutable CgiParse* m_parser;
};
-
+ */
}
#endif /* SHIB_TARGET_H */