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

Support for key selection #31

Open
divarvel opened this issue Mar 30, 2023 · 0 comments
Open

Support for key selection #31

divarvel opened this issue Mar 30, 2023 · 0 comments

Comments

@divarvel
Copy link
Collaborator

divarvel commented Mar 30, 2023

Currently Biscuit::parse expects a single private key, but it should be possible to pass a function that selects a private key based on the optional root_key_id value.

This might be tricky to achieve with the current rust API, since it expects a closure for key selection. It is possible to pass a closure from JS to rust, but then it's trick to turn the closure result JsValue into a PublicKey. A possible solution would be to provide specific helpers in the rust lib that deserialize the outer proto layer and provides the key id, before continuing.

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

No branches or pull requests

1 participant