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;

This class is not user-constructible.

Annotations
  • @external

Properties

ditto Ditto
final
expirationHandler AuthenticationExpirationHandler?
no setter
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
logout() Future<void>
Logs out of Ditto
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setExpirationHandler(AuthenticationExpirationHandler? value) Future<void>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

developmentProvider String
The built-in development authentication provider to be used together with development authentication tokens.
no setter