Свойство | Type | Description | |
---|---|---|---|
$clientId | OAuth client ID. | ||
$clientSecret | OAuth client secret. | ||
$tokenUrl | token request URL endpoint. | ||
$validateAuthState | whether to use and validate auth 'state' parameter in authentication flow. If enabled - the opaque value will be generated and applied to auth URL to maintain state between the request and callback. The authorization server includes this value, when redirecting the user-agent back to the client. The option is used for preventing cross-site request forgery. | ||
$version | protocol version. |
Méthode | Description | |
---|---|---|
applyAccessTokenToRequest ( $request, $accessToken ) | ||
authenticateClient ( array $params = [] ) : |
Authenticate OAuth client directly at the provider without third party (user) involved, using 'client_credentials' grant type. | |
authenticateUser ( string $username, string $password, array $params = [] ) : |
Authenticates user directly by 'username/password' pair, using 'password' grant type. | |
buildAuthUrl ( array $params = [] ) : string | Composes user authorization URL. | |
fetchAccessToken ( string $authCode, array $params = [] ) : |
Fetches access token from authorization code. | |
refreshAccessToken ( |
Gets new auth token to replace expired one. |
Méthode | Description | |
---|---|---|
createToken ( array $tokenConfig = [] ) : |
Creates token from its configuration. | |
defaultReturnUrl ( ) : string | Composes default [[returnUrl]] value. | |
generateAuthState ( ) : string | Generates the auth state value. |
public applyAccessTokenToRequest ( $request, $accessToken ) |
public authenticateClient ( array $params = [] ) : |
||
$params | array | additional request params. |
Résultat | access token. |
public buildAuthUrl ( array $params = [] ) : string | ||
$params | array | additional auth GET params. |
Résultat | string | authorization URL. |
protected createToken ( array $tokenConfig = [] ) : |
||
$tokenConfig | array | token configuration. |
Résultat | token instance. |
protected defaultReturnUrl ( ) : string | ||
Résultat | string | return URL. |
public fetchAccessToken ( string $authCode, array $params = [] ) : |
||
$authCode | string | authorization code, usually comes at $_GET['code']. |
$params | array | additional request params. |
Résultat | access token. |
protected generateAuthState ( ) : string | ||
Résultat | string | auth state value. |
public refreshAccessToken ( |
||
$token | expired auth token. | |
Résultat | new auth token. |
public $validateAuthState |