Since we're no longer going to be using both dependencies spring-boot:web and spring-boot:webflux in the same project (that was an actual mistake that took awhile to figure out), then that means that the src/filter/CachingRequestWrapperFilter will no longer be used to cache the Request Body downstream to and subsequently verify the Discord signature of the interaction.
Now we need to use Netty's WebFilter implementation, and actually use it correctly this time.
Acceptance Criteria
We have two options on how to handle this:
Option 1: Create a WebFilter that behaves like the previous ServletFilter and cache the body bytes, pass them downstream, and verify the signature using an @Annotation
Option 2: Create a WebFilter that verifies the signature sent in the filter itself. If the signature is invalid we throw an InvalidSignatureException else, pass the request downstream for further processing
Since we're no longer going to be using both dependencies
spring-boot:web
andspring-boot:webflux
in the same project (that was an actual mistake that took awhile to figure out), then that means that thesrc/filter/CachingRequestWrapperFilter
will no longer be used to cache the Request Body downstream to and subsequently verify the Discord signature of the interaction.Now we need to use Netty's
WebFilter
implementation, and actually use it correctly this time.Acceptance Criteria We have two options on how to handle this:
@Annotation
InvalidSignatureException
else, pass the request downstream for further processing