1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс OAuth
Граф наследования:OAuth:
Google LiveId Mailru Office365 Yandex

Открытые члены

 buildMeta ()
 getOAuthEntity ()
 getStoredUid ()
 getRedirect (bool $final=true)
 getUrl ()
 getStoredToken ($uid=null, int $expireGapSeconds=10)
 getAccessToken ($code=null)
 getUserData ($secure=true)
 saveResponse ($state)
 getPublicUserData ()
 handleResponse (array $state, $context=self::WEB_TYPE)

Открытые статические члены

static getKnownServices ()
static getInstance ($service=null)
static getInstanceByMeta ($meta)
static parseMeta ($meta)
static getTokenByMeta ($meta, int $expireGapSeconds=10)
static getUserDataByMeta ($meta, $secure=true)
static getServiceName ()
static convertTokenExpiresToUnixtimeIfNeed (int $intervalOrTime)

Поля данных

const WEB_TYPE = 'web'
const MOBILE_TYPE = 'mobile'

Защищенные члены

 fetchStoredToken ()
 mapUserData (array $userData)
 setPublicUserData (UserData $userData)

Защищенные данные

 $oauthEntity
 $service
 $storedUid
UserData $publicUserData

Подробное описание

См. определение в файле oauth.php строка 11

Методы

◆ buildMeta()

buildMeta ( )

Returns packed metadata for instance

Возвращает
string
Исключения
Main

ObjectException

См. определение в файле oauth.php строка 117

◆ convertTokenExpiresToUnixtimeIfNeed()

convertTokenExpiresToUnixtimeIfNeed ( int $intervalOrTime)
static

Convert expires to unixtime, because it can be interval like 3600 seconds or date

Аргументы
int$intervalOrTimeUnixtime or seconds to expire
Возвращает
int

См. определение в файле oauth.php строка 471

◆ fetchStoredToken()

fetchStoredToken ( )
protected

Fetches token by instance UID from DB

Возвращает
array|false

См. определение в файле oauth.php строка 332

◆ getAccessToken()

getAccessToken ( $code = null)

Obtains tokens from service

Аргументы
string$codeService authorization code.
Возвращает
boolean

См. определение в файле oauth.php строка 404

◆ getInstance()

getInstance ( $service = null)
static

Returns helper instance

Аргументы
string$serviceService name.
Возвращает
\Bitrix\Mail\Helper\OAuth|false

См. определение в файле oauth.php строка 54

◆ getInstanceByMeta()

getInstanceByMeta ( $meta)
static

Returns helper instance by packed metadata

Аргументы
string$metaPacked metadata.
Возвращает
\Bitrix\Mail\Helper\OAuth|false

См. определение в файле oauth.php строка 95

◆ getKnownServices()

getKnownServices ( )
static

Returns the list of supported services

Возвращает
array

См. определение в файле oauth.php строка 30

◆ getOAuthEntity()

getOAuthEntity ( )

Returns service interface entity

Возвращает
mixed

См. определение в файле oauth.php строка 258

◆ getPublicUserData()

getPublicUserData ( )

См. определение в файле oauth.php строка 547

◆ getRedirect()

getRedirect ( bool $final = true)

Returns server OAuth handler URI

Аргументы
boolean$finalSkip Bitrix24 proxy.
Возвращает
string

См. определение в файле oauth.php строка 279

◆ getServiceName()

getServiceName ( )
static

Returns service name

Исключения

Bitrix\Main\ObjectException

Возвращает
string

Переопределяется в Google, LiveId, Mailru, Office365 и Yandex.

См. определение в файле oauth.php строка 459

◆ getStoredToken()

getStoredToken ( $uid = null,
int $expireGapSeconds = 10 )

Returns token by instance UID

Аргументы
string$uidInstance UID.
int$expireGapSecondsGap needed for using token, to ensure when we use token it still alive
Возвращает
string|null

См. определение в файле oauth.php строка 352

◆ getStoredUid()

getStoredUid ( )

Returns instance UID

Возвращает
string

См. определение в файле oauth.php строка 268

◆ getTokenByMeta()

getTokenByMeta ( $meta,
int $expireGapSeconds = 10 )
static

Returns token by packed metadata

Аргументы
string$metaPacked metadata.
int$expireGapSecondsGap needed for using token, to ensure when we use token it still alive
Возвращает
string|null

См. определение в файле oauth.php строка 203

◆ getUrl()

getUrl ( )

Returns service OAuth endpoint URI

Возвращает
string

См. определение в файле oauth.php строка 297

◆ getUserData()

getUserData ( $secure = true)

Returns user data

Аргументы
boolean$secureStrip raw data (includes tokens).
Возвращает
array|null

См. определение в файле oauth.php строка 426

◆ getUserDataByMeta()

getUserDataByMeta ( $meta,
$secure = true )
static

Returns user data by packed metadata

Аргументы
string$metaPacked metadata.
boolean$secureStrip raw data (includes tokens).
Возвращает
array|null

См. определение в файле oauth.php строка 228

◆ handleResponse()

handleResponse ( array $state,
$context = self::WEB_TYPE )

Handles service response

Аргументы
array$stateResponse data.
Возвращает
void

См. определение в файле oauth.php строка 558

◆ mapUserData()

mapUserData ( array $userData)
abstractprotected

Returns unified user data

Аргументы
array$userDataUser data.
Возвращает
array

Переопределяется в Google, LiveId, Mailru, Office365 и Yandex.

◆ parseMeta()

parseMeta ( $meta)
static

Returns unpacked metadata

Аргументы
string$metaPacked metadata.
Возвращает
array

См. определение в файле oauth.php строка 132

◆ saveResponse()

saveResponse ( $state)

См. определение в файле oauth.php строка 480

◆ setPublicUserData()

setPublicUserData ( UserData $userData)
protected

См. определение в файле oauth.php строка 542

Поля

◆ $oauthEntity

$oauthEntity
protected

См. определение в файле oauth.php строка 17

◆ $publicUserData

UserData $publicUserData
protected

См. определение в файле oauth.php строка 23

◆ $service

$service
protected

См. определение в файле oauth.php строка 19

◆ $storedUid

$storedUid
protected

См. определение в файле oauth.php строка 19

◆ MOBILE_TYPE

const MOBILE_TYPE = 'mobile'

См. определение в файле oauth.php строка 22

◆ WEB_TYPE

const WEB_TYPE = 'web'

См. определение в файле oauth.php строка 21


Объявления и описания членов класса находятся в файле:
  • C:/bitrix/modules/mail/lib/helper/oauth.php