public function getAuthorizationHeader()
    {
        if (empty($this->realm) || empty($this->id) || empty($this->nonce) || empty($this->version)) {
            throw new MalformedRequestException(
                'One or more required authorization header fields (ID, nonce, realm, version) are missing.',
                null,
                0,
                $this->request
            );
        }

        $signature = !empty($this->signature) ? $this->signature : $this->generateSignature();

        return new AuthorizationHeader(
            $this->realm,
            $this->id,
            $this->nonce,
            $this->version,
            $this->headers,
            $signature
        );
    }
public function getAuthorizationHeader()
    {
        if (empty($this->realm) || empty($this->id) || empty($this->nonce) || empty($this->version)) {
            throw new MalformedRequestException(
                'One or more required authorization header fields (ID, nonce, realm, version) are missing.',
                null,
                0,
                $this->request
            );
        }

        $signature = !empty($this->signature) ? $this->signature : $this->generateSignature();

        return new AuthorizationHeader(
            $this->realm,
            $this->id,
            $this->nonce,
            $this->version,
            $this->headers,
            $signature
        );
    }
public function getAuthorizationHeader ( ) { if ( empty ( $ this -> realm ) || empty ( $ this -> id ) || empty ( $ this -> nonce ) || empty ( $ this -> version ) ) { throw new MalformedRequestException ( 'One or more required authorization header fields (ID, nonce, realm, version) are missing.' , null , 0 , $ this -> request ) ; } $ signature = ! empty ( $ this -> signature ) ? $ this -> signature : $ this -> generateSignature ( ) ; return new AuthorizationHeader ( $ this -> realm , $ this -> id , $ this -> nonce , $ this -> version , $ this -> headers , $ signature ) ; }
Builds the authorization header.

@throws \Acquia\Hmac\Exception\MalformedRequestException
When a required field (ID, nonce, realm, version) is empty or missing.

@return \Acquia\Hmac\AuthorizationHeader
The compiled authorization header.
Builds the authorization header .