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.


Copied to clipboard!
Future<Map<String, dynamic>> getCredentialsById(
      String strategy, String id)

Property Type Description
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 #

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