PHTTPAuthority Class Reference

This abstract class describes the authorisation mechanism for a Universal Resource Locator. More...

#include <http.h>

Inheritance diagram for PHTTPAuthority:

PObject PHTTPMultiSimpAuth PHTTPSimpleAuth List of all members.

Public Member Functions

virtual PString GetRealm (const PHTTPRequest &request) const =0
 Get the realm or name space for the user authorisation name and password as required by the basic authorisation system of HTTP/1.0.
virtual PBoolean Validate (const PHTTPRequest &request, const PString &authInfo) const =0
 Validate the user and password provided by the remote HTTP client for the realm specified by the class instance.
virtual PBoolean IsActive () const
 Determine if the authorisation is to be applied.

Static Protected Member Functions

static void DecodeBasicAuthority (const PString &authInfo, PString &username, PString &password)

Detailed Description

This abstract class describes the authorisation mechanism for a Universal Resource Locator.


Member Function Documentation

static void PHTTPAuthority::DecodeBasicAuthority ( const PString authInfo,
PString username,
PString password 
) [static, protected]

Parameters:
authInfo  Authority information string.
username  User name decoded from authInfo
password  Password decoded from authInfo

virtual PString PHTTPAuthority::GetRealm ( const PHTTPRequest request  )  const [pure virtual]

Get the realm or name space for the user authorisation name and password as required by the basic authorisation system of HTTP/1.0.

Returns:
String for the authorisation realm name.
Parameters:
request  Request information.

Implemented in PHTTPSimpleAuth, and PHTTPMultiSimpAuth.

virtual PBoolean PHTTPAuthority::IsActive (  )  const [virtual]

Determine if the authorisation is to be applied.

This could be used to distinguish between net requiring authorisation and requiring autorisation but having no password.

The default behaviour is to return true.

Returns:
true if the authorisation in the realm is to be applied.

Reimplemented in PHTTPSimpleAuth, and PHTTPMultiSimpAuth.

virtual PBoolean PHTTPAuthority::Validate ( const PHTTPRequest request,
const PString authInfo 
) const [pure virtual]

Validate the user and password provided by the remote HTTP client for the realm specified by the class instance.

Returns:
true if the user and password are authorised in the realm.
Parameters:
request  Request information.
authInfo  Authority information string.

Implemented in PHTTPSimpleAuth, and PHTTPMultiSimpAuth.


The documentation for this class was generated from the following file:
Generated on Fri Oct 14 01:44:11 2011 for PTLib by  doxygen 1.4.7