feat: add message verifier class
Hey there! 👋🏻
This PR brings the MessageVerifier class to the core module instead of being defined inside the Encryption package.
It will be used by the HttpServer in order to create signed URL and for the legacy encryption driver.
Nice. I see that the HTTP package uses the MessageVerifier as well. https://github.com/adonisjs/http-server/blob/8.x/src/cookies/drivers/signed.ts#L54
Does it make sense it to move it to a utils package, so that it could be used anywhere we like by providing in the key. In that case, the http package will receive the appKey as well and will use the verifier to sign cookies?
I'm not sure it's necessary to create a dedicated package for this. The main issue is that the http module currently has no dependency on the core, and introducing one might not be ideal.
If that's a concern, I can instead extract the verifier more cleanly from the new encryption module, since it's currently tied to an encryption driver. This would keep things self-contained without adding a core dependency.
This pull request has been marked as stale because it has been inactive for more than 21 days. Please reopen if you still intend to submit this pull request
Closing since we kept the MessageVerifier in the encryption package.