Yes, that's possible - I believe the best-practice approach to achieve it would be to build a warp Filter for it.
I wrote a blog post dealing with something similar a while back here
This post also goes into detail on an authorization library, but for your use-case, the whole part surrounding the with_auth filter might be interesting, as there I get a value from the Authorization header, check it against an in-memory session store and then check if the user is allowed to see the requested resource.
Besides that, looking at the warp examples surrounding filters in the GitHub repository might be helpful.