1#ifndef TENDUKE_OIDC_SERIALIZEDOIDCSESSION_H
2#define TENDUKE_OIDC_SERIALIZEDOIDCSESSION_H
4#include "./OIDCSession.h"
10namespace tenduke {
namespace oidc {
31 const std::shared_ptr<tenduke::oidc::OIDCSession> &session,
32 const std::chrono::milliseconds &concurrencyTimeout
39 std::shared_ptr<const tenduke::oidc::OIDCState>
getOIDCState()
override;
47 const std::shared_ptr<tenduke::oidc::OIDCSession> session;
49 const std::chrono::milliseconds concurrencyTimeout;
50 std::recursive_timed_mutex serializeStateAccess;
Stateful service to manage OIDC-session.
Definition OIDCSession.h:23
A tenduke::oidc::OIDCSession, which guards that only one thread at a time can access the instance.
Definition SerializedOIDCSession.h:23
bool isValid() override
Checks that local session is valid.
Definition SerializedOIDCSession.cpp:69
bool heartbeat() override
Executes a heartbeat with the backend, checking that the current access token really works.
Definition SerializedOIDCSession.cpp:53
void refresh() override
Forces refresh of the session.
Definition SerializedOIDCSession.cpp:85
std::shared_ptr< const tenduke::oidc::OIDCState > getOIDCState() override
Returns the current OIDC-state for inspection.
Definition SerializedOIDCSession.cpp:45
std::string getAccessToken() override
Returns access token of the session.
Definition SerializedOIDCSession.cpp:37
void ensureValidSession() override
Checks that the OIDC session is valid, but if it is NOT, either refreshes the access token or authent...
Definition SerializedOIDCSession.cpp:29
void reEstablish() override
Re-establishes the session: Tries first to refresh the state, if it fails, re-authenticates the user.
Definition SerializedOIDCSession.cpp:77
void invalidate() override
Invalidates the session.
Definition SerializedOIDCSession.cpp:61
const std::chrono::seconds DEFAULT_SESSION_CONCURRENCY_TIMEOUT
Default timeout for serialized methods.
Definition SerializedOIDCSession.h:13
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4