10Duke Scale C++ Client
Loading...
Searching...
No Matches
OIDCSession.h
1#ifndef TENDUKE_OIDC_OIDCSESSION_H
2#define TENDUKE_OIDC_OIDCSESSION_H
3
4#include "../OIDCState.h"
5
6#include <memory>
7#include <string>
8
9namespace tenduke { namespace oidc {
10
11
23{
24public:
25 virtual ~OIDCSession() = default;
26
48 virtual void ensureValidSession() = 0;
49
56 virtual std::string getAccessToken() = 0;
57
65 virtual std::shared_ptr<const tenduke::oidc::OIDCState> getOIDCState() = 0;
66
82 virtual bool heartbeat() = 0;
83
88 virtual void invalidate() = 0;
89
103 virtual bool isValid() = 0;
104
114 virtual void refresh() = 0;
115
122 virtual void reEstablish() = 0;
123};
124
125
126}}
127
128#endif //TENDUKE_OIDC_OIDCSESSION_H
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.
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7