public function getSessionTokenWithLogin($requestToken, $username, $password)
    {
        $validatedRequestToken = $this->validateRequestTokenWithLogin($requestToken, $username, $password);

        if (!$validatedRequestToken['success']) {
            throw new \InvalidArgumentException('Unable to validate the request_token, please check your credentials.');
        }

        return $this->getNewSession($validatedRequestToken['request_token']);
    }
public function getSessionTokenWithLogin($requestToken, $username, $password)
    {
        $validatedRequestToken = $this->validateRequestTokenWithLogin($requestToken, $username, $password);

        if (!$validatedRequestToken['success']) {
            throw new \InvalidArgumentException('Unable to validate the request_token, please check your credentials.');
        }

        return $this->getNewSession($validatedRequestToken['request_token']);
    }
public function getSessionTokenWithLogin ( $ requestToken , $ username , $ password ) { $ validatedRequestToken = $ this -> validateRequestTokenWithLogin ( $ requestToken , $ username , $ password ) ; if ( ! $ validatedRequestToken [ 'success' ] ) { throw new \ InvalidArgumentException ( 'Unable to validate the request_token, please check your credentials.' ) ; } return $ this -> getNewSession ( $ validatedRequestToken [ 'request_token' ] ) ; }
Helper method to validate the request_token and obtain a session_token

@param  RequestToken              $requestToken
@param  string                    $username
@param  string                    $password
@return mixed
@throws \InvalidArgumentException
Helper method to validate the request_token and obtain a session_token