AuthManager
Inherits:
QObject
Checks and refreshes the configured Spoke.Zone device token.
The configuration and authentication API are caller-owned and must outlive this manager. Call start() to perform an immediate expiry check and maintain the next check automatically. checkRefresh() can also be used to manually check immediately without enabling automatic scheduling.
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
AuthManager explicit | ||
AuthManager | Constructs a manager with an explicitly supplied CPU ID. | |
~AuthManager override | ||
void | start | Starts automatic expiry checks and immediately checks the current token. |
void | stop | Stops scheduled checks and cancels an in-flight authentication request. |
explicit
AuthManager
Section titled “AuthManager”AuthManager
Section titled “AuthManager”Constructs a manager with an explicitly supplied CPU ID.
This overload supports platforms that provide the hardware identifier themselves and allows host-side integrations to exercise the authentication flow.
override
~AuthManager
Section titled “~AuthManager”Starts automatic expiry checks and immediately checks the current token.
Stops scheduled checks and cancels an in-flight authentication request.
Signals
Section titled “Signals”| Return | Name | Description |
|---|---|---|
void | tokenUpdated | Emitted after a refreshed token has been persisted to configuration. |
void | refreshFailed | Emitted when a refresh check fails. |
void | refreshCheckScheduled | Emitted whenever the next automatic check or retry is scheduled. |
tokenUpdated
Section titled “tokenUpdated”Emitted after a refreshed token has been persisted to configuration.
refreshFailed
Section titled “refreshFailed”Emitted when a refresh check fails.
The diagnostic never includes token values.
refreshCheckScheduled
Section titled “refreshCheckScheduled”Emitted whenever the next automatic check or retry is scheduled.
Public Slots
Section titled “Public Slots”| Return | Name | Description |
|---|---|---|
void | checkRefresh | Checks the current token immediately, refreshing it only when it reaches the refresh window. |
checkRefresh
Section titled “checkRefresh”Checks the current token immediately, refreshing it only when it reaches the refresh window.