mirror of
https://github.com/apache/jclouds.git
synced 2025-02-20 09:14:55 +00:00
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
908a2801b0
commit
6c662f9888
@ -63,27 +63,7 @@ public class SwiftRestClientModule extends BaseSwiftRestClientModule<SwiftClient
|
||||
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) {
|
||||
return response.getServices().get(AuthHeaders.STORAGE_URL);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(GetAuthenticationResponse.class).to(GetAuthenticationResponseForStorage.class);
|
||||
super.configure();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user