# PHTTPClientAuthentication Class Reference

`#include <http.h>`

Inheritance diagram for PHTTPClientAuthentication:

List of all members.

## Public Member Functions

| PHTTPClientAuthentication ()
virtual Comparison | Compare (const PObject &other) const
| Compare the two objects and return their relative rank.
virtual PBoolean | Parse (const PString &auth, PBoolean proxy)=0
virtual PBoolean | Authorise (AuthObject &pdu) const =0
virtual PBoolean | IsProxy () const
virtual PString | GetUsername () const
virtual PString | GetPassword () const
virtual PString | GetAuthRealm () const
virtual void | SetUsername (const PString &user)
virtual void | SetPassword (const PString &pass)
virtual void | SetAuthRealm (const PString &)
PString | GetAuthParam (const PString &auth, const char *name) const
PString | AsHex (PMessageDigest5::Code &digest) const
PString | AsHex (const PBYTEArray &data) const

## Static Public Member Functions

static PHTTPClientAuthentication * | ParseAuthenticationRequired (bool isProxy, const PMIMEInfo &line, PString &errorMsg)

## Protected Attributes

PBoolean | isProxy
PString | username
PString | password

## Classes

class | AuthObject

## Constructor & Destructor Documentation

PHTTPClientAuthentication::PHTTPClientAuthentication | ( |  | ) |

## Member Function Documentation

PString PHTTPClientAuthentication::AsHex | ( | const PBYTEArray & | data | ) | const

PString PHTTPClientAuthentication::AsHex | ( | PMessageDigest5::Code & | digest | ) | const

virtual PBoolean PHTTPClientAuthentication::Authorise | ( | AuthObject & | pdu | ) | const`[pure virtual]`

virtual Comparison PHTTPClientAuthentication::Compare | ( | const PObject & | other | ) | const`[virtual]`

Compare the two objects and return their relative rank.

This function is usually overridden by descendent classes to yield the ranking according to the semantics of the object.

The default function is to use the `CompareObjectMemoryDirect()` function to do a byte wise memory comparison of the two objects.

Returns:
  `LessThan`, `EqualTo` or `GreaterThan` according to the relative rank of the objects.

Reimplemented from PObject.

Reimplemented in PHTTPClientBasicAuthentication, and PHTTPClientDigestAuthentication.

PString PHTTPClientAuthentication::GetAuthParam | ( | const PString & | auth,
|  | const char * | name |
| ) |  |  | const

virtual PString PHTTPClientAuthentication::GetAuthRealm | ( |  | ) | const`[inline, virtual]`

Reimplemented in PHTTPClientDigestAuthentication.

virtual PString PHTTPClientAuthentication::GetPassword | ( |  | ) | const`[inline, virtual]`

virtual PString PHTTPClientAuthentication::GetUsername | ( |  | ) | const`[inline, virtual]`

virtual PBoolean PHTTPClientAuthentication::IsProxy | ( |  | ) | const`[inline, virtual]`

virtual PBoolean PHTTPClientAuthentication::Parse | ( | const PString & | auth,
|  | PBoolean | proxy |
| ) |  |  | `[pure virtual]`

Implemented in PHTTPClientBasicAuthentication, and PHTTPClientDigestAuthentication.

static PHTTPClientAuthentication* PHTTPClientAuthentication::ParseAuthenticationRequired | ( | bool | isProxy,
|  | const PMIMEInfo & | line,
|  | PString & | errorMsg |
| ) |  |  | `[static]`

virtual void PHTTPClientAuthentication::SetAuthRealm | ( | const PString & |  | ) | `[inline, virtual]`

Reimplemented in PHTTPClientDigestAuthentication.

virtual void PHTTPClientAuthentication::SetPassword | ( | const PString & | pass | ) | `[inline, virtual]`

virtual void PHTTPClientAuthentication::SetUsername | ( | const PString & | user | ) | `[inline, virtual]`

## Member Data Documentation

PBoolean PHTTPClientAuthentication::isProxy `[protected]`

PString PHTTPClientAuthentication::password `[protected]`

PString PHTTPClientAuthentication::username `[protected]`

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

- http.h