isError()) { exit_error($u->getErrorMessage(),'my'); } $plugin = plugin_get_object('authwebid'); // we receive this when addition or deletion is confirmed $webid_identity = htmlspecialchars(trim(getStringFromRequest('webid_identity', 'http://'))); // When invoked back by the IdP, the request is signed if (getStringFromRequest('sig') != '') { // First, verify that we indeed got invoked back as a callback of the IdP delegated auth if ( $plugin->justBeenAuthenticatedByIdP() ) { // We can then trust the webid set by WebIDDelegatedAuth lib $webid_identity = $plugin->getCurrentWebID(); // Now, if we went back to the IdP in order to confirm a pending binding, it's time to bind it if ( $plugin->isStoredPendingWebID($u->getID(), $webid_identity) ) { $error_msg = $plugin->bindStoredWebID($u->getID(), $webid_identity); if ($error_msg) { $webid_identity = 'http://'; } else { $feedback = _('The IdP has confirmed that you own this WebID. It is now bound to your account.'); } } else { // or it's the first time we went to the IdP, and we wait until the confirmation of the binding to really use it $error_msg = $plugin->addStoredPendingWebID($u->getID(), $webid_identity); if ($error_msg) { $webid_identity = 'http://'; } else { $feedback = _('The IdP has confirmed that you own a WebID. Please confirm you want to bind it to your account.'); } } } } // If called to remove an identity if (getStringFromRequest('delete') != '') { $error_msg = $plugin->removeStoredWebID($u->getID(), $webid_identity); if (!$error_msg) { $feedback = _('Identity successfully deleted'); $webid_identity = 'http://'; } } // In all cases, we display the management screen $title = sprintf(_('Manage WebID identities for user %1$s'), $u->getUnixName()); site_user_header(array('title'=>$title)); echo $HTML->boxTop(_('My WebID identities')); ?>
'; echo _('Once you have confirmed their binding to your fusionforge account, you may use them to login.') ?>
getStoredPendingWebIDs($u->getID()); if( count($pendingwebids) ) { echo $HTML->listTableTop(array(_('Already pending WebIDs you could bind to your account'), '')); $i = 0; foreach($pendingwebids as $webid_identity) { echo ''. _("You haven't yet bound any WebID to your account") . '
'; } echo $HTML->boxBottom(); site_user_footer(array()); // Local Variables: // mode: php // c-file-style: "bsd" // End: ?>