class SalesforceBasicAuthenticator implements PasswordAuthenticator {

    @Override
    public Principal createAuthenticatedPrincipal(String username, String password)
    {
        try {
            return userCache.getUnchecked(new Credential(username, password));
        }
        catch (UncheckedExecutionException e) {
            throwIfInstanceOf(e.getCause(), AccessDeniedException.class);
            throw e;
        }
    }

    @Inject public  SalesforceBasicAuthenticator(SalesforceConfig config, @SalesforceAuthenticationClient HttpClient httpClient);

}