beginAuth($openid); // Handle failure status return values. if ($status != Auth_OpenID_SUCCESS) { print "Authentication error."; exit(0); } // If we got a successful return, continue the auth by redirecting the // user agent to the OpenID server. Be sure to give the server a URL // that will cause this script's "process" function to process the // server's response. $_SESSION['openid_token'] = $info->token; $redirect_url = @$consumer->constructRedirect($info, $process_url, $trust_root); header("Location: ".$redirect_url); ?>