| 36 | TestServerAuthHandler::~TestServerAuthHandler() {} |
| 37 | |
| 38 | Status 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 | |
| 50 | Status TestServerAuthHandler::IsValid(const ServerCallContext& context, |
| 51 | const std::string& token, |
nothing calls this directly
no test coverage detected