Lcobucci\JWT\Parser::parseSignature PHP Method

parseSignature() protected method

Returns the signature from given data
protected parseSignature ( array $header, string $data ) : Lcobucci\JWT\Signature | null
$header array
$data string
return Lcobucci\JWT\Signature | null
    protected function parseSignature(array $header, string $data)
    {
        if ($data === '' || !isset($header['alg']) || $header['alg'] === 'none') {
            return null;
        }
        $hash = $this->decoder->base64UrlDecode($data);
        return new Signature($hash);
    }