Rudiments
Public Member Functions | List of all members
httpbasicsecurity Class Reference

#include <mvc.h>

Inherits mvcsecurity.

Public Member Functions

 httpbasicsecurity ()
 
virtual ~httpbasicsecurity ()
 
void setRequest (httprequest *req)
 
httprequestgetRequest ()
 
const chargetUserName ()
 
- Public Member Functions inherited from mvcsecurity
 mvcsecurity ()
 
virtual ~mvcsecurity ()
 
- Public Member Functions inherited from object
virtual ~object ()
 

Detailed Description

The httpbasicsecurity class provides an implementation of the mvcsecurity class which can fetch the current user from the HTTP Basic Authentication framework.

Constructor & Destructor Documentation

◆ httpbasicsecurity()

httpbasicsecurity::httpbasicsecurity ( )

Creates an instance of the httpbasicsecurity class.

◆ ~httpbasicsecurity()

virtual httpbasicsecurity::~httpbasicsecurity ( )
virtual

Deletes this instance of the httpbasicsecurity class.

Member Function Documentation

◆ getRequest()

httprequest * httpbasicsecurity::getRequest ( )

Returns the httprequest set by a previous call to setRequest() or NULL if none has been set.

◆ getUserName()

const char * httpbasicsecurity::getUserName ( )
virtual

Returns the REMOTE_USER provided by the httprequest set by a previous call to setRequest(), NULL if no httprequest has been, or an empty string if the httprequest didn't include a REMOTE_USER.

Implements mvcsecurity.

◆ setRequest()

void httpbasicsecurity::setRequest ( httprequest * req)

Sets the httprequest to use when getUserName() is called.