Skip to content

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

@fnschmidt

Description

@fnschmidt

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions