10Duke Scale C++ Client
Loading...
Searching...
No Matches
OAuthDeviceFlowMock.h
1#ifndef TENDUKE_TEST_MOCKS_OAUTHDEVICEFLOWMOCK_H
2#define TENDUKE_TEST_MOCKS_OAUTHDEVICEFLOWMOCK_H
3
4#include "oauth/device/OAuthDeviceFlow.h"
5
6#include "gmock/gmock.h"
7
8namespace tenduke { namespace test { namespace mocks {
9
11{
12public:
13 MOCK_METHOD((std::unique_ptr<const tenduke::oauth::OAuthRefreshRequest>), refresh, (std::shared_ptr<tenduke::oauth::OAuthState>), (const, override));
14
15 MOCK_METHOD((std::unique_ptr<tenduke::oauth::device::OAuthDeviceFlowAuthorizationRequest>), authorize, (const std::string &scopes, (const std::map<std::string, std::string> &a)), (const, override));
16
17 static std::shared_ptr<OAuthDeviceFlowMock> createShared()
18 {
19 return std::make_shared<OAuthDeviceFlowMock>();
20 }
21};
22
23}}}
24
25#endif //TENDUKE_TEST_MOCKS_OAUTHDEVICEFLOWMOCK_H
virtual std::unique_ptr< const tenduke::oauth::OAuthRefreshRequest > refresh(std::shared_ptr< tenduke::oauth::OAuthState > state) const =0
Creates OAuthRefreshRequest for refreshing the state.
OAuth DeviceFlow.
Definition OAuthDeviceFlow.h:20
virtual std::unique_ptr< tenduke::oauth::device::OAuthDeviceFlowAuthorizationRequest > authorize(const std::string &scope, const std::map< std::string, std::string > &additionalParameters) const =0
Starts authorization.
Definition OAuthDeviceFlowMock.h:11
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7