#include <http.h>
Inheritance diagram for PHTTPAuthority:
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) |
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.
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.
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.
Reimplemented in PHTTPSimpleAuth, and PHTTPMultiSimpAuth.
static void PHTTPAuthority::DecodeBasicAuthority | ( | const PString & | authInfo, | |
PString & | username, | |||
PString & | password | |||
) | [static, protected] |
authInfo | Authority information string. |
username | User name decoded from authInfo |
password | Password decoded from authInfo |