@@ -77,21 +77,26 @@ function librdf_php_last_log_message(){}
77
77
78
78
if (isset ($ _SERVER ['SSL_CLIENT_CERT ' ])) {
79
79
require_once ('webid.lib.php ' );
80
- $ _user = webid_verify ();
81
-
82
- $ _webid = webid_getinfo ($ _user );
83
-
84
- if (DEBUG ) {
85
- openlog ('RWW.IO ' , LOG_PID | LOG_ODELAY ,LOG_LOCAL4 );
86
- syslog (LOG_INFO , 'Authenticated: ' .$ _user .' / ' .$ _webid ['name ' ]);
87
- closelog ();
80
+ $ q = webid_claim ();
81
+ if (isset ($ q ['uri ' ]) && $ q ['uri ' ] != $ _user ) {
82
+ $ _user = webid_verify ();
83
+
84
+ $ _webid = webid_getinfo ($ _user );
85
+
86
+ if (DEBUG ) {
87
+ openlog ('RWW.IO ' , LOG_PID | LOG_ODELAY ,LOG_LOCAL4 );
88
+ syslog (LOG_INFO , 'Authenticated: ' .$ _user .' / ' .$ _webid ['name ' ]);
89
+ closelog ();
90
+ }
91
+
92
+ //if (!isSess('u:name'))
93
+ sess ('u:name ' , $ _webid ['name ' ]);
94
+ //if (!isSess('u:pic'))
95
+ sess ('u:pic ' , $ _webid ['pic ' ]);
96
+
97
+ if (strlen ($ _user ) && isset ($ _SERVER ['SSL_CLIENT_S_DN_CN ' ]))
98
+ $ _user_name = $ _SERVER ['SSL_CLIENT_S_DN_CN ' ];
88
99
}
89
- // overwrite the name and pic
90
- sess ('u:name ' , $ _webid ['name ' ]);
91
- sess ('u:pic ' , $ _webid ['pic ' ]);
92
-
93
- if (strlen ($ _user ) && isset ($ _SERVER ['SSL_CLIENT_S_DN_CN ' ]))
94
- $ _user_name = $ _SERVER ['SSL_CLIENT_S_DN_CN ' ];
95
100
}
96
101
97
102
# proper Emails
0 commit comments