public function handle(RequestInterface $request): RequestInterface
    {
        if ($this->token === '' || $this->key === '') {
            throw new AuthorizationException('Could not create api token, missing or empty arguments');
        }
        return $request->withHeader($this->key, $this->token);
    }
public function handle(RequestInterface $request): RequestInterface
    {
        if ($this->token === '' || $this->key === '') {
            throw new AuthorizationException('Could not create api token, missing or empty arguments');
        }
        return $request->withHeader($this->key, $this->token);
    }
public function handle ( RequestInterface $ request ) : RequestInterface { if ( $ this -> token === '' || $ this -> key === '' ) { throw new AuthorizationException ( 'Could not create api token, missing or empty arguments' ) ; } return $ request -> withHeader ( $ this -> key , $ this -> token ) ; }
Get a request with the headers associated with the authorization.

@param RequestInterface $request
@return RequestInterface
Get a request with the headers associated with the authorization .