Can loginByToken API use SAML-token/session-id to get session to vcenter using govmomi #3110
-
I am calling below API to get session token as per the documentation this token can be used for further calls to loginByToken() or cloneSession() APIs to get sessions is this the recommended way to connect with the vSphere MOB APIs. Please revert in case of other recommendations? we wanted to get it done using govmomi. Any sample approach would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello All, I am able to create session using below code vCenterURL := "https://administrator@vsphere.local:Netapp1!@10.224.57.70/sdk" Now for subsequent calls, I dont want to use cedentials again, can we use something like session-id ? |
Beta Was this translation helpful? Give feedback.
Hi, you won't be using credentials again with
client
in that example. After the initial Login(), an http cookie is set and used to authenticate subsequent calls. It is transparent within the Go http.Client underneath, but if you need to use the session ID with another client: