MCPcopy Create free account
hub / github.com/3rdparty/libprocess / AuthenticatorManager

Class AuthenticatorManager

src/authenticator_manager.hpp:38–62  ·  view source on GitHub ↗

Manages the realm -> Authenticator mapping for HTTP authentication in libprocess. Endpoints may map to a realm. Each realm may have an authenticator set here, through which all requests to matching endpoints will be authenticated.

Source from the content-addressed store, hash-verified

36// here, through which all requests to matching
37// endpoints will be authenticated.
38class AuthenticatorManager
39{
40public:
41 AuthenticatorManager();
42 ~AuthenticatorManager();
43
44 // Sets the authenticator for the realm; this will
45 // overwrite any previous authenticator for the realm.
46 Future<Nothing> setAuthenticator(
47 const std::string& realm,
48 Owned<Authenticator> authenticator);
49
50 // Unsets the authenticator for the realm.
51 Future<Nothing> unsetAuthenticator(const std::string& realm);
52
53 // Authenticates the request, will return None if no
54 // authentication is required because there is no
55 // authenticator for the realm.
56 Future<Option<AuthenticationResult>> authenticate(
57 const Request& request,
58 const std::string& realm);
59
60private:
61 Owned<AuthenticatorManagerProcess> process;
62};
63
64} // namespace authentication {
65} // namespace http {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected