1#ifndef TENDUKE_TEST_MOCKS_OIDCSESSIONMOCK_H
2#define TENDUKE_TEST_MOCKS_OIDCSESSIONMOCK_H
4#include "oidc/session/OIDCSession.h"
6#include "gmock/gmock.h"
8namespace tenduke {
namespace test {
namespace mocks {
15 MOCK_METHOD((std::shared_ptr<const tenduke::oidc::OIDCState>),
getOIDCState, (), (
override));
16 MOCK_METHOD(
bool,
heartbeat, (), (
override));
18 MOCK_METHOD(
bool,
isValid, (), (
override));
19 MOCK_METHOD(
void,
refresh, (), (
override));
22 static std::shared_ptr<OIDCSessionMock> createShared()
24 return std::make_shared<OIDCSessionMock>();
Stateful service to manage OIDC-session.
Definition OIDCSession.h:23
virtual void ensureValidSession()=0
Checks that the OIDC session is valid, but if it is NOT, either refreshes the access token or authent...
virtual bool heartbeat()=0
Executes a heartbeat with the backend, checking that the current access token really works.
virtual std::shared_ptr< const tenduke::oidc::OIDCState > getOIDCState()=0
Returns the current OIDC-state for inspection.
virtual void reEstablish()=0
Re-establishes the session: Tries first to refresh the state, if it fails, re-authenticates the user.
virtual void invalidate()=0
Invalidates the session.
virtual bool isValid()=0
Checks that local session is valid.
virtual std::string getAccessToken()=0
Returns access token of the session.
virtual void refresh()=0
Forces refresh of the session.
Definition OIDCSessionMock.h:11
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7