-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support managing API tokens and Service Accounts #577
Conversation
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A quick scan with a few notes. I will get back for a more in depth review.
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for it - I have left improvement comments inline
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
…coded Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for all these fixes. I am actually good now - the only remaining comment from is to see if we could use OpenApiPostItem
instead of OpenApiPostUrlEncoded
as they look to be very very similar (see my comment inline). Not insisting on that if it doesn't feel like a good approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, approved.
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
Signed-off-by: Adam Jasinski <jasinskia@vmware.com>
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 tokenPublic 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