Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multiple kid per key feature, kid removal and get by kid routes #3472

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

PatStLouis
Copy link
Contributor

No description provided.

@PatStLouis PatStLouis requested a review from jamshale January 27, 2025 20:03
Signed-off-by: PatStLouis <[email protected]>
Signed-off-by: PatStLouis <[email protected]>
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
46.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@@ -131,14 +135,58 @@ async def assign_kid_to_key(self, verkey: str, kid: str) -> KeyInfo:
if not key_entry:
raise WalletNotFoundError(f"No key entry found for verkey {verkey}")

try:
existing_kid = key_entry.tags.get("kid")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

key_entry.tags.get("kid", [])

raise WalletError(f"Unknown key type {key.algorithm.value}")
try:
existing_kid.remove(kid)
except Exception:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should catch the correct type of exception for removing entry that doesn't exist. Can't remember of the top of my head.

In general try to only catch the base Exception class when nessecary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants