osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Integrating Console View


Hi,

Maybe a little late.
Not sure if signature is necessary.
What should work is storing the cookies returned from logging in,
and making sure those are passed to the request to /client/console.

In unix curl it looks like this:
curl -c cookies --data
command=login\&domain=\&password=password\&username=admin\&response=json
http://localhost:8080/client/api
curl -b cookies http://localhost:8080/client/console?cmd=access&vm=UUID

Regards,
Frank

On Sat, Sep 8, 2018 at 12:09 PM Fariborz Navidan <mdvlinquest@xxxxxxxxx>
wrote:

> Hello Devs,
>
>
>
> I am trying to integrate CloudStack’s Console View into my custom
> application. I have used to get console URL by passing apiKey and Signature
> to “/client/console” page. The URL I get is working well in browser but I
> want to get the actual console URL which is returned by “/client/console”
> inside a <from> tag. I have tried requesting the URL I have created, with
> PHP’s cURL library so I can parse it and  extract the real console URL. But
> what I get is firstly, 301 redirect which redirects to the same location,
> then a 400 character string  which displayed as emoty string, when I follow
> the location. By running var_dump() I get something like this:
>
>
>
> String(400) “”
>
>
>
> Please help me to achieve my goal.
>
>
>
> Thanks
>