Authenticator class final
An object that provides access to authentication information and provides methods for logging into Ditto Cloud.
An instance of Authenticator can be obtained from Ditto.auth:
final ditto = await Ditto.open(/* ... */);
final auth = ditto.auth;
It is also provided as a parameter to the callbacks in AuthenticationHandler.
This class is not user-constructible.
- Annotations
-
- @external
Properties
- ditto → Ditto
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → AuthenticationStatus
-
The current authentication status
no setter
Methods
-
login(
{required String token, required String provider}) → Future< AuthResponse> - Logs into Ditto using a third-party authentication token
-
loginWithCredentials(
{required String username, required String password, required String provider}) → Future< void> - Logs into Ditto with a username and password
-
logout(
) → Future< void> - Logs out of Ditto
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited