libhttpserver icon indicating copy to clipboard operation
libhttpserver copied to clipboard

Basic Authentication with libhttpserver v0.9.0

Open davtorresg opened this issue 9 years ago • 0 comments
trafficstars

We are adding "basic authentication" in our REST server. Our first implementation was to use the methods "req.get_user()" and "req.get_pass()" in each request received and to check if it was received a valid user. This works correctly but we faced that we have to copy the same code in every "render_*" of our application.

This could be a problem. If some developer, by mistake, forgot to add the user validation, then someone could execute actions against that resource.

Please, could you tell me the libhttpserver provides some mechanism in order to unify the user validation in only one place?

We are using the version 0.9.0 of libhttpserver.

Thank you very much in advance, David

davtorresg avatar Aug 10 '16 09:08 davtorresg