validateCredentials #
Checks if the provided credentials are well-formed. Does not actually save credentials.
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:
{
'username': 'foo',
'password': 'bar'
}
Return #
A |
booltelling whether credentials are valid.
Usage #
final result = await kuzzle.security.validateCredentials(
'local',
'john.doe',
{
'username': 'jdoe',
'password': 'password'
}
);
/*
true
*/
Edit this page on Github(opens new window)