src/ApiConnector.php
protected function createAuthorizationHeader(): string
    {
        $username = $this->getOption('api.username');
        $password = $this->getOption('api.password');

        // The API requires HTTP Basic Authentication, we can't proceed without credentials
        if ($username === null || $password === null) {
            throw new \InvalidArgumentException('Missing credentials for API authentication.');
        }

        return 'Basic ' . \base64_encode("$username:$password");
    }
protected function createAuthorizationHeader(): string
    {
        $username = $this->getOption('api.username');
        $password = $this->getOption('api.password');

        // The API requires HTTP Basic Authentication, we can't proceed without credentials
        if ($username === null || $password === null) {
            throw new \InvalidArgumentException('Missing credentials for API authentication.');
        }

        return 'Basic ' . \base64_encode("$username:$password");
    }
protected function createAuthorizationHeader ( ) : string { $ username = $ this -> getOption ( 'api.username' ) ; $ password = $ this -> getOption ( 'api.password' ) ; // The API requires HTTP Basic Authentication, we can't proceed without credentials if ( $ username === null || $ password === null ) { throw new \ InvalidArgumentException ( 'Missing credentials for API authentication.' ) ; } return 'Basic ' . \ base64_encode ( "$username:$password" ) ; }
Creates the Authorization header for the request

@return string

@throws \InvalidArgumentException if credentials are not set
Creates the Authorization header for the request