mirror of https://github.com/apache/jclouds.git
Issue 754:fix swift to use the documented X-Auth-User headers, and not X-Storage-... which is not universally supported
This commit is contained in:
parent
0c1ca8cfbc
commit
2ea8dc2cee
|
@ -63,27 +63,7 @@ public class SwiftRestClientModule extends BaseSwiftRestClientModule<SwiftClient
|
||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
public static class GetAuthenticationResponseForStorage extends GetAuthenticationResponse {
|
|
||||||
@Inject
|
|
||||||
public GetAuthenticationResponseForStorage(AsyncClientFactory factory,
|
|
||||||
@Named(Constants.PROPERTY_IDENTITY) String user, @Named(Constants.PROPERTY_CREDENTIAL) String key) {
|
|
||||||
super(factory, user, key);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Future<AuthenticationResponse> authenticate() {
|
|
||||||
return client.authenticateStorage(user, key);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected URI provideStorageUrl(AuthenticationResponse response) {
|
protected URI provideStorageUrl(AuthenticationResponse response) {
|
||||||
return response.getServices().get(AuthHeaders.STORAGE_URL);
|
return response.getServices().get(AuthHeaders.STORAGE_URL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void configure() {
|
|
||||||
bind(GetAuthenticationResponse.class).to(GetAuthenticationResponseForStorage.class);
|
|
||||||
super.configure();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue