Module: Internet Protocols Module Package: HTTP
RWHttpBasicAuthorizationHeaderRWHttpAuthorizationHeaderBase ... ... RWHttpHeaderBase
decodeString() encodeString() |
getPassword() getUsername() |
getValue() RWHttpBasicAuthorizationHeader() |
setPassword() setUsername() |
#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();
Constructs a default RWHttpBasicAuthorizationHeader object with the label Authorization and the username and password set to empty strings.
RWHttpBasicAuthorizationHeader(const RWCString& username, const RWCString& password);
Constructs a RWHttpBasicAuthorizationHeader object with the label Authorization, a username of username, and a password of password.
RWHttpBasicAuthorizationHeader(const RWHttpGenericHeader& hdr);
Constructs an RWHttpBasicAuthorizationHeader object from an RWHttpGenericHeader representing a basic Authorization HTTP header. If the RWHttpGenericHeader does not represent a basic Authorization HTTP header or if the value of the RWHttpGenericHeader does not conform to the formatting of a basic Authorization value, an RWHttpHeaderParseError exception is thrown.
RWCString getPassword() const;
Returns the internal value of password as a RWCString.
RWCString getUsername() const;
Returns the internal value of username as a RWCString.
virtual RWCString getValue() const;
Returns a RWCString consisting of the word Basic followed by a base64 encoded string representing username:password.
void setPassword(const RWCString& password);
Assigns password to the internal password.
void setUsername(const RWCString& username);
Assigns username to the internal username.
RWCString decodeString(const RWCString& str);
Returns a RWCString representing the plain text version of the base64 encoded string str. The RWCString should contain 7-bit US-ASCII data.
RWCString encodeString(const RWCString& str);
Returns a RWCString representing the base64 encoded version of str. The RWCString should contain 7-bit US-ASCII data.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.