mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-17 10:19:55 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5137 201d5d3c-b55e-5fd7-737f-ddc643e51545
38 lines
No EOL
1.2 KiB
PHP
38 lines
No EOL
1.2 KiB
PHP
<?php
|
|
|
|
require_once "common.php";
|
|
session_start();
|
|
|
|
// Complete the authentication process using the server's response.
|
|
$response = $consumer->complete($_GET);
|
|
|
|
if ($response->status == Auth_OpenID_CANCEL) {
|
|
// This means the authentication was cancelled.
|
|
$msg = 'Verification cancelled.';
|
|
} else if ($response->status == Auth_OpenID_FAILURE) {
|
|
$msg = "OpenID authentication failed: " . $response->message;
|
|
} else if ($response->status == Auth_OpenID_SUCCESS) {
|
|
// This means the authentication succeeded.
|
|
$openid = $response->identity_url;
|
|
$esc_identity = htmlspecialchars($openid, ENT_QUOTES);
|
|
$success = sprintf('You have successfully verified ' .
|
|
'<a href="%s">%s</a> as your identity.',
|
|
$esc_identity, $esc_identity);
|
|
|
|
if ($response->endpoint->canonicalID) {
|
|
$success .= ' (XRI CanonicalID: '.$response->endpoint->canonicalID.') ';
|
|
}
|
|
|
|
$sreg = $response->extensionResponse('sreg');
|
|
|
|
if (@$sreg['email']) {
|
|
$success .= " You also returned '".$sreg['email']."' as your email.";
|
|
}
|
|
if (@$sreg['postcode']) {
|
|
$success .= " Your postal code is '".$sreg['postcode']."'";
|
|
}
|
|
}
|
|
|
|
include 'index.php';
|
|
|
|
?>
|