예제 #1
0
<?php

session_start();
require_once 'includes/GoogleOpenID.php';
if (array_key_exists('identity', $_SESSION)) {
    session_destroy();
    header('Location: index.php');
    exit;
}
$googleLogin = GoogleOpenID::createRequest('voicegrowl/return.php', null, true);
$googleLogin->redirect();
?>


예제 #2
0
<?php

include_once "googleopenid.inc";
//fetch an association handle
$association_handle = GoogleOpenID::getAssociationHandle();
setcookie("google_association_handle", $association_handle, time() + 60 * 60 * 24 * 7 * 2, "/");
setcookie("page_before_google_oauth", $_SERVER['HTTP_REFERER'], time() + 60 * 10, "/");
$googleLogin = GoogleOpenID::createRequest('/oauth/return.php', $association_handle, true);
$googleLogin->redirect();
?>

예제 #3
0
파일: return.php 프로젝트: rlum/shareStuff
<?php

//include ('GoogleOpenID.php');
$googleLogin = GoogleOpenID::getResponse();
if ($googleLogin->success()) {
    $user_id = $googleLogin->identity();
    include 'list.php';
}
?>

예제 #4
0
 public function endPoint()
 {
     //if we know the value of op_endpoint already
     if (!is_null($this->op_endpoint)) {
         return $this->op_endpoint;
     }
     //fetch the endpoint from Google
     $endpoint = GoogleOpenID::getEndPoint();
     //save it
     $this->op_endpoint = $endpoint;
     //return the endpoint
     return $endpoint;
 }