class JwtTokenVerifier {

    public boolean hasAttribute(String attributeName, Object expectedValue, String token) {
        try {
            Jwts
                .parser()
                .require(attributeName, expectedValue)
                .setSigningKey(pubKeyProvider.get())
                .parseClaimsJws(token);
            return true;
        } catch (JwtException e) {
            LOGGER.info("Jwt validation failed for claim {} to {}", attributeName, expectedValue, e);
            return false;
        }
    }

    @Inject @VisibleForTesting  JwtTokenVerifier(PublicKeyProvider pubKeyProvider);

}