Ditto 4.5.2
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
TestAuthenticationCallback Class Reference
Inheritance diagram for TestAuthenticationCallback:
ditto::AuthenticationCallback

Public Member Functions

virtual void authentication_required (std::shared_ptr< Authenticator > authenticator) override
 There is no Ditto authentication token or it has expired. Sync will not work until there is a successful login using one of the login methods on Authenticator.
 
virtual void authentication_expiring_soon (std::shared_ptr< Authenticator > authenticator, std::int64_t seconds_remaining) override
 Warns that the Ditto authentication token is getting old.
 
virtual void authentication_status_did_change (std::shared_ptr< Authenticator > authenticator) override
 Notifies the callback object that the authentication status did change. Use the authenticators property status to query for the current authentication status.
 

Public Attributes

int authenticationRequiredTimesCalled
 
int authenticationExpiringSoonTimesCalled
 
int authenticationStatusDidChangeTimesCalled
 

Member Function Documentation

◆ authentication_expiring_soon()

virtual void TestAuthenticationCallback::authentication_expiring_soon ( std::shared_ptr< Authenticator > authenticator,
std::int64_t seconds_remaining )
inlineoverridevirtual

Warns that the Ditto authentication token is getting old.

Ditto will attempt to refresh tokens periodically, starting from halfway through the token's validity period. This reduces the risk of authentication expiring while the user is offline.

The refresh will happen automatically if Ditto has a suitable refresh token. If new credentials are required, such as a third-party token or a username/password, then Ditto does not cache that information and you must submit it again using one of the login methods on Authenticator.

Implements ditto::AuthenticationCallback.

◆ authentication_required()

virtual void TestAuthenticationCallback::authentication_required ( std::shared_ptr< Authenticator > authenticator)
inlineoverridevirtual

There is no Ditto authentication token or it has expired. Sync will not work until there is a successful login using one of the login methods on Authenticator.

Implements ditto::AuthenticationCallback.

◆ authentication_status_did_change()

virtual void TestAuthenticationCallback::authentication_status_did_change ( std::shared_ptr< Authenticator > authenticator)
inlineoverridevirtual

Notifies the callback object that the authentication status did change. Use the authenticators property status to query for the current authentication status.

Implements ditto::AuthenticationCallback.