protected function authenticateRequest(RequestInterface $request)
    {
        $uri = $request->getUri();
        parse_str($uri->getQuery(), $query);

        $query['key'] = Configuration::get('key');
        $query['token'] = Configuration::get('token');

        $uri = $uri->withQuery(http_build_query($query));

        return $request->withUri($uri);
    }
protected function authenticateRequest(RequestInterface $request)
    {
        $uri = $request->getUri();
        parse_str($uri->getQuery(), $query);

        $query['key'] = Configuration::get('key');
        $query['token'] = Configuration::get('token');

        $uri = $uri->withQuery(http_build_query($query));

        return $request->withUri($uri);
    }
protected function authenticateRequest ( RequestInterface $ request ) { $ uri = $ request -> getUri ( ) ; parse_str ( $ uri -> getQuery ( ) , $ query ) ; $ query [ 'key' ] = Configuration :: get ( 'key' ) ; $ query [ 'token' ] = Configuration :: get ( 'token' ) ; $ uri = $ uri -> withQuery ( http_build_query ( $ query ) ) ; return $ request -> withUri ( $ uri ) ; }
Adds authentication credentials to given request.

@param  RequestInterface  $request

@return RequestInterface
Adds authentication credentials to given request .