libcex  1.0.0
Modern C++11 embedded webserver library
Functions
basicauth.hpp File Reference

Basic auth middleware function. More...

#include <string>
#include <core.hpp>

Go to the source code of this file.

Functions

MiddlewareFunction cex::basicAuth ()
 Creates a middleware that extracts username and password information from the Authorization HTTP header.
 

Detailed Description

Basic auth middleware function.

Tries to extract username and password information from the Authorization HTTP header. Only allows to retrieve Basic authentication information.

Upon success (e.g. a Authorization header is present and its contents could be extracted) stores the values in the Request object's properties basicUsername and basicPassword.