#include <AuthorizationBuilder.hpp>
|
|
| AuthorizationBuilder (const AuthorizationBuilder &orig) |
| |
| std::string | usernameRealmAndPassword (const std::string &username, const std::string &realm, const std::string &password) |
| |
| std::string | userRealmPassNonceCnonce (const std::string &username, const std::string &realm, const std::string &password, const std::string &nonce, const std::string &cnonce) |
| |
| std::string | methodAndURL (const std::string &method, const std::string &url) |
| |
| std::string | methodURLAndBodyHash (const std::string &method, const std::string &url, const std::string &bodyHash) |
| |
| std::string | response (const std::string &hash1, const std::string &nonce, const std::string &nonceCount, const std::string &clientNonce, const std::string &qop, const std::string &hash2) |
| |
| std::string | response (const std::string &hash1, const std::string &nonce, const std::string &hash2) |
| |
AuthorizationBuilder class.
Testable helper class to build the parts of the Digest response. Takes various parts of the response and combines them appropriately, using the MD5 hashing algorithm where necessary.
| std::string mlclient::internals::AuthorizationBuilder::methodAndURL |
( |
const std::string & |
method, |
|
|
const std::string & |
url |
|
) |
| |
Constructs the HA2 hash from the HTTP method and the document portion of the URL.
- Parameters
-
| method | The HTTP method (GET, POST, etc.) |
| url | The document path portion of the url. |
- Returns
- The MD5 hash of the values
| std::string mlclient::internals::AuthorizationBuilder::methodURLAndBodyHash |
( |
const std::string & |
method, |
|
|
const std::string & |
url, |
|
|
const std::string & |
bodyHash |
|
) |
| |
Constructs the alternate HA2 hash from the HTTP method, the path portion of the URL, and the hash of the body contents.
- Parameters
-
| method | The HTTP method (GET, POST, etc.) |
| url | The document path portion of the url. |
| bodyHash | The hash of the body contents. |
| std::string mlclient::internals::AuthorizationBuilder::response |
( |
const std::string & |
hash1, |
|
|
const std::string & |
nonce, |
|
|
const std::string & |
nonceCount, |
|
|
const std::string & |
clientNonce, |
|
|
const std::string & |
qop, |
|
|
const std::string & |
hash2 |
|
) |
| |
Construct a digest response.
- Parameters
-
| hash1 | The appropriate HA1 hash |
| nonce | The server provided nonce |
| nonceCount | The client side counter to prevent replay attacks. |
| clientNonce | The client generated nonce |
| qop | The qop value returned from the server |
| hash2 | The approparite HA2 hash |
- Returns
- The MD5 encoded hash of the values
| std::string mlclient::internals::AuthorizationBuilder::response |
( |
const std::string & |
hash1, |
|
|
const std::string & |
nonce, |
|
|
const std::string & |
hash2 |
|
) |
| |
Construct a digest response
- Parameters
-
| hash1 | The appropriate HA1 hash |
| nonce | The server provided nonce |
| hash2 | The approparite HA2 hash |
- Returns
- The MD5 encoded hash of the values
| std::string mlclient::internals::AuthorizationBuilder::usernameRealmAndPassword |
( |
const std::string & |
username, |
|
|
const std::string & |
realm, |
|
|
const std::string & |
password |
|
) |
| |
Constructs the username password realm hash (one of the candidate HA1 hashes)
- Parameters
-
| username | The username |
| realm | The authentication realm |
| password | The user (plaintext) password |
- Returns
- The MD5 hash of the values
| std::string mlclient::internals::AuthorizationBuilder::userRealmPassNonceCnonce |
( |
const std::string & |
username, |
|
|
const std::string & |
realm, |
|
|
const std::string & |
password, |
|
|
const std::string & |
nonce, |
|
|
const std::string & |
cnonce |
|
) |
| |
Constructs the alternate HA1 construct that includes the nonce and cnonce.
- Parameters
-
| username | The username |
| realm | The authentication realm |
| password | The user (plaintext) password |
| nonce | The server provided nonce |
| cnonce | The client provided nonce |
- Returns
- The MD5 hash of the values
The documentation for this class was generated from the following file: