SDK
SDK Dart Null Safety v3.x
2

validateCredentials #

Checks if the provided credentials are well-formed. Does not actually save credentials.


Copied to clipboard!
Future<bool> validateCredentials(
      String strategy, String id, Map<String, dynamic> credentials)

Property Type Description
strategy
String
Strategy identifier
id
String
User kuid
credentials
Map<String, dynamic>
New credentials

credentials #

The credentials to check. The expected properties depend on the target authentication strategy.

Example for the local strategy:

Copied to clipboard!
{
  'username': 'foo',
  'password': 'bar'
}

Return #

A |

bool
telling whether credentials are valid.

Usage #

Copied to clipboard!
final result = await kuzzle.security.validateCredentials(
  'local',
  'john.doe',
  {
    'username': 'jdoe',
    'password': 'password'
  }
);
/*
true
*/