1#ifndef TENDUKE_TEST_MOCKS_OIDCDEVICEFLOWMOCK_H
2#define TENDUKE_TEST_MOCKS_OIDCDEVICEFLOWMOCK_H
4#include "oidc/device/OIDCDeviceFlow.h"
6#include "gmock/gmock.h"
8namespace tenduke {
namespace test {
namespace mocks {
13 MOCK_METHOD((std::unique_ptr<const tenduke::oidc::OIDCRefreshRequest>),
refresh, (
const std::shared_ptr<tenduke::oidc::OIDCState> &), (
const,
override));
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));
19 static std::shared_ptr<OIDCDeviceFlowMock> createShared()
21 return std::make_shared<OIDCDeviceFlowMock>();
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 APIRequest.h:4