Helper class that defines an Authorization header for Basic Access Authentication.
More...
#include <rw/http/RWHttpBasicAuthorizationHeader.h>
RWHttpBasicAuthorizationHeader is a specialization class of RWHttpAuthorizationHeaderBase. It is a helper class that formats and encodes its contents as Authorization:
basic
header_value
, where header_value
is the username and password used for basic authentication.
RWHttpBasicAuthorizationHeader::RWHttpBasicAuthorizationHeader |
( |
| ) |
|
|
inline |
RWHttpBasicAuthorizationHeader::RWHttpBasicAuthorizationHeader |
( |
const RWCString & |
username, |
|
|
const RWCString & |
password, |
|
|
bool |
padding = false |
|
) |
| |
|
inline |
RWHttpBasicAuthorizationHeader::RWHttpBasicAuthorizationHeader |
( |
const RWHttpGenericHeader & |
hdr | ) |
|
Returns a RWCString representing the plain text version of the base64 encoded string str. The RWCString should contain 7-bit US-ASCII data.
static RWCString RWHttpBasicAuthorizationHeader::encodeString |
( |
const RWCString & |
str, |
|
|
bool |
padding |
|
) |
| |
|
staticprotected |
Returns a RWCString representing the base64 encoded version of str. The RWCString should contain 7-bit US-ASCII data.
RWCString RWHttpBasicAuthorizationHeader::getPassword |
( |
void |
| ) |
const |
|
inline |
Returns the internal value of password as a RWCString.
RWCString RWHttpBasicAuthorizationHeader::getUsername |
( |
void |
| ) |
const |
|
inline |
Returns the internal value of username as a RWCString.
virtual RWCString RWHttpBasicAuthorizationHeader::getValue |
( |
| ) |
const |
|
virtual |
Returns a RWCString consisting of the word Basic
followed by a base64 encoded string representing username:password
.
Implements RWHttpHeaderBase.
void RWHttpBasicAuthorizationHeader::setPassword |
( |
const RWCString & |
password | ) |
|
|
inline |
Assigns password to the internal password.
void RWHttpBasicAuthorizationHeader::setUsername |
( |
const RWCString & |
username | ) |
|
|
inline |
Assigns username to the internal username.