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 JS-API for validation of delegations #2281

Merged
merged 4 commits into from
Feb 21, 2024

Conversation

przydatek
Copy link
Collaborator

@przydatek przydatek commented Feb 16, 2024

Add validate_delegation_and_get_principal-helper that thoroughly validates the given delegation and upon success returns a Principal that identifies the user (cf. description of the helper for details).

There are some outstanding tasks for follow-up PRs (marked with TODO in comments):

  • add a "deeper" expiration check for of the delegation (to check the "freshness" of the delegation)
  • replace the added of code for computing representation independent hash with a crate (the crate exists, but is currently incomplete)
  • add tests in JS for the wrapped functionality

@nmattia nmattia removed their request for review February 16, 2024 16:42
@przydatek przydatek marked this pull request as ready for review February 21, 2024 14:47
Copy link
Member

@frederikrothenberger frederikrothenberger left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Left one comment.

src/canister_sig_util/src/lib.rs Show resolved Hide resolved
@przydatek
Copy link
Collaborator Author

Thanks!

@przydatek przydatek added this pull request to the merge queue Feb 21, 2024
Merged via the queue into main with commit 75b9b14 Feb 21, 2024
63 checks passed
@przydatek przydatek deleted the bartosz/js-delegation-validation branch February 21, 2024 16:15
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