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/trunk@1564 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
97c7db301f
commit
4b747ef218
8 changed files with 106 additions and 2 deletions
|
|
@ -31,6 +31,61 @@
|
|||
return $this->doLogin($user_id, $password);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief openid로그인
|
||||
**/
|
||||
function procMemberOpenIDLogin() {
|
||||
ob_start();
|
||||
require('./modules/member/openid_lib/class.openid.php');
|
||||
require_once('./modules/member/openid_lib/libcurlemu.inc.php');
|
||||
|
||||
$user_id = Context::get('user_id');
|
||||
|
||||
$openid = new SimpleOpenID();
|
||||
|
||||
$openid->SetIdentity($user_id);
|
||||
$openid->SetTrustRoot('http://' . $_SERVER["HTTP_HOST"]);
|
||||
|
||||
$openid->SetRequiredFields(array('email','fullname','dob'));
|
||||
|
||||
if (!$openid->GetOpenIDServer()) {
|
||||
$error = $openid->GetError();
|
||||
$this->setError(-1);
|
||||
$this->setMessage($error['description']);
|
||||
} else {
|
||||
$openid->SetApprovedURL( getUrl('','module','member','act','procMemberOpenIDValidate') );
|
||||
$url = $openid->GetRedirectURL();
|
||||
$this->add('redirect_url', $url);
|
||||
}
|
||||
ob_clean();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief openid 인증 체크
|
||||
**/
|
||||
function procMemberOpenIDValidate() {
|
||||
ob_start();
|
||||
require('./modules/member/openid_lib/class.openid.php');
|
||||
require_once('./modules/member/openid_lib/libcurlemu.inc.php');
|
||||
|
||||
$openid = new SimpleOpenID;
|
||||
$openid->SetIdentity($_GET['openid_identity']);
|
||||
$openid_validation_result = $openid->ValidateWithServer();
|
||||
|
||||
if ($openid_validation_result == true) {
|
||||
} else if($openid->IsError() == true) {
|
||||
$error = $openid->GetError();
|
||||
return $this->stop($error['description']);
|
||||
} else {
|
||||
return $this->stop('invalid_authorization');
|
||||
}
|
||||
ob_clean();
|
||||
print "<xmp>";
|
||||
print_r($_REQUEST);
|
||||
print "</xmp>";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 로그아웃
|
||||
**/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue