cakemail / cakemail-php

Client of Cakemail's API Next-Gen
MIT License
0 stars 2 forks source link

Create Token Parameters #5

Closed aylmercdc closed 2 years ago

aylmercdc commented 2 years ago

Hi,

There are parameter issues on file Cakemail\Token.php line 19 $this->createTokenWithHttpInfo($username, $password, $grant_type, $account_id, $scopes); it return an error since $password is being passed as $grant_type on function createTokenWithHttpInfo

Upon checking the function createToken the parameters is changed in version 1.9.

Cakemail\Token.php function createToken in version 1.9 and 1.6.11

public function createToken($username, $password, $grant_type = null, $account_id = null, $scopes = 'user')
  {
      list($response) = $this->createTokenWithHttpInfo($username, $password, $grant_type, $account_id, $scopes);
      return $response;
  }

Cakemail\Lib\Api\TokenApi.php function createTokenWithHttpInfo In version 1.9:

public function createTokenWithHttpInfo($username, $grant_type = null, $password = null, $account_id = null, $scopes = 'user')
  {
      $request = $this->createTokenRequest($username, $grant_type, $password, $account_id, $scopes);
  ...}

Cakemail\Lib\Api\TokenApi.php function createTokenWithHttpInfo In version 1.6.11:

public function createTokenWithHttpInfo($username, $password, $grant_type = null, $account_id = null, $scopes = 'user')
    {
        $request = $this->createTokenRequest($username, $password, $grant_type, $account_id, $scopes);
    ...}

It must be $this->createTokenWithHttpInfo($username, $grant_type, $password, $account_id, $scopes);

Regards.

demetrius-edelin commented 2 years ago

Thank you for the notification. It's now fixed it in 1.9.1.