| 673 | BearerAuthServerMiddlewareFactory() : isValid_(false) {} |
| 674 | |
| 675 | Status StartCall(const CallInfo& info, const ServerCallContext& context, |
| 676 | std::shared_ptr<ServerMiddleware>* middleware) override { |
| 677 | const std::pair<CallHeaders::const_iterator, CallHeaders::const_iterator>& iter_pair = |
| 678 | context.incoming_headers().equal_range(kAuthHeader); |
| 679 | if (iter_pair.first != iter_pair.second) { |
| 680 | *middleware = std::make_shared<BearerAuthServerMiddleware>( |
| 681 | context.incoming_headers(), &isValid_); |
| 682 | } |
| 683 | return Status::OK(); |
| 684 | } |
| 685 | |
| 686 | bool GetIsValid() { return isValid_; } |
| 687 |
no test coverage detected