1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
google.php
См. документацию.
1<?php
2
4
7
9{
10
11 protected function __construct()
12 {
13 $this->oauthEntity = new GoogleInterface;
14
15 $this->oauthEntity->setScope(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
52if (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}
if(!Loader::includeModule('messageservice')) $provider
Определения callback_ednaruimhpx.php:21
static getServiceName()
Определения google.php:40
mapUserData(array $userData)
Определения google.php:28
getControllerUrl()
Определения google.php:45
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
Определения blacklist.php:3