Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
google.php
1
<?php
2
3
namespace
Bitrix\Mail\Helper\OAuth
;
4
5
use
Bitrix\Main
;
6
use
Bitrix\Mail
;
7
8
class
Google
extends
Mail\Helper\OAuth
9
{
10
11
protected
function
__construct
()
12
{
13
$this->oauthEntity =
new
GoogleInterface;
14
15
$this->oauthEntity->addScope(array(
16
'email'
,
17
'https://mail.google.com/'
,
18
));
19
}
20
21
protected
function
check
()
22
{
23
$provider = new \CSocServGoogleOAuth;
24
25
return
$provider->checkSettings();
26
}
27
28
protected
function
mapUserData
(array $userData)
29
{
30
return
array(
31
'email'
=> $userData[
'email'
],
32
'first_name'
=> $userData[
'given_name'
],
33
'last_name'
=> $userData[
'family_name'
],
34
'full_name'
=> $userData[
'name'
],
35
'image'
=> $userData[
'picture'
],
36
'error'
=> $userData[
'error'
][
'message'
],
37
);
38
}
39
40
public
static
function
getServiceName
()
41
{
42
return
'google'
;
43
}
44
45
public
function
getControllerUrl
()
46
{
47
return \CSocServAuth::getControllerUrl();
48
}
49
50
}
51
52
if
(Main\Loader::includeModule(
'socialservices'
))
53
{
54
class
GoogleInterface
extends
\CGoogleOAuthInterface
55
{
56
57
public
function
getStorageTokens
()
58
{
59
return
false
;
60
}
61
62
public
function
getTokenData
()
63
{
64
return
array
(
65
'access_token'
=> $this->
access_token
,
66
'refresh_token'
=> $this->
refresh_token
,
67
'expires_in'
=> $this->
accessTokenExpires
,
68
);
69
}
70
71
}
72
}
Bitrix\Mail\Helper\OAuth\Google
Definition
google.php:9
Bitrix\Mail\Helper\OAuth\Google\getServiceName
static getServiceName()
Definition
google.php:40
Bitrix\Mail\Helper\OAuth\Google\__construct
__construct()
Definition
google.php:11
Bitrix\Mail\Helper\OAuth\Google\mapUserData
mapUserData(array $userData)
Definition
google.php:28
Bitrix\Mail\Helper\OAuth\Google\check
check()
Definition
google.php:21
Bitrix\Mail\Helper\OAuth\Google\getControllerUrl
getControllerUrl()
Definition
google.php:45
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
google.php
Создано системой
1.10.0