hydra
hydra copied to clipboard
Added client metadata flag, fixes #3091
Adds a --metadata flag to both hydra clients create and hydra clients update. Also ensures that valid JSON is being passed.
Related issue(s)
Fixes #3091
Checklist
- [x] I have read the contributing guidelines.
- [x] I have referenced an issue containing the design document if my change introduces a new feature.
- [x] I am following the contributing code guidelines.
- [x] I have read the security policy.
- [x] I confirm that this pull request does not address a security vulnerability. If this pull request addresses a security. vulnerability, I confirm that I got green light (please contact [email protected]) from the maintainers to push the changes.
- [x] I have added tests that prove my fix is effective or that my feature works.
- [ ] I have added or changed the documentation.
Sorry about that, I missed that file the first time around 😄
Tests added, I tried to add a test to test for invalid JSON with the expectErr in the tests but as the CLI is using cmdx.Must() which calls an os.Exit(), the rootCmd.Execute() never actually returns an error so you can't test for it.
Codecov Report
Merging #3092 (418551b) into master (152bddd) will decrease coverage by
0.13%. The diff coverage is44.44%.
@@ Coverage Diff @@
## master #3092 +/- ##
==========================================
- Coverage 79.70% 79.56% -0.14%
==========================================
Files 112 112
Lines 7932 7973 +41
==========================================
+ Hits 6322 6344 +22
- Misses 1213 1226 +13
- Partials 397 403 +6
| Impacted Files | Coverage Δ | |
|---|---|---|
| cmd/cli/handler_client.go | 29.41% <37.50%> (+0.75%) |
:arrow_up: |
| cmd/clients_create.go | 100.00% <100.00%> (ø) |
|
| cmd/clients_update.go | 100.00% <100.00%> (ø) |
|
| persistence/sql/persister_oauth2.go | 81.01% <0.00%> (-0.85%) |
:arrow_down: |
| oauth2/handler.go | 68.27% <0.00%> (ø) |
|
| consent/strategy_default.go | 70.52% <0.00%> (+0.20%) |
:arrow_up: |
| jwk/cast.go | 60.00% <0.00%> (+60.00%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 152bddd...418551b. Read the comment docs.
Hey, is this superseded by the recent commits improve create client? Looks like those commits closed the original issue
Yes!
Awesome, thanks!