proxygen
proxygen::MockSecondaryAuthManager Class Reference

#include <MockSecondaryAuthManager.h>

Inheritance diagram for proxygen::MockSecondaryAuthManager:
proxygen::SecondaryAuthManager proxygen::SecondaryAuthManagerBase

Public Member Functions

 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 > > createAuthRequest (std::unique_ptr< folly::IOBuf > certRequestContext, std::vector< fizz::Extension > extensions) override
 
 MOCK_METHOD4 (getAuthenticator, std::pair< uint16_t, std::unique_ptr< folly::IOBuf >>(const fizz::AsyncFizzBase &, TransportDirection, uint16_t, std::shared_ptr< folly::IOBuf >))
 
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 (validateAuthenticator, bool(const fizz::AsyncFizzBase &, TransportDirection, uint16_t, std::shared_ptr< folly::IOBuf >))
 
bool validateAuthenticator (const fizz::AsyncFizzBase &transport, TransportDirection dir, uint16_t certId, std::unique_ptr< folly::IOBuf > authenticator) override
 
- Public Member Functions inherited from proxygen::SecondaryAuthManager
 SecondaryAuthManager (std::unique_ptr< fizz::SelfCert > cert)
 
 SecondaryAuthManager ()=default
 
 ~SecondaryAuthManager () override
 
folly::Optional< uint16_tgetCertId (uint16_t requestId)
 
folly::Optional< std::vector< fizz::CertificateEntry > > getPeerCert (uint16_t certId)
 
- Public Member Functions inherited from proxygen::SecondaryAuthManagerBase
virtual ~SecondaryAuthManagerBase ()=default
 

Detailed Description

Definition at line 17 of file MockSecondaryAuthManager.h.

Member Function Documentation

std::pair<uint16_t, std::unique_ptr<folly::IOBuf> > proxygen::MockSecondaryAuthManager::createAuthRequest ( std::unique_ptr< folly::IOBuf certRequestContext,
std::vector< fizz::Extension extensions 
)
inlineoverridevirtual

Generate an authenticator request given a certificate_request_context and a set of extensions.

Returns
(request ID, encoded authenticator request)

Reimplemented from proxygen::SecondaryAuthManager.

Definition at line 23 of file MockSecondaryAuthManager.h.

References getAuthenticator(), MOCK_METHOD4(), and uint16_t.

25  {
26  return createAuthRequest(
27  std::shared_ptr<folly::IOBuf>(certRequestContext.release()),
28  extensions);
29  }
std::pair< uint16_t, std::unique_ptr< folly::IOBuf > > createAuthRequest(std::unique_ptr< folly::IOBuf > certRequestContext, std::vector< fizz::Extension > extensions) override
std::pair<uint16_t, std::unique_ptr<folly::IOBuf> > proxygen::MockSecondaryAuthManager::getAuthenticator ( const fizz::AsyncFizzBase transport,
TransportDirection  dir,
uint16_t  requestId,
std::unique_ptr< folly::IOBuf authRequest 
)
inlineoverridevirtual

Generate an authenticator request given the Request-ID and authenticator request..

Returns
(cert ID, encoded authenticator)

Reimplemented from proxygen::SecondaryAuthManager.

Definition at line 36 of file MockSecondaryAuthManager.h.

References MOCK_METHOD4(), uint16_t, and validateAuthenticator().

Referenced by createAuthRequest().

40  {
41  return getAuthenticator(
42  transport,
43  dir,
44  requestId,
45  std::shared_ptr<folly::IOBuf>(authRequest.release()));
46  }
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
proxygen::MockSecondaryAuthManager::MOCK_METHOD2 ( createAuthRequest  ,
std::pair< uint16_t, std::unique_ptr< folly::IOBuf >>  std::shared_ptr< folly::IOBuf >, std::vector< fizz::Extension > & 
)
proxygen::MockSecondaryAuthManager::MOCK_METHOD4 ( getAuthenticator  ,
std::pair< uint16_t, std::unique_ptr< folly::IOBuf >>  const fizz::AsyncFizzBase &, TransportDirection, uint16_t, std::shared_ptr< folly::IOBuf > 
)
proxygen::MockSecondaryAuthManager::MOCK_METHOD4 ( validateAuthenticator  ,
bool(const fizz::AsyncFizzBase &, TransportDirection, uint16_t, std::shared_ptr< folly::IOBuf >)   
)
bool proxygen::MockSecondaryAuthManager::validateAuthenticator ( const fizz::AsyncFizzBase transport,
TransportDirection  dir,
uint16_t  certId,
std::unique_ptr< folly::IOBuf authenticator 
)
inlineoverridevirtual

Validate an authenticator and cache the received certificate along with the Cert-ID if it is valid.

Reimplemented from proxygen::SecondaryAuthManager.

Definition at line 52 of file MockSecondaryAuthManager.h.

Referenced by getAuthenticator().

56  {
57  return validateAuthenticator(
58  transport,
59  dir,
60  certId,
61  std::shared_ptr<folly::IOBuf>(authenticator.release()));
62  }
bool validateAuthenticator(const fizz::AsyncFizzBase &transport, TransportDirection dir, uint16_t certId, std::unique_ptr< folly::IOBuf > authenticator) override

The documentation for this class was generated from the following file: