#include <HTTP_BasicAuthentication.h>

Public Member Functions | |
| BasicAuthentication () | |
| Constructor. | |
| BasicAuthentication (const ACE_CString &user, const ACE_CString &passwd) | |
| Constructor. Sets user id and password. | |
| BasicAuthentication (const Request &request) | |
| Constructor. Decodes cedentials from request (if any). | |
| virtual | ~BasicAuthentication () |
| Destructor. | |
| void | user (const ACE_CString &user) |
| Set user id. | |
| const ACE_CString & | user () const |
| Get user id. | |
| void | password (const ACE_CString &passwd) |
| Set password. | |
| const ACE_CString & | password () const |
| Get password. | |
| void | set_credentials (Request &request) const |
| Add authentication header with encoded credentials to request. | |
Static Public Attributes | |
| static const char * | SCHEME = "Basic" |
Private Member Functions | |
| BasicAuthentication (const BasicAuthentication &) | |
| BasicAuthentication & | operator= (BasicAuthentication &) |
Private Attributes | |
| ACE_CString | user_ |
| ACE_CString | passwd_ |
Definition at line 35 of file HTTP_BasicAuthentication.h.
| ACE::HTTP::BasicAuthentication::BasicAuthentication | ( | ) |
Constructor.
Definition at line 9 of file HTTP_BasicAuthentication.cpp.
: HTTP_BasicAuthentication.cpp 91132 2010-07-20 05:28:27Z mcorino $")
| ACE::HTTP::BasicAuthentication::BasicAuthentication | ( | const ACE_CString & | user, | |
| const ACE_CString & | passwd | |||
| ) |
Constructor. Sets user id and password.
Definition at line 13 of file HTTP_BasicAuthentication.cpp.
{
| ACE::HTTP::BasicAuthentication::BasicAuthentication | ( | const Request & | request | ) |
Constructor. Decodes cedentials from request (if any).
Definition at line 18 of file HTTP_BasicAuthentication.cpp.
{
const char* BasicAuthentication::SCHEME = "Basic";
BasicAuthentication::BasicAuthentication()
{
}
BasicAuthentication::BasicAuthentication(const ACE_CString& user, const ACE_CString& passwd)
: user_ (user), passwd_ (passwd)
{
}
BasicAuthentication::BasicAuthentication(const Request& request)
{
if (request.has_credentials ())
{
ACE_CString scheme;
ACE_CString info;
request.get_credentials (scheme, info);
if (scheme == SCHEME)
{
| ACE::HTTP::BasicAuthentication::~BasicAuthentication | ( | ) | [virtual] |
Destructor.
Definition at line 41 of file HTTP_BasicAuthentication.cpp.
| ACE::HTTP::BasicAuthentication::BasicAuthentication | ( | const BasicAuthentication & | ) | [private] |
| BasicAuthentication& ACE::HTTP::BasicAuthentication::operator= | ( | BasicAuthentication & | ) | [private] |
| const ACE_CString & ACE::HTTP::BasicAuthentication::password | ( | ) | const [inline] |
| void ACE::HTTP::BasicAuthentication::password | ( | const ACE_CString & | passwd | ) | [inline] |
Set password.
Definition at line 25 of file HTTP_BasicAuthentication.inl.
{
this->passwd_ = passwd;
}
| void ACE::HTTP::BasicAuthentication::set_credentials | ( | Request & | request | ) | const |
Add authentication header with encoded credentials to request.
Definition at line 45 of file HTTP_BasicAuthentication.cpp.
{
this->user_ = credentials.substr (0, pos);
this->passwd_ = credentials.substr (pos+1);
}
}
}
}
BasicAuthentication::~BasicAuthentication()
{
}
void BasicAuthentication::set_credentials (Request& request) const
| void ACE::HTTP::BasicAuthentication::user | ( | const ACE_CString & | user | ) | [inline] |
| const ACE_CString & ACE::HTTP::BasicAuthentication::user | ( | ) | const [inline] |
Definition at line 73 of file HTTP_BasicAuthentication.h.
const char * ACE::HTTP::BasicAuthentication::SCHEME = "Basic" [static] |
Definition at line 65 of file HTTP_BasicAuthentication.h.
Definition at line 72 of file HTTP_BasicAuthentication.h.
1.7.0