Skip to content

Conversation

@RomainLanz
Copy link
Member

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.

@RomainLanz RomainLanz force-pushed the feat/message-verifier branch from ff141f8 to 10c71ce Compare November 19, 2025 07:56
@thetutlage
Copy link
Member

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?

@RomainLanz
Copy link
Member Author

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.

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.

3 participants