RestContext::authenitcatedAsWithClient PHP Méthode

authenitcatedAsWithClient() public méthode

public authenitcatedAsWithClient ( string $username, string $password, string $client, $secret ) : void
$username string
$password string
$client string
Résultat void
    public function authenitcatedAsWithClient($username, $password, $client, $secret)
    {
        $tokenUrl = '/v2/token?client_id=' . $client . '&grant_type=password&username=' . $username . '&password=' . $password . '&client_secret=' . $secret;
        $this->client->call($this->getMainContext()->getParameter('oauth_url') . $tokenUrl, 'GET');
        $this->response = $this->client->getLastResponse();
        $this->processResponse();
        $this->access_token = $this->responseData['access_token'];
    }