MCPcopy Create free account
hub / github.com/apache/arrow / Authenticate

Method Authenticate

cpp/src/arrow/flight/test_auth_handlers.cc:38–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36TestServerAuthHandler::~TestServerAuthHandler() {}
37
38Status TestServerAuthHandler::Authenticate(const ServerCallContext& context,
39 ServerAuthSender* outgoing,
40 ServerAuthReader* incoming) {
41 std::string token;
42 RETURN_NOT_OK(incoming->Read(&token));
43 if (token != password_) {
44 return MakeFlightError(FlightStatusCode::Unauthenticated, "Invalid token");
45 }
46 RETURN_NOT_OK(outgoing->Write(username_));
47 return Status::OK();
48}
49
50Status TestServerAuthHandler::IsValid(const ServerCallContext& context,
51 const std::string& token,

Callers

nothing calls this directly

Calls 4

MakeFlightErrorFunction · 0.85
OKFunction · 0.50
ReadMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected