@demobox if the KeystoneAuthenticationModule wasn't so self-coupled (ex. needs
to use multibindings to unwind itself), the following might have worked to
support what you are asking for.
```java
@Override
protected void configure() {
// magic needed to defer resolution of AnnotatedHttpApiProvider.get()
binder().bind(new TypeLiteral<Class<TempAuthApi>>() {
}).toInstance(TempAuthApi.class);
binder().bind(new TypeLiteral<Class<AuthenticationApi>>() {
}).toInstance(AuthenticationApi.class);
}
@Provides @Singleton AuthenticationApi
authenticationApi(@Named(CREDENTIAL_TYPE) String credentialType,
AnnotatedHttpApiProvider<AuthenticationApi> viaKeystone,
AnnotatedHttpApiProvider<TempAuthApi> viaTempAuth) {
if (credentialType.equals("tempAuthCredentials")) {
return new TempAuthAuthenticationApi(viaTempAuth.get());
}
return viaKeystone.get();
}
```
Regardless, someone could possibly make this work on properties alone, just I'd
estimate it at 1-2 days work. I'm over my jclouds budget at the moment, by
about 50 hours or so.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/616#issuecomment-64726154