protected function validateHeader(array $header)
    {
        if (empty($header['alg'])) {
            throw new JWTException('Invalid token: Missing header algo', static::ERROR_ALGO_MISSING);
        }
        if (empty($this->algos[$header['alg']])) {
            throw new JWTException('Invalid token: Unsupported header algo', static::ERROR_ALGO_UNSUPPORTED);
        }

        $this->validateKid($header);
    }
protected function validateHeader(array $header)
    {
        if (empty($header['alg'])) {
            throw new JWTException('Invalid token: Missing header algo', static::ERROR_ALGO_MISSING);
        }
        if (empty($this->algos[$header['alg']])) {
            throw new JWTException('Invalid token: Unsupported header algo', static::ERROR_ALGO_UNSUPPORTED);
        }

        $this->validateKid($header);
    }
protected function validateHeader ( array $ header ) { if ( empty ( $ header [ 'alg' ] ) ) { throw new JWTException ( 'Invalid token: Missing header algo' , static :: ERROR_ALGO_MISSING ) ; } if ( empty ( $ this -> algos [ $ header [ 'alg' ] ] ) ) { throw new JWTException ( 'Invalid token: Unsupported header algo' , static :: ERROR_ALGO_UNSUPPORTED ) ; } $ this -> validateKid ( $ header ) ; }
Throw up if header invalid.
Throw up if header invalid .