Webdar 1.0.0
Web user interface to libdar
Public Member Functions | List of all members
challenge Class Reference

HTML responder driving the user authentication through the web interface. More...

#include <challenge.hpp>

Inheritance diagram for challenge:
Inheritance graph
[legend]
Collaboration diagram for challenge:
Collaboration graph
[legend]

Public Member Functions

 challenge (const std::shared_ptr< const authentication > &base)
 
bool is_an_authoritative_request (const request &req, std::string &user)
 
answer give_answer (const request &req)
 to be used to answer a non authoritative request More...
 
- Public Member Functions inherited from responder
 responder (const responder &ref)=default
 
 responder (responder &&ref) noexcept=default
 
responderoperator= (const responder &ref)=default
 
responderoperator= (responder &&ref) noexcept=default
 
void set_prefix (const chemin &chem)
 used for body_builder object for they have a proper prefix in path
 
const cheminget_prefix () const
 get the recorded URI path prefix for body_builder root hierarchy
 
virtual answer give_answer (const request &req)=0
 provides a standard mean for inherited class to provide answer to requests More...
 

Additional Inherited Members

- Protected Member Functions inherited from responder
virtual void prefix_has_changed ()
 hook for inherited class, when the body builder object had its prefix changed More...
 

Detailed Description

HTML responder driving the user authentication through the web interface.

Constructor & Destructor Documentation

◆ challenge()

challenge::challenge ( const std::shared_ptr< const authentication > &  base)

constructor

Parameters
[in]basepoints to the authentication base
Note
the base argument must survive this challenge object and is

Member Function Documentation

◆ give_answer()

answer challenge::give_answer ( const request req)
virtual

to be used to answer a non authoritative request

Implements responder.

◆ is_an_authoritative_request()

bool challenge::is_an_authoritative_request ( const request req,
std::string &  user 
)

returns whether the request is authoritative

Parameters
[in]reqthe request to analyse
[out]userthe authenticated user for this request
Returns
true when the request is authoritative and the set "user" to the name of the authenticated user
Note
the authoritativity is checked by the presence of the base64 encoded login/password in the HDR_AUTHORIZATION attribute found in the request

The documentation for this class was generated from the following files: