MCPcopy Create free account
hub / github.com/apache/mesos / getAuthHeader

Function getAuthHeader

src/slave/container_daemon.cpp:52–61  ·  view source on GitHub ↗

Returns the 'Bearer' credential as a header for calling the V1 agent API if the `authToken` is presented, or empty otherwise. TODO(chhsiao): Currently we assume the JWT authenticator is used for the agent operator API.

Source from the content-addressed store, hash-verified

50// TODO(chhsiao): Currently we assume the JWT authenticator is used for
51// the agent operator API.
52static inline http::Headers getAuthHeader(const Option<string>& authToken)
53{
54 http::Headers headers;
55
56 if (authToken.isSome()) {
57 headers["Authorization"] = "Bearer " + authToken.get();
58 }
59
60 return headers;
61}
62
63
64ContainerDaemonProcess::ContainerDaemonProcess(

Callers 4

_fetchMethod · 0.85
_fetchBlobMethod · 0.85
launchContainerMethod · 0.85
waitContainerMethod · 0.85

Calls 2

isSomeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected