Class Poco::Net::HTTPNTLMCredentials (original) (raw)
Library: Net
Package: HTTP
Header: Poco/Net/HTTPNTLMCredentials.h
Description
This is a utility class for working with HTTP NTLMv2 Authentication in HTTPRequest objects.
Member Summary
Member Functions: authenticate, clear, empty, getHost, getPassword, getUsername, proxyAuthenticate, reset, setHost, setPassword, setUsername, updateAuthInfo, updateProxyAuthInfo
Constructors
HTTPNTLMCredentials
HTTPNTLMCredentials
HTTPNTLMCredentials(
const std::string & username,
const std::string & password
);
HTTPNTLMCredentials
HTTPNTLMCredentials(
const std::string & username,
const std::string & password,
const std::string & host
);
Creates a HTTPNTLMCredentials object with the given username, password and target host.
Destructor
~HTTPNTLMCredentials
Member Functions
authenticate
void authenticate(
HTTPRequest & request,
const HTTPResponse & response
);
Parses WWW-Authenticate header of the HTTPResponse, initializes internal state, and adds authentication information to the given HTTPRequest.
authenticate
void authenticate(
HTTPRequest & request,
const std::string & ntlmChallengeBase64
);
Initializes internal state according to information from the ntlmChallengeBase64, and adds authentication information to the given HTTPRequest.
Throws InvalidArgumentException if responseAuthParams is invalid.
clear
void clear();
Clears username, password and host.
empty 
bool empty() const;
Returns true if both username and password are empty, otherwise false.
getHost 
const std::string & getHost() const;
Returns the target host.
getPassword 
const std::string & getPassword() const;
Returns the password.
getUsername 
const std::string & getUsername() const;
Returns the username.
proxyAuthenticate
void proxyAuthenticate(
HTTPRequest & request,
const HTTPResponse & response
);
Parses Proxy-Authenticate header of the HTTPResponse, initializes internal state, and adds proxy authentication information to the given HTTPRequest.
proxyAuthenticate
void proxyAuthenticate(
HTTPRequest & request,
const std::string & ntlmChallengeBase64
);
reset
void reset();
Resets the HTTPNTLMCredentials object to a clean state. Does not clear username and password.
setHost
void setHost(
const std::string & host
);
Sets the target host.
Used for SSPI-based NTLM authentication only.
setPassword
void setPassword(
const std::string & password
);
Sets the password.
setUsername
void setUsername(
const std::string & username
);
Sets the username.
updateAuthInfo
void updateAuthInfo(
HTTPRequest & request
);
Updates internal state and adds authentication information to the given HTTPRequest.
updateProxyAuthInfo
void updateProxyAuthInfo(
HTTPRequest & request
);
Updates internal state and adds proxy authentication information to the given HTTPRequest.
Variables
SCHEME 
static const std::string SCHEME;