Repository navigation
feat: DeleteKey for DELETE /key - #6
Merged
Merged
Conversation
Adds DeleteKey(DeleteKeyParams), sending productId and licenseKey in the JSON body of DELETE /key so the license key never appears in the URL. The live test now deletes the keys it creates.
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.
What
Adds
DeleteKey(DeleteKeyParams)to permanently delete a license key.BlockKeyremains the reversible option.Contract
DELETE /keywithAuthorization: Bearer <admin key>and JSON body{ "productId", "licenseKey" }. The license key goes in the body, never in the URL. Returns{ "message": "Key deleted", "code": 0 }; an unknown key returns 404{ "message": "Invalid license key", "code": 1 }as a failedKeyMintResult. A new privateHandleDeleteRequestWithBodyhelper sends the body; the existing query-param DELETE helper (used byDeleteCustomer) is unchanged.Tests
/key, empty query, license key not in URL, Bearer auth, JSON body fields; parses 200; 404 surfaces status/code/message; invalid params send no request.GetKeyfails. Cleanup infinallynow deletes both created keys (falling back to block), so the shared test workspace stops filling up.