LBPUnion / ProjectLighthouse

Project Lighthouse is a clean-room, open-source custom server for LittleBigPlanet.
GNU Affero General Public License v3.0
211 stars 53 forks source link

Rewrite digest middleware #990

Open Slendy opened 8 months ago

Slendy commented 8 months ago

This PR is a refactor of the digest middleware. The new version makes it much less dependent on hardcoded endpoints and the digests in the config. Now the hardcoded behavior can be controlled by changing properties in the UseDigestAttribute class, like whether or not the request should fail if the client sends an incorrect digest or what the digest header name should be. The middleware can now also use unlimited digest keys to check against.

This PR also adds a new GameController class which extracts most of the common attributes the LBP endpoints use so they don't have to be redefined in every file.

sudokoko commented 4 months ago

merge conflicts and @Zaprit review bump