src/V2/Authentication/AuthenticationHandler.php
public function onRequest( RequestInterface $request ) {
        $apiKey = $this->getEndpoint()->getApiKey();

        if($apiKey !== null) {
            $request = $request->withHeader( 'Authorization', 'Bearer '.$apiKey);
        }

        return $request;
    }
public function onRequest( RequestInterface $request ) {
        $apiKey = $this->getEndpoint()->getApiKey();

        if($apiKey !== null) {
            $request = $request->withHeader( 'Authorization', 'Bearer '.$apiKey);
        }

        return $request;
    }
public function onRequest ( RequestInterface $ request ) { $ apiKey = $ this -> getEndpoint ( ) -> getApiKey ( ) ; if ( $ apiKey !== null ) { $ request = $ request -> withHeader ( 'Authorization' , 'Bearer ' . $ apiKey ) ; } return $ request ; }
Add the API key as Authorization header.

@param RequestInterface $request

@return MessageInterface|RequestInterface
Add the API key as Authorization header .