Added time and providerId params on redirect
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Mon, 2 Feb 2004 05:20:51 +0000 (05:20 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Mon, 2 Feb 2004 05:20:51 +0000 (05:20 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@794 cb58f699-b61c-0410-a6fe-9272a202ed29

isapi_shib/isapi_shib.cpp

index ab3c9b2..8c4884d 100644 (file)
@@ -513,8 +513,11 @@ extern "C" DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc, DWORD notificat
         if (buf.empty() || !(session_id=strstr(buf,shib_cookie.c_str())) || *(session_id+shib_cookie.length())!='=')
         {
             // Redirect to WAYF.
+            char timebuf[16];
+            sprintf(timebuf,"%u",time(NULL));
             string wayf("Location: ");
-            wayf+=wayfLocation + "?shire=" + url_encode(shire_url.c_str()) + "&target=" + url_encode(target_url.c_str()) + "\r\n";
+            wayf+=wayfLocation + "?shire=" + url_encode(shire_url.c_str()) + "&target=" + url_encode(target_url.c_str()) +
+                "&time=" + timebuf + "&providerId=" + application_id + "\r\n";
             // Insert the headers.
             pfc->AddResponseHeaders(pfc,const_cast<char*>(wayf.c_str()),0);
             pfc->ServerSupportFunction(pfc,SF_REQ_SEND_RESPONSE_HEADER,"302 Please Wait",0,0);
@@ -558,8 +561,11 @@ extern "C" DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc, DWORD notificat
             if (status->isRetryable()) {
                 // Redirect to WAYF.
                 delete status;
+                char timebuf[16];
+                sprintf(timebuf,"%u",time(NULL));
                 string wayf("Location: ");
-                wayf+=wayfLocation + "?shire=" + url_encode(shire_url.c_str()) + "&target=" + url_encode(target_url.c_str()) + "\r\n";
+                wayf+=wayfLocation + "?shire=" + url_encode(shire_url.c_str()) + "&target=" + url_encode(target_url.c_str()) +
+                    "&time=" + timebuf + "&providerId=" + application_id + "\r\n";
                 // Insert the headers.
                 pfc->AddResponseHeaders(pfc,const_cast<char*>(wayf.c_str()),0);
                 pfc->ServerSupportFunction(pfc,SF_REQ_SEND_RESPONSE_HEADER,"302 Please Wait",0,0);
@@ -909,7 +915,10 @@ extern "C" DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpECB)
         if (status->isError()) {
             if (status->isRetryable()) {
                 delete status;
-                string wayf=wayfLocation + "?shire=" + url_encode(shire_url.c_str()) + "&target=" + url_encode(target);
+                char timebuf[16];
+                sprintf(timebuf,"%u",time(NULL));
+                string wayf=wayfLocation + "?shire=" + url_encode(shire_url.c_str()) + "&target=" + url_encode(target) +
+                    "&time=" + timebuf + "&providerId=" + application_id;
                 DWORD len=wayf.length();
                 if (lpECB->ServerSupportFunction(lpECB->ConnID,HSE_REQ_SEND_URL_REDIRECT_RESP,(LPVOID)wayf.c_str(),&len,0))
                     return HSE_STATUS_SUCCESS;