hydra
hydra copied to clipboard
CLI `clients create` command is missing flag to set Metadata
Preflight checklist
- [X] I could not find a solution in the existing issues, docs, nor discussions.
- [X] I agree to follow this project's Code of Conduct.
- [X] I have read and am following this repository's Contribution Guidelines.
- [ ] This issue affects my Ory Cloud project.
- [ ] I have joined the Ory Community Slack.
- [ ] I am signed up to the Ory Security Patch Newsletter.
Describe the bug
When creating clients from the CLI, it's not currently possible to set the OAuth2Client.Metadata
property.
Reproducing the bug
- Run
hydra clients create --help
and check the flags.
Relevant log output
No response
Relevant configuration
No response
Version
Latest
On which operating system are you observing this issue?
No response
In which environment are you deploying?
Binary
Additional Context
I earlier submitted https://github.com/ory/x/pull/497 which will allow setting OAuth2Client.Metadata
to a map[string]string
value, which works well for my use case. However looking at the API reference it seems that metadata is a JSONRawMessage
or interface{}
, so should the CLI permit setting OAuth2Client.Metadata
to be arbitrary JSON as a string input, or does a map[string]string
suffice for most CLI use cases?
If map[string]string
is sufficient I'll submit a PR to add that. Thanks.
Thank you for the report! The metadata object is indeed a raw JSON string, and the CLI should be able to support it. It could be as easy as --metadata '{"my":"json"}'
. WDYT?
Sounds good, I've opened a PR :)