proxygen
MockSecondaryAuthManager.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree. An additional grant
7  * of patent rights can be found in the PATENTS file in the same directory.
8  *
9  */
10 #pragma once
11 
14 
15 namespace proxygen {
16 
18  public:
20  std::pair<uint16_t, std::unique_ptr<folly::IOBuf>>(
21  std::shared_ptr<folly::IOBuf>,
22  std::vector<fizz::Extension>&));
23  std::pair<uint16_t, std::unique_ptr<folly::IOBuf>> createAuthRequest(
24  std::unique_ptr<folly::IOBuf> certRequestContext,
25  std::vector<fizz::Extension> extensions) override {
26  return createAuthRequest(
27  std::shared_ptr<folly::IOBuf>(certRequestContext.release()),
28  extensions);
29  }
31  std::pair<uint16_t, std::unique_ptr<folly::IOBuf>>(
32  const fizz::AsyncFizzBase&,
34  uint16_t,
35  std::shared_ptr<folly::IOBuf>));
36  std::pair<uint16_t, std::unique_ptr<folly::IOBuf>> getAuthenticator(
37  const fizz::AsyncFizzBase& transport,
39  uint16_t requestId,
40  std::unique_ptr<folly::IOBuf> authRequest) override {
41  return getAuthenticator(
42  transport,
43  dir,
44  requestId,
45  std::shared_ptr<folly::IOBuf>(authRequest.release()));
46  }
48  bool(const fizz::AsyncFizzBase&,
50  uint16_t,
51  std::shared_ptr<folly::IOBuf>));
53  const fizz::AsyncFizzBase& transport,
55  uint16_t certId,
56  std::unique_ptr<folly::IOBuf> authenticator) override {
57  return validateAuthenticator(
58  transport,
59  dir,
60  certId,
61  std::shared_ptr<folly::IOBuf>(authenticator.release()));
62  }
63 };
64 } // namespace proxygen
bool validateAuthenticator(const fizz::AsyncFizzBase &transport, TransportDirection dir, uint16_t certId, std::unique_ptr< folly::IOBuf > authenticator) override
std::pair< uint16_t, std::unique_ptr< folly::IOBuf > > createAuthRequest(std::unique_ptr< folly::IOBuf > certRequestContext, std::vector< fizz::Extension > extensions) override
MOCK_METHOD2(createAuthRequest, std::pair< uint16_t, std::unique_ptr< folly::IOBuf >>(std::shared_ptr< folly::IOBuf >, std::vector< fizz::Extension > &))
std::pair< uint16_t, std::unique_ptr< folly::IOBuf > > getAuthenticator(const fizz::AsyncFizzBase &transport, TransportDirection dir, uint16_t requestId, std::unique_ptr< folly::IOBuf > authRequest) override
MOCK_METHOD4(getAuthenticator, std::pair< uint16_t, std::unique_ptr< folly::IOBuf >>(const fizz::AsyncFizzBase &, TransportDirection, uint16_t, std::shared_ptr< folly::IOBuf >))