nacx requested changes on this pull request.
Thanks! Looks much better. Just a couple final comments!
> +
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
+
+/**
+ * Binder to the tempAuthAuthentication
+ *
+ */
+public final class TempAuthBinder implements Binder{
+ @Inject
+ @Named(TEMP_AUTH_HEADER_USER)
+ private String identityHeaderNameUser;
+
+ @Inject
+ @Named(TEMP_AUTH_HEADER_PASS)
+ private String identityHeaderNamePass;
Declare the variables final and use [constructor
injection](https://github.com/google/guice/wiki/Injections#constructor-injection).
> }
static final class AdaptTempAuthResponseToAccess
implements Function<HttpResponse, Access>,
InvocationContext<AdaptTempAuthResponseToAccess> {
+ @Inject
+ @Named(TEMP_AUTH_HEADER_USER)
+ private String identityHeaderNameUser;
Add it to the constructor and declare it final to use constructor injection too.
> @@ -153,7 +156,7 @@ private URI getURI(String headerValue) {
public AdaptTempAuthResponseToAccess setContext(HttpRequest request) {
String host = request.getEndpoint().getHost();
this.host = host;
- this.username = request.getFirstHeaderOrNull(STORAGE_USER);
+ this.username = request.getFirstHeaderOrNull(identityHeaderNameUser);
[minor] Fix indentation
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1046#pullrequestreview-15211240