PHP Class Happyr\LinkedIn\Authenticator

Author: Tobias Nyholm ([email protected])
Inheritance: implements Happyr\LinkedIn\AuthenticatorInterface
Afficher le fichier Open project: happyr/linkedin-api-client

Protected Properties

Свойство Type Description
$appId string The application ID.
$appSecret string The application secret.

Méthodes publiques

Méthode Description
__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 )

Méthodes protégées

Méthode Description
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

Method Details

__construct() public méthode

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

clearStorage() public méthode

public clearStorage ( )

establishCSRFTokenState() protected méthode

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

fetchNewAccessToken() public méthode

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

getAccessTokenFromCode() protected méthode

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.
Résultat Happyr\LinkedIn\AccessToken An access token exchanged for the authorization code.

getCode() protected méthode

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
Résultat string | null The authorization code, or null if the authorization code not exists.

getLoginUrl() public méthode

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

getRequestManager() protected méthode

protected getRequestManager ( ) : RequestManager
Résultat Happyr\LinkedIn\Http\RequestManager

getStorage() protected méthode

protected getStorage ( ) : Happyr\LinkedIn\Storage\DataStorageInterface
Résultat Happyr\LinkedIn\Storage\DataStorageInterface

setStorage() public méthode

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

Property Details

$appId protected_oe property

The application ID.
protected string $appId
Résultat string

$appSecret protected_oe property

The application secret.
protected string $appSecret
Résultat string