> +import org.jclouds.rest.AuthorizationException; > + > +import com.google.common.base.Supplier; > + > +/** > + * Shipyard remote API authentication is made via the HTTP header > 'X-Service-Key' which in turns > + * has it's value as an encoded string (Shipyard-cli generates this for you). > + * > + * @see <a href= "http://en.wikipedia.org/wiki/Basic_access_authentication" > /> > + */ > +@Singleton > +public class ServiceKeyAuthentication implements HttpRequestFilter { > + private final Supplier<Credentials> creds; > + > + @Inject > + public ServiceKeyAuthentication(@Provider Supplier<Credentials> creds) {
Make the constructor package protected. This way you make sure it is only used by the Guice injector, which will already enforce the parameters to be present. Then you can also remove the `checkNotNull` check. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/116/files#r21863193
