Method | Description | |
---|---|---|
__construct ( |
||
authorize ( array $userParameters = [] ) | redirect to authorize endpoint of service | |
callApiEndpoint ( string $endpoint, string $method = 'GET', array $uriParameters = [], mixed $postBody = null, array $additionalHeaders = [] ) : string | call an api endpoint. automatically adds needed authorization headers with access token or parameters | |
getAccessToken ( string $code = null ) | get access token of from service, has to be called after successful authorization | |
refreshAccessToken ( |
refresh access token |
Method | Description | |
---|---|---|
_parseAccessTokenResponse ( |
parse the response of an access token request and store it in dataStore |
public __construct ( |
||
$client | ||
$configuration | ||
$dataStore | oauth2\DataStore | |
$scope | string | optional |
public callApiEndpoint ( string $endpoint, string $method = 'GET', array $uriParameters = [], mixed $postBody = null, array $additionalHeaders = [] ) : string | ||
$endpoint | string | |
$method | string | default 'GET' |
$uriParameters | array | optional |
$postBody | mixed | optional, can be string or array |
$additionalHeaders | array | |
return | string |
public getAccessToken ( string $code = null ) | ||
$code | string | optional, if no code given method tries to get it out of $_GET |
public refreshAccessToken ( |
||
$token | ||
return | new token object |