public protocol DittoAuthenticationDelegate : AnyObject
Provides feedback to the developer about Ditto authentication status.
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
This method is required (no default implementation).
func authenticationExpiringSoon(authenticator: DittoAuthenticator, secondsRemaining: Int64)
Notifies the authentication delegate that the authentication status did change. Use the authenticator property
statusto query for the current authentication status.
This method is optional, the default implementation does nothing.
func authenticationStatusDidChange(authenticator: DittoAuthenticator)