Bearer¶
-
class
DreamCommerce\ShopAppstoreLib\Client\Bearer¶
An abstract client class for most of REST operations.
This class implements DreamCommerce\ShopAppstoreLib\ClientInterface.
constants¶
HTTP_ERROR_INVALID_REQUEST- invalid HTTP request
HTTP_ERROR_UNAUTHORIZED_CLIENT- connection lacks from authorization data
HTTP_ERROR_ACCESS_DENIED- access for specified client is denied
HTTP_ERROR_UNSUPPORTED_RESPONSE_TYPE- response type is unsupported
HTTP_ERROR_UNSUPPORTED_GRANT_TYPE- grant is unsupported
HTTP_ERROR_INVALID_SCOPE- scope is invalid
HTTP_ERROR_INVALID_GRANT- grant is invalid
HTTP_ERROR_INSUFFICIENT_SCOPE- current token has insufficient permissions
HTTP_ERROR_REDIRECT_URI_MISMATCH- problem with redirection
HTTP_ERROR_SERVER_ERROR- internal server error occurred
HTTP_ERROR_TEMPORARILY_UNAVAILABLE- server returned 5xx error
methods¶
-
DreamCommerce\ShopAppstoreLib\Client\Bearer::__construct($options =[])¶ constructor
Parameters: - $options (array) – object instantiation options
Throws: ClientException
Available options keys:
entrypoint- shop URL
-
DreamCommerce\ShopAppstoreLib\Client\Bearer::getAccessToken()¶ Get already set token.
Return type: string
-
DreamCommerce\ShopAppstoreLib\Client\Bearer::setAccessToken($token)¶ Set token.
Parameters: - $token (string) – token
-
DreamCommerce\ShopAppstoreLib\Client\Bearer::getExpiresIn()¶ Get token expiration.
Return type: string
-
DreamCommerce\ShopAppstoreLib\Client\Bearer::setExpiresIn($expiresIn)¶ Set token expiration
Parameters: - $expiresIn (integer) – expiration