Ditto 4.8.0-rc.2
|
Provides access to authentication information and methods for logging on to Ditto Cloud. Relevant when using an OnlineWithAuthentication
or an Online
identity.
More...
Public Member Functions | |
async Task< DittoError > | LoginWithToken (string token, string provider) |
Log in to Ditto with a third-party token. | |
Task<(string clientInfoJson, DittoError error)> | Login (string token, string provider) |
Log in to Ditto with a third-party token. | |
async Task< DittoError > | LoginWithCredentials (string username, string password, string provider) |
Log in to Ditto with a username and password. | |
IDisposable | ObserveStatus (Action< DittoAuthenticationStatus > callback) |
Registers a callback that is called whenever the authentication status changes. | |
void | Logout (Action< Ditto > cleanupAction=null) |
Log out of Ditto. | |
Properties | |
DittoAuthenticationStatus | Status [get] |
Gets the current authentication status. | |
Provides access to authentication information and methods for logging on to Ditto Cloud. Relevant when using an OnlineWithAuthentication
or an Online
identity.
|
inline |
Log in to Ditto with a third-party token.
If authentication has failed then the returned DittoError
will be non-null. The returned clientInfoJson
string will not be null if the auth webhook endpoint returned any JSON value under the clientInfo
key. That JSON value is what will be passed via the clientInfoJson
string, if it's provided.
token | The authentication token required to log in. |
provider | The name of the authentication provider. |
clientInfoJson
and the DittoError
. The error will be null if the authentication succeeded.
|
inline |
Log in to Ditto with a username and password.
username | The username component of the credentials used for log in. |
password | The password component of the credentials used for log in. |
provider | The name of the authentication provider. |
DittoError
if the login attempt failed, otherwise null
.
|
inline |
Log in to Ditto with a third-party token.
token | The authentication token required to log in. |
provider | The name of the authentication provider. |
DittoError
if the login attempt failed, otherwise null
.
|
inline |
Log out of Ditto.
This will stop sync, shut down all replication sessions, and remove any cached authentication credentials. Note that this does not remove any data from the store. If you wish to delete data from the store then use the optional cleanupAction
argument to perform any required cleanup.
cleanupAction | An optional action that will be called with the relevant Ditto instance as the sole argument that allows you to perform any required cleanup of the store as part of the logout process. |
|
inline |
Registers a callback that is called whenever the authentication status changes.
callback | An action reference to the caller's callback. |
IDisposable
that you can use to stop this observation.