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

#include <HTTPAuthenticationParams.h>

+ Inheritance diagram for Poco::Net::HTTPAuthenticationParams:
+ Collaboration diagram for Poco::Net::HTTPAuthenticationParams:

Public Member Functions

 HTTPAuthenticationParams ()
 
 HTTPAuthenticationParams (const std::string &authInfo)
 Creates an empty authentication parameters collection.
 
 HTTPAuthenticationParams (const HTTPRequest &request)
 See fromAuthInfo() documentation.
 
 HTTPAuthenticationParams (const HTTPResponse &response, const std::string &header=WWW_AUTHENTICATE)
 See fromRequest() documentation.
 
virtual ~HTTPAuthenticationParams ()
 See fromResponse() documentation.
 
HTTPAuthenticationParamsoperator= (const HTTPAuthenticationParams &authParams)
 Destroys the HTTPAuthenticationParams.
 
void fromAuthInfo (const std::string &authInfo)
 Assigns the content of another HTTPAuthenticationParams.
 
void fromRequest (const HTTPRequest &request)
 
void fromResponse (const HTTPResponse &response, const std::string &header=WWW_AUTHENTICATE)
 
void setRealm (const std::string &realm)
 
const std::string & getRealm () const
 Sets the "realm" parameter to the provided string.
 
std::string toString () const
 
- Public Member Functions inherited from Poco::Net::NameValueCollection
 NameValueCollection ()
 
 NameValueCollection (const NameValueCollection &nvc)
 Creates an empty NameValueCollection.
 
 NameValueCollection (NameValueCollection &&nvc) noexcept
 Creates a NameValueCollection by copying another one.
 
virtual ~NameValueCollection ()
 Creates a NameValueCollection by moving another one.
 
NameValueCollectionoperator= (const NameValueCollection &nvc)
 Destroys the NameValueCollection.
 
NameValueCollectionoperator= (NameValueCollection &&nvc) noexcept
 Assigns the name-value pairs of another NameValueCollection to this one.
 
void swap (NameValueCollection &nvc)
 Moves the name-value pairs of another NameValueCollection to this one.
 
const std::string & operator[] (const std::string &name) const
 Swaps the NameValueCollection with another one.
 
void set (const std::string &name, const std::string &value)
 
void add (const std::string &name, const std::string &value)
 Sets the value of the (first) name-value pair with the given name.
 
const std::string & get (const std::string &name) const
 Adds a new name-value pair with the given name and value.
 
const std::string & get (const std::string &name, const std::string &defaultValue) const
 
bool has (const std::string &name) const
 
ConstIterator find (const std::string &name) const
 
ConstIterator begin () const
 
ConstIterator end () const
 
bool empty () const
 
std::size_t size () const
 Returns true iff the header does not have any content.
 
void erase (const std::string &name)
 
void clear ()
 Removes all name-value pairs with the given name.
 

Static Public Attributes

static const std::string REALM
 
static const std::string NTLM
 
static const std::string WWW_AUTHENTICATE
 
static const std::string PROXY_AUTHENTICATE
 

Private Member Functions

void parse (std::string::const_iterator first, std::string::const_iterator last)
 

Additional Inherited Members

- Public Types inherited from Poco::Net::NameValueCollection
using HeaderMap = Poco::ListMap<std::string, std::string>
 
using Iterator = HeaderMap::Iterator
 
using ConstIterator = HeaderMap::ConstIterator
 

Detailed Description

Collection of name-value pairs of HTTP authentication header (i.e. "realm", "qop", "nonce" in case of digest authentication header).

For NTLM, the base64-encoded NTLM message is available from the "NTLM" property.

Definition at line 33 of file HTTPAuthenticationParams.h.

Constructor & Destructor Documentation

◆ HTTPAuthenticationParams() [1/4]

Poco::Net::HTTPAuthenticationParams::HTTPAuthenticationParams ( )

◆ HTTPAuthenticationParams() [2/4]

Poco::Net::HTTPAuthenticationParams::HTTPAuthenticationParams ( const std::string & authInfo)
explicit

Creates an empty authentication parameters collection.

◆ HTTPAuthenticationParams() [3/4]

Poco::Net::HTTPAuthenticationParams::HTTPAuthenticationParams ( const HTTPRequest & request)
explicit

See fromAuthInfo() documentation.

◆ HTTPAuthenticationParams() [4/4]

Poco::Net::HTTPAuthenticationParams::HTTPAuthenticationParams ( const HTTPResponse & response,
const std::string & header = WWW_AUTHENTICATE )

See fromRequest() documentation.

◆ ~HTTPAuthenticationParams()

virtual Poco::Net::HTTPAuthenticationParams::~HTTPAuthenticationParams ( )
virtual

See fromResponse() documentation.

Member Function Documentation

◆ fromAuthInfo()

void Poco::Net::HTTPAuthenticationParams::fromAuthInfo ( const std::string & authInfo)

Assigns the content of another HTTPAuthenticationParams.

◆ fromRequest()

void Poco::Net::HTTPAuthenticationParams::fromRequest ( const HTTPRequest & request)

Creates an HTTPAuthenticationParams by parsing authentication information.

◆ fromResponse()

void Poco::Net::HTTPAuthenticationParams::fromResponse ( const HTTPResponse & response,
const std::string & header = WWW_AUTHENTICATE )

Extracts authentication information from the request and creates HTTPAuthenticationParams by parsing it.

Throws a NotAuthenticatedException if no authentication information is contained in request. Throws a InvalidArgumentException if authentication scheme is unknown or invalid.

◆ getRealm()

const std::string & Poco::Net::HTTPAuthenticationParams::getRealm ( ) const

Sets the "realm" parameter to the provided string.

◆ operator=()

HTTPAuthenticationParams & Poco::Net::HTTPAuthenticationParams::operator= ( const HTTPAuthenticationParams & authParams)

Destroys the HTTPAuthenticationParams.

◆ parse()

void Poco::Net::HTTPAuthenticationParams::parse ( std::string::const_iterator first,
std::string::const_iterator last )
private

◆ setRealm()

void Poco::Net::HTTPAuthenticationParams::setRealm ( const std::string & realm)

Extracts authentication information from the response and creates HTTPAuthenticationParams by parsing it.

Throws a NotAuthenticatedException if no authentication information is contained in response. Throws a InvalidArgumentException if authentication scheme is unknown or invalid.

◆ toString()

std::string Poco::Net::HTTPAuthenticationParams::toString ( ) const

Returns value of the "realm" parameter.

Throws NotFoundException is there is no "realm" set in the HTTPAuthenticationParams.

Member Data Documentation

◆ NTLM

const std::string Poco::Net::HTTPAuthenticationParams::NTLM
static

Definition at line 95 of file HTTPAuthenticationParams.h.

◆ PROXY_AUTHENTICATE

const std::string Poco::Net::HTTPAuthenticationParams::PROXY_AUTHENTICATE
static

Definition at line 97 of file HTTPAuthenticationParams.h.

◆ REALM

const std::string Poco::Net::HTTPAuthenticationParams::REALM
static

Formats the HTTPAuthenticationParams for inclusion in HTTP request or response authentication header.

Definition at line 94 of file HTTPAuthenticationParams.h.

◆ WWW_AUTHENTICATE

const std::string Poco::Net::HTTPAuthenticationParams::WWW_AUTHENTICATE
static

Definition at line 96 of file HTTPAuthenticationParams.h.


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