Customer session
Refresh customer token
This method refreshes the customer’s current token.
This method requires customer authentication.
Declared In:
lib/modules/client/client_impl.dart
Class:
ClientImpl
Declaration:
Future<bool> refreshToken() async
Return Value:
true if the operation is success, otherwise it throws an error.
Example:
await Synerise.client.refreshToken().catchError((error)
Retrieve customer token
This method retrieves the customer’s current, active token.
This method requires customer authentication.
Declared In:
lib/modules/client/client_impl.dart
Class:
ClientImpl
Declaration:
Future<Token> retrieveToken() async
Return Value:
Token
Example:
Token token = await Synerise.client.retrieveToken().catchError((error)
Get current customer UUID
This method retrieves the customer’s current UUID.
Declared In:
lib/modules/client/client_impl.dart
Class:
ClientImpl
Declaration:
Future<String> getUUID() async
Return Value:
String
Example:
String uuid = await Synerise.client.getUUID().catchError((error)
Regenerate customer
This method regenerates the UUID and clears the authentication token, login session, custom email, and custom identifier.
This operation works only if the customer is anonymous.
Declared In:
lib/modules/client/client_impl.dart
Class:
ClientImpl
Declaration:
Future<void> regenerateUUID() async
Return Value:
No value is returned.
Example:
await Synerise.client.regenerateUUID().catchError((error)
Regenerate customer with identifier
This method regenerates the UUID and clears the authentication token, login session, custom email, and custom identifier.
The optional clientIdentifier
parameter is a seed for UUID generation.
Declared In:
lib/modules/client/client_impl.dart
Class:
ClientImpl
Declaration:
Future<void> regenerateUUIDWithClientIdentifier(String clientIdentifier) async {
Parameters:
Parameter | Type | Mandatory | Description |
---|---|---|---|
clientIdentifier | String | no | Seed for UUID generation |
Return Value:
No value is returned.
Example:
await Synerise.client.regenerateUUIDWithClientIdentifier(clientIdentifier).catchError((error) {
Destroy current session
This method destroys the whole session completely.
Declared In:
lib/modules/client/client_impl.dart
Class:
ClientImpl
Declaration:
Future<void> destroySession() async
Return Value:
No value is returned.
Example:
await Synerise.client.destroySession().catchError((error)