10Duke Scale C++ Client
Loading...
Searching...
No Matches
OIDCDeviceFlowMock.h
1#ifndef TENDUKE_TEST_MOCKS_OIDCDEVICEFLOWMOCK_H
2#define TENDUKE_TEST_MOCKS_OIDCDEVICEFLOWMOCK_H
3
4#include "oidc/device/OIDCDeviceFlow.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::oidc::OIDCRefreshRequest>), refresh, (const std::shared_ptr<tenduke::oidc::OIDCState> &), (const, override));
14
15 MOCK_METHOD((std::unique_ptr<tenduke::oidc::device::OIDCDeviceAuthenticationRequest>), authenticate, (const std::string &scopes, (const std::map<std::string, std::string> &a)), (const, override));
16 MOCK_METHOD((std::unique_ptr<tenduke::oidc::device::OIDCDeviceAuthenticationRequest>), authenticate, (const std::string &scopes), (const, override));
17 MOCK_METHOD(std::string, requestUserinfo, (const std::string &accessToken), (const, override));
18
19 static std::shared_ptr<OIDCDeviceFlowMock> createShared()
20 {
21 return std::make_shared<OIDCDeviceFlowMock>();
22 }
23};
24
25}}}
26
27#endif //TENDUKE_TEST_MOCKS_OIDCDEVICEFLOWMOCK_H
virtual std::string requestUserinfo(const std::string &accessToken) const =0
Requests user information from "userinfo"-endpoint.
virtual std::unique_ptr< const tenduke::oidc::OIDCRefreshRequest > refresh(const std::shared_ptr< tenduke::oidc::OIDCState > &state) const =0
Refreshes the OIDC state.
OpenID Connect -client for OAuth Device Authorization Grant.
Definition OIDCDeviceFlow.h:20
virtual std::unique_ptr< tenduke::oidc::device::OIDCDeviceAuthenticationRequest > authenticate(const std::string &scopes) const =0
Creates OIDCRequest which performs the OIDC-authentication.
Definition OIDCDeviceFlowMock.h:11
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7