vmware / go-vcloud-director

Golang SDK for VMware Cloud Director
Other
80 stars 76 forks source link

Support managing API tokens and Service Accounts #577

Closed adezxc closed 1 year ago

adezxc commented 1 year ago

Add methods for managing API tokens and Service Accounts

New public methods for token management: *VCDClient.CreateToken,*VCDClient.GetTokenById,*VCDClient.GetAllTokens,*VCDClient.GetTokenByNameAndUsername, *VCDClient.RegisterToken , *Token.GetInitialApiToken, *Token.Delete

*Client.GetApiToken - get the structure containing the access token and the bearer token using the Service Account/API token

Public methods for service account management: *Org.GetServiceAccountById, *Org.GetAllServiceAccounts, *Org.GetServiceAccountByName

*VCDClient.CreateServiceAccount

*ServiceAccount.Update, *ServiceAccount.Authorize, *ServiceAccount.Grant, *ServiceAccount.Refresh, *ServiceAccount.Revoke, *ServiceAccount.Delete, *ServiceAccount.GetInitialApiToken

Public OpenAPI function for sending a POST request in x-www-form-urlencoded format: client.OpenApiPostUrlEncoded