Kea  1.9.9-git
isc::http::HttpAuthConfig Class Referenceabstract

Base type of HTTP authentication configuration. More...

#include <auth_config.h>

+ Inheritance diagram for isc::http::HttpAuthConfig:

Public Member Functions

virtual ~HttpAuthConfig ()
 Destructor. More...
virtual isc::http::HttpResponseJsonPtr checkAuth (const isc::http::HttpResponseCreator &creator, const isc::http::HttpRequestPtr &request) const =0
 Validate HTTP request. More...
virtual void clear ()=0
 Clear configuration. More...
virtual bool empty () const =0
 Empty predicate. More...
const std::string & getRealm () const
 Returns the realm. More...
virtual void parse (const isc::data::ConstElementPtr &config)=0
 Parses HTTP authentication configuration. More...
void setRealm (const std::string &realm)
 Set the realm. More...
virtual isc::data::ElementPtr toElement () const =0
 Unparses HTTP authentication configuration. More...
- Public Member Functions inherited from isc::data::UserContext
void contextToElement (data::ElementPtr map) const
 Merge unparse a user_context object. More...
data::ConstElementPtr getContext () const
 Returns const pointer to the user context. More...
void setContext (const data::ConstElementPtr &ctx)
 Sets user context. More...
- Public Member Functions inherited from isc::data::CfgToElement
virtual ~CfgToElement ()
 Destructor. More...

Additional Inherited Members

- Static Public Member Functions inherited from isc::data::UserContext
static data::ElementPtr toElement (data::ConstElementPtr map)
 Copy an Element map. More...
- Protected Attributes inherited from isc::data::UserContext
data::ConstElementPtr user_context_
 Pointer to the user context (may be NULL) More...

Detailed Description

Base type of HTTP authentication configuration.

Definition at line 22 of file auth_config.h.

Constructor & Destructor Documentation

virtual isc::http::HttpAuthConfig::~HttpAuthConfig ( )


Definition at line 27 of file auth_config.h.

Member Function Documentation

virtual isc::http::HttpResponseJsonPtr isc::http::HttpAuthConfig::checkAuth ( const isc::http::HttpResponseCreator creator,
const isc::http::HttpRequestPtr request 
) const
pure virtual

Validate HTTP request.

creatorThe HTTP response creator.
requestThe HTTP request to validate.
Error HTTP response if validation failed, null otherwise.

Implemented in isc::http::BasicHttpAuthConfig.

virtual void isc::http::HttpAuthConfig::clear ( )
pure virtual

Clear configuration.

Implemented in isc::http::BasicHttpAuthConfig.

virtual bool isc::http::HttpAuthConfig::empty ( ) const
pure virtual

Empty predicate.

true if the configuration is empty so authentication is not required.

Implemented in isc::http::BasicHttpAuthConfig.

const std::string& isc::http::HttpAuthConfig::getRealm ( ) const

Returns the realm.

The basic HTTP authentication realm.

Definition at line 39 of file auth_config.h.

Referenced by isc::http::BasicHttpAuthConfig::checkAuth(), and isc::http::BasicHttpAuthConfig::toElement().

virtual void isc::http::HttpAuthConfig::parse ( const isc::data::ConstElementPtr config)
pure virtual

Parses HTTP authentication configuration.

configElement holding the basic HTTP authentication configuration to be parsed.
DhcpConfigErrorwhen the configuration is invalid.

Implemented in isc::http::BasicHttpAuthConfig.

void isc::http::HttpAuthConfig::setRealm ( const std::string &  realm)

Set the realm.

realmNew realm.

Definition at line 32 of file auth_config.h.

Referenced by isc::http::BasicHttpAuthConfig::parse().

virtual isc::data::ElementPtr isc::http::HttpAuthConfig::toElement ( ) const
pure virtual

Unparses HTTP authentication configuration.

A pointer to unparsed HTTP authentication configuration.

Implements isc::data::CfgToElement.

Implemented in isc::http::BasicHttpAuthConfig.

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