Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
Poco::Net::HTTPNTLMCredentials Class Reference

#include <HTTPNTLMCredentials.h>

+ Collaboration diagram for Poco::Net::HTTPNTLMCredentials:

Public Member Functions

 HTTPNTLMCredentials ()
 
 HTTPNTLMCredentials (const std::string &username, const std::string &password)
 Creates an empty HTTPNTLMCredentials object.
 
 HTTPNTLMCredentials (const std::string &username, const std::string &password, const std::string &host)
 Creates a HTTPNTLMCredentials object with the given username and password.
 
 ~HTTPNTLMCredentials ()
 Creates a HTTPNTLMCredentials object with the given username, password and target host.
 
void reset ()
 Destroys the HTTPNTLMCredentials.
 
void clear ()
 
void setUsername (const std::string &username)
 Clears username, password and host.
 
const std::string & getUsername () const
 Sets the username.
 
void setPassword (const std::string &password)
 Returns the username.
 
const std::string & getPassword () const
 Sets the password.
 
bool empty () const
 Returns the password.
 
void setHost (const std::string &host)
 Returns true if both username and password are empty, otherwise false.
 
const std::string & getHost () const
 
void authenticate (HTTPRequest &request, const HTTPResponse &response)
 Returns the target host.
 
void authenticate (HTTPRequest &request, const std::string &ntlmChallengeBase64)
 
void updateAuthInfo (HTTPRequest &request)
 
void proxyAuthenticate (HTTPRequest &request, const HTTPResponse &response)
 
void proxyAuthenticate (HTTPRequest &request, const std::string &ntlmChallengeBase64)
 
void updateProxyAuthInfo (HTTPRequest &request)
 

Static Public Attributes

static const std::string SCHEME
 

Private Member Functions

 HTTPNTLMCredentials (const HTTPNTLMCredentials &)
 
HTTPNTLMCredentialsoperator= (const HTTPNTLMCredentials &)
 
std::string createNTLMMessage (const std::string &ntlmChallengeBase64)
 
bool useSSPINTLM () const
 

Private Attributes

std::string _username
 
std::string _password
 
std::string _host
 
Poco::SharedPtr< NTLMContext_pNTLMContext
 

Detailed Description

This is a utility class for working with HTTP NTLMv2 Authentication in HTTPRequest objects.

Definition at line 34 of file HTTPNTLMCredentials.h.

Constructor & Destructor Documentation

◆ HTTPNTLMCredentials() [1/4]

Poco::Net::HTTPNTLMCredentials::HTTPNTLMCredentials ( )

◆ HTTPNTLMCredentials() [2/4]

Poco::Net::HTTPNTLMCredentials::HTTPNTLMCredentials ( const std::string & username,
const std::string & password )

Creates an empty HTTPNTLMCredentials object.

◆ HTTPNTLMCredentials() [3/4]

Poco::Net::HTTPNTLMCredentials::HTTPNTLMCredentials ( const std::string & username,
const std::string & password,
const std::string & host )

Creates a HTTPNTLMCredentials object with the given username and password.

◆ ~HTTPNTLMCredentials()

Poco::Net::HTTPNTLMCredentials::~HTTPNTLMCredentials ( )

Creates a HTTPNTLMCredentials object with the given username, password and target host.

◆ HTTPNTLMCredentials() [4/4]

Poco::Net::HTTPNTLMCredentials::HTTPNTLMCredentials ( const HTTPNTLMCredentials & )
private

Member Function Documentation

◆ authenticate() [1/2]

void Poco::Net::HTTPNTLMCredentials::authenticate ( HTTPRequest & request,
const HTTPResponse & response )

Returns the target host.

◆ authenticate() [2/2]

void Poco::Net::HTTPNTLMCredentials::authenticate ( HTTPRequest & request,
const std::string & ntlmChallengeBase64 )

Parses WWW-Authenticate header of the HTTPResponse, initializes internal state, and adds authentication information to the given HTTPRequest.

◆ clear()

void Poco::Net::HTTPNTLMCredentials::clear ( )

Resets the HTTPNTLMCredentials object to a clean state. Does not clear username and password.

◆ createNTLMMessage()

