This repository was archived by the owner on Mar 6, 2024. It is now read-only.
Add login with API Access Token#583
Open
bvoilar wants to merge 1 commit intovmware-archive:masterfrom
Open
Conversation
Add support for authentication using API Access Tokens as described in [Generate an API Access Token][1]. The authentication follows RFC6749 (OAuth 2.0). If the `user` argument of the login cli command is set to "api_token" the `session-id` is interpreted as API Access Token. An oAuth 2.0 authentication request is made to the token endpoint and the access_token from the response is used as `session-id`. Furthermore, the pyvcloud client's `rehydrate_from_token` function must be called with the optional argument `is_jwt_token=True`. API Access Token authentication is useful when vCloud Director is configured to authenticate through an [external identity provider][2]. [1]: https://docs.vmware.com/en/VMware-Cloud-Director/10.4/VMware-Cloud-Director-Tenant-Portal-Guide/GUID-A1B3B2FA-7B2C-4EE1-9D1B-188BE703EEDE.html [2]: https://docs.vmware.com/en/VMware-Cloud-Director/10.5/VMware-Cloud-Director-Service-Provider-Admin-Guide/GUID-3326986B-931C-4FDE-AF47-D5A863191072.html Signed-off-by: Martin Fleischer <mfleischer@evoila.de>
|
@buvoilajar, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed. |
|
@buvoilajar, VMware has approved your signed contributor license agreement. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add support for authentication using API Access Tokens. The authentication follows RFC6749 (OAuth 2.0). If the
userargument of the login cli is set to "api_token" thesession-idis interpreted as API Access Token. An oAuth 2.0 authentication request is made to the token endpoint and the access_token from the response is used assession-id. Furthermore, the pyvcloud client'srehydrate_from_tokenfunction must be called with the optional argumentis_jwt_token=True.API Access Token authentication is useful when vCloud Director is configured to authenticate through an external identity provider.
Implements feature request: #581
Usage