class AccessToken extends OAuth2Token {

    String getX509CertificateHash(X509Certificate cert) {
        try {
            byte[] encCert = Crypto.sha256(cert.getEncoded());
            return Base64.getUrlEncoder().withoutPadding().encodeToString(encCert);
        } catch (CryptoException | CertificateEncodingException ex) {
            LOG.error("Unable to get X.509 certificate hash", ex);
            return null;
        }
    }

    public  AccessToken();
    public  AccessToken(final String token, JwtsSigningKeyResolver keyResolver);
    public  AccessToken(final String token, PublicKey publicKey);
    public  AccessToken(final String token, JwtsSigningKeyResolver keyResolver,
                       X509Certificate x509Cert);
    public  AccessToken(final String token, JwtsSigningKeyResolver keyResolver,
                       X509Certificate x509Cert, final String x509CertHash);

}