httpbuilder
httpbuilder copied to clipboard
Issue #37 - Non-default Keystore Types
jgritman/httpbuilder#37
Modified the AuthConfig class so the certificate() method is overloaded with three different options:
-
certificate(String path, String pass)
behaves as the original method, using the system default keystore type -
certificate(String path, String pass, String type)
reads the specified file as a user-provided keystore type -
certificate(KeyStore store, String pass)
uses the user-provided KeyStore; this method allows loading of keys from external devices like SmartCards where a URL may not be available
Also, added support for loading Twitter API configuration from etc/config/twitter.properties
and supplied a template file detailing the various options. It wasn't clear without delving into the POM that tests were failing because I hadn't configured the Twitter settings. This externalizes them so developers don't accidentally commit auth tokens to the repo.