Apache Mesos
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
mesos::http::authentication::BasicAuthenticatorFactory Class Reference

#include <basic_authenticator_factory.hpp>

Public Member Functions

 ~BasicAuthenticatorFactory ()
 

Static Public Member Functions

static Try< process::http::authentication::Authenticator * > create (const Parameters &parameters)
 Creates a basic HTTP authenticator from module parameters. More...
 
static Try< process::http::authentication::Authenticator * > create (const std::string &realm, const Credentials &credentials)
 Creates a basic HTTP authenticator for the specified realm, initialized with the provided credentials. More...
 
static Try< process::http::authentication::Authenticator * > create (const std::string &realm, const hashmap< std::string, std::string > &credentials)
 Creates a basic HTTP authenticator for the specified realm, initialized with the provided credentials. More...
 

Protected Member Functions

 BasicAuthenticatorFactory ()
 

Constructor & Destructor Documentation

mesos::http::authentication::BasicAuthenticatorFactory::~BasicAuthenticatorFactory ( )
inline
mesos::http::authentication::BasicAuthenticatorFactory::BasicAuthenticatorFactory ( )
inlineprotected

Member Function Documentation

static Try<process::http::authentication::Authenticator*> mesos::http::authentication::BasicAuthenticatorFactory::create ( const Parameters &  parameters)
static

Creates a basic HTTP authenticator from module parameters.

Two keys may be specified in the parameters: authentication_realm (required) and credentials (optional). Credentials must be provided as a string which represents a JSON array, similar to the format of the --credentials command-line flag.

Example parameters as JSON: { "parameters": [ { "key": "authentication_realm", "value": "tatooine" }, { "key": "credentials", "value": "[ { "principal": "luke", "secret": "skywalker" } ]" } ] }

Parameters
parametersThe input parameters. This object may contain two keys: authentication_realm (required) and credentials (optional).
Returns
A Try containing a new authenticator if successful, or an Error if unsuccessful.
static Try<process::http::authentication::Authenticator*> mesos::http::authentication::BasicAuthenticatorFactory::create ( const std::string &  realm,
const Credentials &  credentials 
)
static

Creates a basic HTTP authenticator for the specified realm, initialized with the provided credentials.

Parameters
realmThe authentication realm associated with this authenticator.
credentialsThe credentials that this authenticator will use to evaluate authentication requests.
Returns
A Try containing a new authenticator if successful, or an Error if unsuccessful.
static Try<process::http::authentication::Authenticator*> mesos::http::authentication::BasicAuthenticatorFactory::create ( const std::string &  realm,
const hashmap< std::string, std::string > &  credentials 
)
static

Creates a basic HTTP authenticator for the specified realm, initialized with the provided credentials.

Parameters
realmThe authentication realm associated with this authenticator.
credentialsThe credentials that this authenticator will use to evaluate authentication requests.
Returns
A Try containing a new authenticator if successful, or an Error if unsuccessful.

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