Auth0Jwt extends DefaultOAuthJwtAccessToken { @Override public String getCertificateThumbprint() { LinkedHashMap<?, ?> certConf = null; try { certConf = this.body.get(Auth0Jwt.claimConfirm, LinkedHashMap.class); if (certConf == null) { return null; } } catch (RequiredTypeException e) { return null; } return (String) certConf.get(OAuthJwtAccessToken.CLAIM_CONFIRM_X509_HASH); } Auth0Jwt(Jws<Claims> jws); @Override String getSubject(); @Override String getClientId(); @Override String getCertificateThumbprint(); static void setClaimClientId(String claimClientId); static void setClaimConfirm(String claimConfirm); static void setUserDomain(String userDomain); static String getClaimClientId(); static String getClaimConfirm(); static String getUserDomain();  }
@Test public void testGetCertificateThumbprint() { Auth0Jwt jwt; jwt = new Auth0Jwt(parser.parseClaimsJws(Jwts.builder().setSubject("subject").signWith(secretKey).compact())); assertNull(jwt.getCertificateThumbprint()); jwt = new Auth0Jwt(parser.parseClaimsJws(Jwts.builder().claim("https: assertNull(jwt.getCertificateThumbprint()); jwt = new Auth0Jwt(parser.parseClaimsJws("eyJhbGciOiJIUzI1NiJ9.eyJodHRwczovL215YXBwLmV4YW1wbGUuY29tL2NuZiI6e319.E9C0TQFvCKFdxWpJ-Q4HzXLX6ySLt2XymbdMdebjcXU")); assertNull(jwt.getCertificateThumbprint()); jwt = new Auth0Jwt(parser.parseClaimsJws("eyJhbGciOiJIUzI1NiJ9.eyJodHRwczovL215YXBwLmV4YW1wbGUuY29tL2NuZiI6eyJ4NXQjUzI1NiI6ImNlcnRfaGFzaCJ9fQ.wGIpUNocgVjGUVSXgsO22dFzaG06NxB9aPIAz2FbC94")); assertEquals(jwt.getCertificateThumbprint(), "cert_hash"); }