Class DittoAuthenticationStatus
Provides information about the current authentication status.
This class represents the authentication state for a Ditto instance, including whether the instance is currently authenticated and the associated user identifier if available.
Authentication status can be monitored by observing authentication state changes through
DittoAuthenticator.observeStatus().
-
Method Details
-
isAuthenticated
public boolean isAuthenticated()Returns
trueif the Ditto instance is currently authenticated,falseotherwise.When authenticated, the instance can sync data with remote peers and access protected resources. When not authenticated, sync operations may be restricted depending on your authentication configuration.
- Returns:
trueif authenticated,falseotherwise.
-
getUserId
Returns the user identifier if authenticated and one was provided by the authentication service.
The user ID is provided by the authentication service during login and uniquely identifies the authenticated user. This value is
nullwhen not authenticated or when the authentication service does not provide a user identifier.- Returns:
- the user ID string if available, or
nullif not authenticated or no user ID was provided.
-
hashCode
-
equals
-