Add some addtl methods.
authorScott Cantor <cantor.2@osu.edu>
Wed, 10 Jan 2007 05:20:34 +0000 (05:20 +0000)
committerScott Cantor <cantor.2@osu.edu>
Wed, 10 Jan 2007 05:20:34 +0000 (05:20 +0000)
saml/binding/GenericRequest.h
saml/binding/HTTPRequest.h
samltest/binding.h

index 0acfd4d..df0c005 100644 (file)
@@ -58,6 +58,20 @@ namespace opensaml {
         virtual bool isSecure() const=0;
         
         /**
+         * Returns hostname of service that received request.
+         * 
+         * @return hostname of service
+         */
+        virtual const char* getHostname() const=0;
+
+        /**
+         * Returns incoming port.
+         * 
+         * @return  incoming port 
+         */
+        virtual int getPort() const=0;
+        
+        /**
          * Returns the MIME type of the request, if known.
          * 
          * @return the MIME type, or an empty string
index 2c34a83..5f17c1d 100644 (file)
@@ -51,12 +51,19 @@ namespace opensaml {
         virtual const char* getMethod() const=0;
         
         /**
-         * Returns the complete request URL, including scheme, host, port.
+         * Returns the request URI.
+         * 
+         * @return the request URI
+         */
+        virtual const char* getRequestURI() const=0;
+        
+        /**
+         * Returns the complete request URL, including scheme, host, port, and URI.
          * 
          * @return the request URL
          */
         virtual const char* getRequestURL() const=0;
-        
+
         /**
          * Returns the HTTP query string appened to the request. The query
          * string is returned without any decoding applied, everything found
index 2947a49..fdbe990 100644 (file)
@@ -130,6 +130,14 @@ public:
         return true;\r
     }\r
 \r
+    const char* getHostname() const {\r
+        return "localhost";\r
+    }\r
+\r
+    int getPort() const {\r
+        return 443;\r
+    }\r
+\r
     string getContentType() const {\r
         return "application/x-www-form-urlencoded";\r
     }\r
@@ -138,6 +146,10 @@ public:
         return -1;\r
     }\r
 \r
+    const char* getRequestURI() const {\r
+        return "/";\r
+    }\r
+\r
     const char* getRequestURL() const {\r
         return m_url.c_str();\r
     }\r