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:
Adrian Cole 2011-11-14 21:18:01 +02:00
parent 0c1ca8cfbc
commit 2ea8dc2cee
1 changed files with 1 additions and 21 deletions

View File

@ -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();
}
} }