Lcobucci\JWT\Builder::withHeader PHP Method

withHeader() public method

Configures a header item
public withHeader ( string $name, mixed $value ) : Builder
$name string
$value mixed
return Builder
    public function withHeader(string $name, $value) : Builder
    {
        if ($this->signature) {
            throw new BadMethodCallException('You must unsign before make changes');
        }
        $this->headers[$name] = $this->claimFactory->create($name, $value);
        return $this;
    }