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() [1/3]
RWHttpBasicAuthorizationHeader::RWHttpBasicAuthorizationHeader |
( |
| ) |
|
|
inline |
◆ RWHttpBasicAuthorizationHeader() [2/3]
RWHttpBasicAuthorizationHeader::RWHttpBasicAuthorizationHeader |
( |
const RWCString & | username, |
|
|
const RWCString & | password, |
|
|
bool | padding = false ) |
|
inline |
◆ RWHttpBasicAuthorizationHeader() [3/3]
RWHttpBasicAuthorizationHeader::RWHttpBasicAuthorizationHeader |
( |
const RWHttpGenericHeader & | hdr | ) |
|
◆ decodeString()
Returns a RWCString representing the plain text version of the base64 encoded string str. The RWCString should contain 7-bit US-ASCII data.
◆ encodeString()
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.
◆ getPassword()
RWCString RWHttpBasicAuthorizationHeader::getPassword |
( |
void | | ) |
const |
|
inline |
Returns the internal value of password as a RWCString.
◆ getUsername()
RWCString RWHttpBasicAuthorizationHeader::getUsername |
( |
void | | ) |
const |
|
inline |
Returns the internal value of username as a RWCString.
◆ getValue()
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.
◆ setPassword()
void RWHttpBasicAuthorizationHeader::setPassword |
( |
const RWCString & | password | ) |
|
|
inline |
Assigns password to the internal password.
◆ setUsername()
void RWHttpBasicAuthorizationHeader::setUsername |
( |
const RWCString & | username | ) |
|
|
inline |
Assigns username to the internal username.