PHP Класс Happyr\LinkedIn\Authenticator

Автор: Tobias Nyholm ([email protected])
Наследование: implements Happyr\LinkedIn\AuthenticatorInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$appId string The application ID.
$appSecret string The application secret.

Открытые методы

Метод Описание
__construct ( Happyr\LinkedIn\Http\RequestManagerInterface $requestManager, string $appId, string $appSecret )
clearStorage ( )
fetchNewAccessToken ( Happyr\LinkedIn\Http\LinkedInUrlGeneratorInterface $urlGenerator )
getLoginUrl ( Happyr\LinkedIn\Http\LinkedInUrlGeneratorInterface $urlGenerator, $options = [] )
setStorage ( Happyr\LinkedIn\Storage\DataStorageInterface $storage )

Защищенные методы

Метод Описание
establishCSRFTokenState ( ) Lays down a CSRF state token for this process.
getAccessTokenFromCode ( Happyr\LinkedIn\Http\LinkedInUrlGeneratorInterface $urlGenerator, string $code ) : Happyr\LinkedIn\AccessToken Retrieves an access token for the given authorization code (previously generated from www.linkedin.com on behalf of a specific user). The authorization code is sent to www.linkedin.com and a legitimate access token is generated provided the access token and the user for which it was generated all match, and the user is either logged in to LinkedIn or has granted an offline access permission.
getCode ( ) : string | null Get the authorization code from the query parameters, if it exists, and otherwise return null to signal no authorization code was discovered.
getRequestManager ( ) : RequestManager
getStorage ( ) : Happyr\LinkedIn\Storage\DataStorageInterface

Описание методов

__construct() публичный Метод

public __construct ( Happyr\LinkedIn\Http\RequestManagerInterface $requestManager, string $appId, string $appSecret )
$requestManager Happyr\LinkedIn\Http\RequestManagerInterface
$appId string
$appSecret string

clearStorage() публичный Метод

public clearStorage ( )

establishCSRFTokenState() защищенный Метод

Lays down a CSRF state token for this process.
protected establishCSRFTokenState ( )

fetchNewAccessToken() публичный Метод

public fetchNewAccessToken ( Happyr\LinkedIn\Http\LinkedInUrlGeneratorInterface $urlGenerator )
$urlGenerator Happyr\LinkedIn\Http\LinkedInUrlGeneratorInterface

getAccessTokenFromCode() защищенный Метод

Retrieves an access token for the given authorization code (previously generated from www.linkedin.com on behalf of a specific user). The authorization code is sent to www.linkedin.com and a legitimate access token is generated provided the access token and the user for which it was generated all match, and the user is either logged in to LinkedIn or has granted an offline access permission.
protected getAccessTokenFromCode ( Happyr\LinkedIn\Http\LinkedInUrlGeneratorInterface $urlGenerator, string $code ) : Happyr\LinkedIn\AccessToken
$urlGenerator Happyr\LinkedIn\Http\LinkedInUrlGeneratorInterface
$code string An authorization code.
Результат Happyr\LinkedIn\AccessToken An access token exchanged for the authorization code.

getCode() защищенный Метод

Get the authorization code from the query parameters, if it exists, and otherwise return null to signal no authorization code was discovered.
protected getCode ( ) : string | null
Результат string | null The authorization code, or null if the authorization code not exists.

getLoginUrl() публичный Метод

public getLoginUrl ( Happyr\LinkedIn\Http\LinkedInUrlGeneratorInterface $urlGenerator, $options = [] )
$urlGenerator Happyr\LinkedIn\Http\LinkedInUrlGeneratorInterface

getRequestManager() защищенный Метод

protected getRequestManager ( ) : RequestManager
Результат Happyr\LinkedIn\Http\RequestManager

getStorage() защищенный Метод

protected getStorage ( ) : Happyr\LinkedIn\Storage\DataStorageInterface
Результат Happyr\LinkedIn\Storage\DataStorageInterface

setStorage() публичный Метод

public setStorage ( Happyr\LinkedIn\Storage\DataStorageInterface $storage )
$storage Happyr\LinkedIn\Storage\DataStorageInterface

Описание свойств

$appId защищенное свойство

The application ID.
protected string $appId
Результат string

$appSecret защищенное свойство

The application secret.
protected string $appSecret
Результат string