Apache Mesos
http_authenticator.hpp
Go to the documentation of this file.
1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 
17 #ifndef __MESOS_MODULE_HTTP_AUTHENTICATOR_HPP__
18 #define __MESOS_MODULE_HTTP_AUTHENTICATOR_HPP__
19 
20 #include <mesos/mesos.hpp>
21 #include <mesos/module.hpp>
22 
24 
25 namespace mesos {
26 namespace modules {
27 
28 template <>
29 inline const char* kind<process::http::authentication::Authenticator>()
30 {
31  return "HttpAuthenticator";
32 }
33 
34 
35 template <>
36 struct Module<process::http::authentication::Authenticator> : ModuleBase
37 {
39  const char* _moduleApiVersion,
40  const char* _mesosVersion,
41  const char* _authorName,
42  const char* _authorEmail,
43  const char* _description,
44  bool (*_compatible)(),
46  const Parameters& parameters))
47  : ModuleBase(
48  _moduleApiVersion,
49  _mesosVersion,
50  mesos::modules::kind<process::http::authentication::Authenticator>(),
51  _authorName,
52  _authorEmail,
53  _description,
54  _compatible),
55  create(_create) {}
56 
58  const Parameters& parameters);
59 };
60 
61 } // namespace modules {
62 } // namespace mesos {
63 
64 #endif // __MESOS_MODULE_HTTP_AUTHENTICATOR_HPP__
Definition: module.hpp:56
const char * kind()
Module(const char *_moduleApiVersion, const char *_mesosVersion, const char *_authorName, const char *_authorEmail, const char *_description, bool(*_compatible)(), process::http::authentication::Authenticator *(*_create)(const Parameters &parameters))
Definition: http_authenticator.hpp:38
The Authenticator interface allows us to implement different authenticators based on the scheme (e...
Definition: authenticator.hpp:103
Definition: spec.hpp:30
Definition: authenticator.hpp:34
Definition: executor.hpp:47
Try< Nothing > create(const std::string &hierarchy, const std::string &cgroup, bool recursive=false)
URI http(const std::string &host, const std::string &path="/", const Option< int > &port=None(), const Option< std::string > &query=None(), const Option< std::string > &fragment=None(), const Option< std::string > &user=None(), const Option< std::string > &password=None())
Creates an http URI with the given parameters.
Definition: http.hpp:35
Definition: module.hpp:97