*/ class Authorizations extends AbstractApi { /** * Check an application token. * * @param string $clientId * @param string|null $token * * @return array */ public function checkToken($clientId, $token = null) { return $this->post('/applications/'.rawurlencode($clientId).'/token', $token ? ['access_token' => $token] : []); } /** * Reset an application token. * * @param string $clientId * @param string|null $token * * @return array */ public function resetToken($clientId, $token = null) { return $this->patch('/applications/'.rawurlencode($clientId).'/token', $token ? ['access_token' => $token] : []); } /** * Revoke an application token. * * @param string $clientId * @param string|null $token * * @return void */ public function deleteToken($clientId, $token = null) { $this->delete('/applications/'.rawurlencode($clientId).'/token', $token ? ['access_token' => $token] : []); } /** * Revoke an application authorization. * * @param string $clientId * @param string|null $token * * @return void */ public function deleteGrant($clientId, $token = null) { $this->delete('/applications/'.rawurlencode($clientId).'/grant', $token ? ['access_token' => $token] : []); } }