class CertificateCredentials extends TokenCredentials implements AzureTokenCredentials {

    @Override
    public String getToken(String resource) throws IOException {
        AuthenticationResult authenticationResult = this.tokens.get(resource);
        if(authenticationResult == null || authenticationResult.getExpiresOnDate().before(new Date())) {
            authenticationResult = this.acquireAccessToken(resource);
        }

        return authenticationResult.getAccessToken();
    }

    public  CertificateCredentials(String domain, AzureEnvironment environment,
                                  AsymmetricKeyCredentialFactory credentialFactory);

}