public function verifySignature(TokenRequest $tokenRequest, $certificate)
    {
        $result = openssl_verify(
            $tokenRequest->getIssuer() . ':' . $tokenRequest->getUsername(),
            base64_decode($tokenRequest->getSignature()),
            $certificate
        );

        return $result === 1 ? true : false;
    }
public function verifySignature(TokenRequest $tokenRequest, $certificate)
    {
        $result = openssl_verify(
            $tokenRequest->getIssuer() . ':' . $tokenRequest->getUsername(),
            base64_decode($tokenRequest->getSignature()),
            $certificate
        );

        return $result === 1 ? true : false;
    }
public function verifySignature ( TokenRequest $ tokenRequest , $ certificate ) { $ result = openssl_verify ( $ tokenRequest -> getIssuer ( ) . ':' . $ tokenRequest -> getUsername ( ) , base64_decode ( $ tokenRequest -> getSignature ( ) ) , $ certificate ) ; return $ result === 1 ? true : false ; }
Verify the signature

@param TokenRequest    $tokenRequest
@param resource|string $certificate

@return bool
Verify the signature