authenticate method
Future<void>
authenticate(
- ClientAuthContext clientAuthContext,
- IdentityProvider identityProvider,
- String tokenString, {
- required void onSuccess(),
- required void onError(
- SyneriseError error
This function authenticates a client using an identity provider, clientAuthContext and a token string.
Args:
clientAuthContext (ClientAuthContext): An object that contains information about the client's
authentication context.
identityProvider (IdentityProvider): The identityProvider parameter is an object that
represents the identity provider used for authentication.
tokenString (String): The tokenString parameter is a string that represents an authentication
token.
Implementation
Future<void> authenticate(ClientAuthContext clientAuthContext,
IdentityProvider identityProvider, String tokenString,
{required void Function(bool) onSuccess,
required void Function(SyneriseError error) onError}) async {
SyneriseResult<bool> result = await _methods.authenticate(
clientAuthContext, identityProvider, tokenString);
result.onSuccess((result) {
onSuccess(result);
}).onError((error) {
onError(error);
});
}