support pingcli login authentication #1186
Open
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.
Change Description
Introduces
pingcli loginsupported authentication. The provider will use a stored token to authenticate with the provider.Change Characteristics
Checklist
All full (or complete) PRs that need review prior to merge should have the following box checked.
If contributing a partial or incomplete change (expecting the development team to complete the remaining work) please leave the box unchecked
Required SDK Upgrades
Testing
This PR has been tested with:
Shell Command(s)
go test ./internal/pingcli -v -count=1Testing Results
Expand Results
=== RUN TestNewConfig_EmptyPath_Error --- PASS: TestNewConfig_EmptyPath_Error (0.00s) === RUN TestNewConfig_ExpandTilde_LoadsFileAndActiveProfile --- PASS: TestNewConfig_ExpandTilde_LoadsFileAndActiveProfile (0.00s) === RUN TestGetActiveProfile_LegacyKey --- PASS: TestGetActiveProfile_LegacyKey (0.00s) === RUN TestGetProfileConfig_ByType_Success === RUN TestGetProfileConfig_ByType_Success/client_credentials === RUN TestGetProfileConfig_ByType_Success/authorization_code === RUN TestGetProfileConfig_ByType_Success/device_code === RUN TestGetProfileConfig_ByType_Success/worker --- PASS: TestGetProfileConfig_ByType_Success (0.00s) --- PASS: TestGetProfileConfig_ByType_Success/client_credentials (0.00s) --- PASS: TestGetProfileConfig_ByType_Success/authorization_code (0.00s) --- PASS: TestGetProfileConfig_ByType_Success/device_code (0.00s) --- PASS: TestGetProfileConfig_ByType_Success/worker (0.00s) === RUN TestIsFileStorageEnabled --- PASS: TestIsFileStorageEnabled (0.00s) === RUN TestLoadProfileConfig_UsesActiveProfileWhenEmpty --- PASS: TestLoadProfileConfig_UsesActiveProfileWhenEmpty (0.00s) === RUN TestLoadStoredToken_FileFallback_Success --- PASS: TestLoadStoredToken_FileFallback_Success (0.00s) === RUN TestLoadStoredToken_NoValidToken_Error --- PASS: TestLoadStoredToken_NoValidToken_Error (0.00s) PASS ok github.com/pingidentity/terraform-provider-pingone/internal/pingcli 0.237s