Skip to content

Basic Authentication with libhttpserver v0.9.0 #102

Open
@davtorresg

Description

@davtorresg

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

Metadata

Metadata

Assignees

Labels

beginnerLess complex issues - good first issues to work on for users who want to contribute to libhttpserverfeature-requestFeature requests or enhancements

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions