* BIG rewrite of header handling and slimming of context_loop and session_loop; shuff...
[citadel.git] / webcit / openid.c
index a4af9d257a1bb4dda1f7618017d3a14b19a8ad01..4385f703be4ac49349ed35cfc9e97af20634dea0 100644 (file)
@@ -10,6 +10,7 @@
  */
 void display_openids(void)
 {
+       wcsession *WCC = WC;
        char buf[1024];
        int bg = 0;
 
@@ -20,7 +21,7 @@ void display_openids(void)
        svput("BOXTITLE", WCS_STRING, _("Manage Account/OpenID Associations"));
        do_template("beginboxx", NULL);
 
-       if (serv_info.serv_supports_openid) {
+       if (WCC->serv_info->serv_supports_openid) {
 
                wprintf("<table class=\"altern\">");
        
@@ -43,7 +44,7 @@ void display_openids(void)
                wprintf("</table><br />\n");
        
                wprintf("<form method=\"POST\" action=\"openid_attach\">\n");
-               wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%d\">\n", WC->nonce);
+               wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%d\">\n", WCC->nonce);
                wprintf(_("Add an OpenID: "));
                wprintf("<input type=\"text\" name=\"openid_url\" class=\"openid_urlarea\" size=\"40\">\n");
                wprintf("<input type=\"submit\" name=\"attach_button\" value=\"%s\">"
@@ -51,7 +52,7 @@ void display_openids(void)
        }
 
        else {
-               wprintf(_("%s does not permit authentication via OpenID."), ChrPtr(serv_info.serv_humannode));
+               wprintf(_("%s does not permit authentication via OpenID."), ChrPtr(WCC->serv_info->serv_humannode));
        }
 
        do_template("endbox", NULL);
@@ -74,8 +75,8 @@ void openid_attach(void) {
                snprintf(buf, sizeof buf,
                         "OIDS %s|%s://%s/finalize_openid_login|%s://%s",
                         bstr("openid_url"),
-                        (is_https ? "https" : "http"), ChrPtr(WCC->http_host),
-                        (is_https ? "https" : "http"), ChrPtr(WCC->http_host)
+                        (is_https ? "https" : "http"), ChrPtr(WCC->Hdr->http_host),
+                        (is_https ? "https" : "http"), ChrPtr(WCC->Hdr->http_host)
                );
 
                serv_puts(buf);