I am trying to perform a REST login with a host in the inventory of the VCO plugin. The login request returns an authorisation token in the response header which is then set as a header in all subsequent REST calls in VCO. I am able to perform the login and get an authorisation token in the response header in browser based REST clients. However if I do the same REST login call in VCO it appears to strip out the response header as response.getHesders() for the login call returns null.
It seems that the authorisation in the HTTP-REST plugin is handled differently, I would like to know how to perform a login with the HTTP-REST plugin. The REST API that I am attempting to interface with has a login operation as follows.
GET /login
Request
GET https://192.168.1.10:4534/login
Headers
Content-Type: application/xml
Authorization: Basic base64EncodedString comprising of 'username:password'
Response
Headers
X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
Body
HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<loggedIn>
<user>username</user>
</loggedIn>
How do I access this auth token in VCO ? Is it accassable via the REST-Host ?
I have also attempted to configure the host in the HTTP-REST plugin with basic authentication and a session mode of ‘Per User Session’ but I am unsure how to pass the username and password to the host when using this session mode.
Thanks
slahy