feat: add --client-id and --client-secret flags to login command#451
Open
A-d-i-t-y wants to merge 1 commit into
Open
feat: add --client-id and --client-secret flags to login command#451A-d-i-t-y wants to merge 1 commit into
A-d-i-t-y wants to merge 1 commit into
Conversation
Previously client credentials could only be provided via environment
variables (MICROCKS_CLIENT_ID, MICROCKS_CLIENT_SECRET). This made it
inconvenient in CI/CD environments where injecting env vars is not
always possible.
Now credentials can be passed directly as CLI flags:
microcks login http://localhost:8080 \
--username admin \
--password secret \
--client-id my-client \
--client-secret my-secret
Environment variables are still supported as fallback.
Signed-off-by: Aditya <aaaditya1909@gmail.com>
Author
|
Hi @Harsh4902 @Vaishnav88sk @lbroudoux, I have raised this PR to add --client-id and --client-secret flags to the login command. Previously credentials could only be provided via environment variables which is inconvenient in many CI/CD setups. This change adds flag support with environment variables as fallback — no breaking changes. Would love your feedback! |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds --client-id and --client-secret flags to the login command
so client credentials can be passed directly without requiring
environment variables.
Problem
Currently the login command only reads client credentials from
environment variables:
MICROCKS_CLIENT_ID=my-client
MICROCKS_CLIENT_SECRET=my-secret
microcks login http://localhost:8080 --username admin --password secret
This is inconvenient in CI/CD environments where injecting env vars
is not always possible or desirable.
Solution
Added two new flags with environment variables as fallback:
microcks login http://localhost:8080
--username admin
--password secret
--client-id my-client
--client-secret my-secret
If flags are not provided, environment variables are still used
as fallback — no breaking changes.
Files Changed