Property | 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. |
Method | 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. |
Method | 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. |
return | access token. |
public buildAuthUrl ( array $params = [] ) : string | ||
$params | array | additional auth GET params. |
return | string | authorization URL. |
protected createToken ( array $tokenConfig = [] ) : |
||
$tokenConfig | array | token configuration. |
return | token instance. |
protected defaultReturnUrl ( ) : string | ||
return | string | return URL. |
public fetchAccessToken ( string $authCode, array $params = [] ) : |
||
$authCode | string | authorization code, usually comes at $_GET['code']. |
$params | array | additional request params. |
return | access token. |
protected generateAuthState ( ) : string | ||
return | string | auth state value. |
public refreshAccessToken ( |
||
$token | expired auth token. | |
return | new auth token. |
public $validateAuthState |