PHTTPAuthority Class Reference

#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
virtual PBoolean Validate (const PHTTPRequest &request, const PString &authInfo) const=0
virtual PBoolean IsActive () const

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

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::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:
PTrue if the user and password are authorised in the realm.
Parameters:
request  Request information.
authInfo  Authority information string.

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 PTrue.

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

Reimplemented in PHTTPSimpleAuth, and PHTTPMultiSimpAuth.

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


The documentation for this class was generated from the following file:
Generated on Mon Dec 10 11:18:59 2007 for PTLib by  doxygen 1.5.1