tower-governor icon indicating copy to clipboard operation
tower-governor copied to clipboard

Is there a way to get the request body in the KeyExtractor?

Open greybaron opened this issue 6 months ago • 0 comments

Protecting other routes was very easy thanks to this crate, however I am really struggling with protecting my login route by using the login parameter in addition to IP. This parameter is passed in the request body.

I cannot find a way to get the body of a Request<T>. The body ends up being of type T, and trait KeyExtractor enforces that signature. I believe trying to enforce stricter trait bounds in a function and calling that wouldn't work anyway, so this is likely a dead end.

This issue exceeds my rust abilities at this point, can you/someone perhaps give me a point in the right direction? Thanks!

greybaron avatar Aug 10 '24 19:08 greybaron