Add login with API Access Token
Description
Add support for authentication using API Access Tokens. The authentication follows RFC6749 (OAuth 2.0). If the user argument of the login cli 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.
Implements feature request: #581
Usage
- Generate an API Access Token
- Login with the generated API Access Token
vcd login <VCD_HOST> <VCD_ORG> api_token --session-id <API_ACCESS_TOKEN>
@buvoilajar, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.
@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.