SDK
SDK Dart v2.x
2

getCredentialsById #

Gets credential information for the user identified by the strategy's unique user identifier userId.

The returned object will vary depending on the strategy (see getById plugin function), and can be empty.

Note: the user identifier to use depends on the specified strategy. If you wish to get credential information using a kuid identifier, use the getCredentials action instead.


Future<Map<String, dynamic>> getCredentialsById(
      String strategy, String id)

PropertyTypeDescription
strategy
String
Strategy identifier
id
String
Credential identifier (this is not the kuid)

Return #

A Map containing the credential information (depends on the authentication strategy).

Usage #

final result = await kuzzle.security.getCredentialsById('local', 'jdoe');
/*
{ username: 'jdoe', kuid: 'john.doe' }
*/