Apache Mesos
|
An authenticator which holds references to multiple authenticators. More...
#include <combined_authenticator.hpp>
Public Member Functions | |
CombinedAuthenticator (const std::string &realm, std::vector< process::Owned< process::http::authentication::Authenticator >> &&authenticators) | |
CombinedAuthenticator (const CombinedAuthenticator &)=delete | |
Non-copyable to protect the ownership of the installed authenticators. More... | |
~CombinedAuthenticator () override | |
process::Future< process::http::authentication::AuthenticationResult > | authenticate (const process::http::Request &request) override |
Authenticates using the installed authenticators. More... | |
std::string | scheme () const override |
Returns the authentication schemes offered by the installed authenticators, separated by whitespace. More... | |
Public Member Functions inherited from process::http::authentication::Authenticator | |
virtual | ~Authenticator () |
An authenticator which holds references to multiple authenticators.
mesos::http::authentication::CombinedAuthenticator::CombinedAuthenticator | ( | const std::string & | realm, |
std::vector< process::Owned< process::http::authentication::Authenticator >> && | authenticators | ||
) |
|
delete |
Non-copyable to protect the ownership of the installed authenticators.
|
override |
|
overridevirtual |
Authenticates using the installed authenticators.
When called, the authenticate()
method of each authenticator is called serially, and the first successful result is returned. If all authentication attempts fail, the failed results are combined as follows:
Below are examples illustrating various combinations of authentication results when two authenticators are installed. In these examples, the scheme()
method of one authenticator returns "Basic". The other returns "Bearer". These schemes are used when combining response bodies.
Both authentication results are Unauthorized:
One Unauthorized result and one Forbidden:
Both authentication results are Forbidden:
Implements process::http::authentication::Authenticator.
|
overridevirtual |
Returns the authentication schemes offered by the installed authenticators, separated by whitespace.
Implements process::http::authentication::Authenticator.