diff options
author | tailor <cygnus@janrain.com> | 2006-05-11 00:07:28 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2006-05-11 00:07:28 +0000 |
commit | f28e29123ee6d096b4550f44c6b4d165782270b8 (patch) | |
tree | 603592ed767a5b816e349aad32928b51fae8360b /examples/consumer/try_auth.php | |
parent | 743d12a13f60819281151be2cf67e8fd6367cd9c (diff) | |
download | php-openid-f28e29123ee6d096b4550f44c6b4d165782270b8.zip php-openid-f28e29123ee6d096b4550f44c6b4d165782270b8.tar.gz php-openid-f28e29123ee6d096b4550f44c6b4d165782270b8.tar.bz2 |
[project @ Finished preliminary changes to consumer example]
Diffstat (limited to 'examples/consumer/try_auth.php')
-rw-r--r-- | examples/consumer/try_auth.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/consumer/try_auth.php b/examples/consumer/try_auth.php index 6aa6fd1..7f1355f 100644 --- a/examples/consumer/try_auth.php +++ b/examples/consumer/try_auth.php @@ -21,10 +21,10 @@ $trust_root = sprintf("http://%s%s", dirname($_SERVER['PHP_SELF'])); // Begin the OpenID authentication process. -list($status, $info) = @$consumer->beginAuth($openid); +$auth_request = $consumer->begin($openid); // Handle failure status return values. -if ($status != Auth_OpenID_SUCCESS) { +if (!$auth_request) { $error = "Authentication error."; include 'index.php'; exit(0); @@ -32,9 +32,9 @@ if ($status != Auth_OpenID_SUCCESS) { // Redirect the user to the OpenID server for authentication. Store // the token for this authentication so we can verify the response. -$_SESSION['openid_token'] = $info->token; -$redirect_url = @$consumer->constructRedirect($info, $process_url, - $trust_root); + +$redirect_url = $auth_request->redirectURL($trust_root, + $process_url); header("Location: ".$redirect_url); |