<P>If you do not need IPv4/IPv6 dual stack support, use one of the following links. This way, the system will only controls either IPv4 or IPv6.
</P>
<P>
-<a href="https://%%AUTHCGIURL%%?0-0-0&en">Network Authentication</a>
-<a href="http://%%AUTHCGIURL%%?0-0-0&en">Network Authentication(Unuse SSL)</a>
+<a href="https://%%AUTHCGIURL%%?addr=0-0-0&lang=en">Network Authentication</a>
+<a href="http://%%AUTHCGIURL%%?addr=0-0-0&lang=en">Network Authentication(Unuse SSL)</a>
</P>
</SMALL>
</BODY>
以下のリンクも使用できますが、IPv4とIPv6のどちらか一方のみを制御します。
</P>
<P>
-<a href="https://%%AUTHCGIURL%%?0-0-0&ja">ネットワーク利用者認証</a> <a href="http://%%AUTHCGIURL%%?0-0-0&ja">ネットワーク利用者認証(SSL非対応)</a>
+<a href="https://%%AUTHCGIURL%%?addr=0-0-0&lang=ja">ネットワーク利用者認証</a> <a href="http://%%AUTHCGIURL%%?addr=0-0-0&lang=ja">ネットワーク利用者認証(SSL非対応)</a>
</P>
</SMALL>
</BODY>
/*********************************************/
/* get HTTP-Cookie for OpengateAuth */
/*********************************************/
+ /* cookie string examples
+ "OpengateAuth=de..ac1&Userid=user1"
+ "OpengateAuth=de..ac1&Userid=user1; xxx=..; yyy=.."
+ "xxx=..; yyy=..; OpengateAuth=de..ac1&Userid=user1"
+ */
int getAuthCookie(char *cookie, char *userid){
char content[BUFFMAXLN];
char *name[1];
char *value[1];
char *next[1];
- char *ptr;
+ char *ptr=NULL;
+ char *ptrNext=NULL;
/* reset buffer */
cookie[0]='\0';
strncpy(content, getenv("HTTP_COOKIE"), BUFFMAXLN);
ptr=content;
+ /* search 'OpengateAuth' cookie string (terminated by ; or \0) */
+ while(ptr!=NULL){
+ if((ptrNext=strstr(ptr, "; "))==NULL) break; /* search "; " */
+ *ptrNext='\0'; /* overwrite string end */
+ ptrNext++; /* pointer to next string */
+ while(!isNull(ptrNext)&&*ptrNext==' ') ptrNext++; /* skip spaces */
+ if(strstr(ptr, COOKIENAME)==ptr) break; /* exit at matching */
+ ptr=ptrNext; /* check next string */
+ }
- /* get valuses of cookie */
+ /* get valuses of cookie from "OpengateAuth=de..ac1&Userid=user1" */
while(ptr!=NULL){
split(ptr, name, value, next);