Gentics Portal.Node PHP API
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
All
Classes
Namespaces
Functions
Variables
Pages
common
extensions
eauth
services
YandexOpenIDService.php
1
<?php
2
/**
3
* YandexOpenIDService class file.
4
*
5
* @author Maxim Zemskov <nodge@yandex.ru>
6
* @link http://code.google.com/p/yii-eauth/
7
* @license http://www.opensource.org/licenses/bsd-license.php
8
*/
9
10
require_once dirname(dirname(__FILE__)) .
'/EOpenIDService.php'
;
11
12
/**
13
* Yandex provider class.
14
* @package application.extensions.eauth.services
15
*/
16
class
YandexOpenIDService
extends
EOpenIDService
{
17
18
protected
$name =
'yandex'
;
19
protected
$title =
'Yandex'
;
20
protected
$type =
'OpenID'
;
21
protected
$jsArguments = array(
'popup'
=> array(
'width'
=> 900,
'height'
=> 550));
22
23
protected
$url =
'http://openid.yandex.ru/'
;
24
protected
$requiredAttributes = array(
25
'name'
=> array(
'fullname'
,
'namePerson'
),
26
//'username' => array('nickname', 'namePerson/friendly'),
27
//'email' => array('email', 'contact/email'),
28
//'gender' => array('gender', 'person/gender'),
29
//'birthDate' => array('dob', 'birthDate'),
30
);
31
32
protected
function
fetchAttributes
() {
33
if
(isset($this->attributes[
'username'
]) && !empty($this->attributes[
'username'
]))
34
$this->attributes[
'url'
] =
'http://openid.yandex.ru/'
.$this->attributes[
'username'
];
35
36
//if (isset($this->attributes['birthDate']) && !empty($this->attributes['birthDate']))
37
//$this->attributes['birthDate'] = strtotime($this->attributes['birthDate']);
38
}
39
}
Generated on Thu Feb 6 2014 15:47:54 for Gentics Portal.Node PHP API by
1.8.1.2