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

scripting-support: add generate_signed_jwt JS-native method to script… #106

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

anussel5559
Copy link

@anussel5559 anussel5559 commented Aug 19, 2024

… env

Currently, it's not possible to generate a signed JWT token to use for authrozation, either through native rust functionality in the ATAC app, or through the JS scripting environment.

This PR generates a new rust-native method (so can be shared for more rust-native JWT features) to generate a signed JWT. It then creates a boa_engine compatible wrapper around that rust method to inject it in to the available scope for the JS scripts users may write.

Testing:
using the function with a PEM key works -
image

using the function with a secret/shared key works -
image

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.

1 participant