Is Swift basic Authentication not supported in OpenStack4j?​

asked 2016-03-13 23:03:13 -0500

rmagarwal gravatar image

I have ​created a local SWIFT setup and able to connect to it using CURL request as below:

curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' http://127.0.0.1:8080/auth/v1.0

But when I am trying to connect to the same SWIFT with OpenStack4j using Java code, I am getting following exception:

Java Code:

OSClient os = OSFactory.builder()
.endpoint("http://127.0.0.1:​8080/auth/v1.0")
.credentials("tester","testing")
.tenantName("test")
.authenticate();

Exception:

Exception in thread "main" ClientResponseException{message=Bad Request, status=400, status-code=BAD_REQUEST}
at     org.openstack4j.core.transport.HttpExceptionHandler.mapException(HttpExceptionHandler.java:38)
at org.openstack4j.core.transport.HttpExceptionHandler.mapException(HttpExceptionHandler.java:23)
at org.openstack4j.openstack.internal.OSAuthenticator.authenticateV2(OSAuthenticator.java:120)
at org.openstack4j.openstack.internal.OSAuthenticator.invoke(OSAuthenticator.java:50)
at org.openstack4j.openstack.client.OSClientBuilder$ClientV2.authenticate(OSClientBuilder.java:117)
at org.openstack4j.openstack.client.OSClientBuilder$ClientV2.authenticate(OSClientBuilder.java:81)
at Connection.main(Connection.java:21)

Maven: org.pacesys openstack4j 2.0.9

​Is basic Authentication not supported in OpenStack4j?​

edit retag flag offensive close merge delete