Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
yandex.php
1
<?php
2
3
namespace
Bitrix\Mail\Helper\OAuth
;
4
5
use
Bitrix\Main
;
6
use
Bitrix\Mail
;
7
8
class
Yandex
extends
Mail\Helper\OAuth
9
{
10
11
protected
function
__construct
()
12
{
13
$this->oauthEntity =
new
YandexInterface;
14
}
15
16
protected
function
check
()
17
{
18
$provider = new \CSocServYandexAuth;
19
20
return
$provider->checkSettings();
21
}
22
23
protected
function
mapUserData
(array $userData)
24
{
25
return
array(
26
'email'
=> $userData[
'default_email'
],
27
'first_name'
=> $userData[
'first_name'
],
28
'last_name'
=> $userData[
'last_name'
],
29
'full_name'
=> $userData[
'real_name'
],
30
'image'
=> sprintf(
'https://avatars.yandex.net/get-yapic/%s/islands-middle'
, $userData[
'default_avatar_id'
]),
31
//'error' => $data['error']['message'],
32
);
33
}
34
35
public
static
function
getServiceName
()
36
{
37
return
'yandex'
;
38
}
39
40
public
function
getControllerUrl
()
41
{
42
return \CSocServYandexAuth::CONTROLLER_URL;
43
}
44
45
}
46
47
if
(Main\Loader::includeModule(
'socialservices'
))
48
{
49
class
YandexInterface
extends
\CYandexOAuthInterface
50
{
51
52
public
function
getStorageTokens
()
53
{
54
return
false
;
55
}
56
57
public
function
getTokenData
()
58
{
59
return
array
(
60
'access_token'
=> $this->
access_token
,
61
'refresh_token'
=> $this->
refresh_token
,
62
'expires_in'
=> $this->
accessTokenExpires
,
63
);
64
}
65
66
public
function
getNewAccessToken
($refreshToken =
false
, $userId = 0,
$save
=
false
)
67
{
68
return
false
;
69
}
70
71
}
72
}
Bitrix\Mail\Helper\OAuth\Yandex
Definition
yandex.php:9
Bitrix\Mail\Helper\OAuth\Yandex\getServiceName
static getServiceName()
Definition
yandex.php:35
Bitrix\Mail\Helper\OAuth\Yandex\__construct
__construct()
Definition
yandex.php:11
Bitrix\Mail\Helper\OAuth\Yandex\mapUserData
mapUserData(array $userData)
Definition
yandex.php:23
Bitrix\Mail\Helper\OAuth\Yandex\check
check()
Definition
yandex.php:16
Bitrix\Mail\Helper\OAuth\Yandex\getControllerUrl
getControllerUrl()
Definition
yandex.php:40
Bitrix\Mail\Helper\OAuth
Definition
oauth.php:12
Bitrix\Main\DB\Connection\$host
$host
Definition
connection.php:29
Bitrix\Mail\Helper\OAuth
Definition
google.php:3
Bitrix\Mail
Definition
blacklist.php:3
Bitrix\Main
modules
mail
lib
helper
oauth
yandex.php
Создано системой
1.10.0