std::string Poco::Net::HTTPNTLMCredentials::createNTLMMessage ( const std::string & ntlmChallengeBase64)
private

◆ empty()

bool Poco::Net::HTTPNTLMCredentials::empty ( ) const
inline

Returns the password.

Definition at line 159 of file HTTPNTLMCredentials.h.

◆ getHost()

const std::string & Poco::Net::HTTPNTLMCredentials::getHost ( ) const
inline

Sets the target host.

Used for SSPI-based NTLM authentication only.

Definition at line 147 of file HTTPNTLMCredentials.h.

◆ getPassword()

const std::string & Poco::Net::HTTPNTLMCredentials::getPassword ( ) const
inline

Sets the password.

Definition at line 141 of file HTTPNTLMCredentials.h.

◆ getUsername()

const std::string & Poco::Net::HTTPNTLMCredentials::getUsername ( ) const
inline

Sets the username.

Definition at line 135 of file HTTPNTLMCredentials.h.

◆ operator=()

HTTPNTLMCredentials & Poco::Net::HTTPNTLMCredentials::operator= ( const HTTPNTLMCredentials & )
private

◆ proxyAuthenticate() [1/2]

void Poco::Net::HTTPNTLMCredentials::proxyAuthenticate ( HTTPRequest & request,
const HTTPResponse & response )

Updates internal state and adds authentication information to the given HTTPRequest.

◆ proxyAuthenticate() [2/2]

void Poco::Net::HTTPNTLMCredentials::proxyAuthenticate ( HTTPRequest & request,
const std::string & ntlmChallengeBase64 )

Parses Proxy-Authenticate header of the HTTPResponse, initializes internal state, and adds proxy authentication information to the given HTTPRequest.

◆ reset()

void Poco::Net::HTTPNTLMCredentials::reset ( )

Destroys the HTTPNTLMCredentials.

◆ setHost()

void Poco::Net::HTTPNTLMCredentials::setHost ( const std::string & host)

Returns true if both username and password are empty, otherwise false.

◆ setPassword()

void Poco::Net::HTTPNTLMCredentials::setPassword ( const std::string & password)

Returns the username.

◆ setUsername()

void Poco::Net::HTTPNTLMCredentials::setUsername ( const std::string & username)

Clears username, password and host.

◆ updateAuthInfo()

void Poco::Net::HTTPNTLMCredentials::updateAuthInfo ( HTTPRequest & request)

Initializes internal state according to information from the ntlmChallengeBase64, and adds authentication information to the given HTTPRequest.

Throws InvalidArgumentException if responseAuthParams is invalid.

◆ updateProxyAuthInfo()

void Poco::Net::HTTPNTLMCredentials::updateProxyAuthInfo ( HTTPRequest & request)

Initializes internal state according to information from the HTTPAuthenticationParams of the response, and adds proxy authentication information to the given HTTPRequest.

Throws InvalidArgumentException if HTTPAuthenticationParams is invalid or some required parameter is missing. Throws NotImplementedException in case of unsupported digest algorithm or quality of protection method.

◆ useSSPINTLM()

bool Poco::Net::HTTPNTLMCredentials::useSSPINTLM ( ) const
inlineprivate

Definition at line 153 of file HTTPNTLMCredentials.h.

Member Data Documentation

◆ _host

std::string Poco::Net::HTTPNTLMCredentials::_host
private

Definition at line 127 of file HTTPNTLMCredentials.h.

◆ _password

std::string Poco::Net::HTTPNTLMCredentials::_password
private

Definition at line 126 of file HTTPNTLMCredentials.h.

◆ _pNTLMContext

Poco::SharedPtr<NTLMContext> Poco::Net::HTTPNTLMCredentials::_pNTLMContext
private

Definition at line 128 of file HTTPNTLMCredentials.h.

◆ _username

std::string Poco::Net::HTTPNTLMCredentials::_username
private

Definition at line 125 of file HTTPNTLMCredentials.h.

◆ SCHEME

const std::string Poco::Net::HTTPNTLMCredentials::SCHEME
static

Updates internal state and adds proxy authentication information to the given HTTPRequest.

Definition at line 116 of file HTTPNTLMCredentials.h.


The documentation for this class was generated from the following file: