mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-29 16:19:58 +09:00
17515512: JanRain php-openid library included, normalization fix
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5137 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f541dd59b9
commit
658c0e6dbc
219 changed files with 41415 additions and 10 deletions
|
|
@ -0,0 +1,38 @@
|
|||
<?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';
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue