SDK
SDK Dart v1.x
2

# ValidateMyCredentials

Validates the current user's credentials for the specified strategy. This method returns true if the provided credentials are valid; otherwise an error is triggered. This route does not actually create or modify the user credentials. The credentials to send will depend on the authentication plugin and authentication strategy.

# Arguments

Copied to clipboard!
Future<bool> validateMyCredentials(
      String strategy, Map<String, dynamic> credentials)
Argument Type Description
strategy
String
Strategy to use
credentials
Map<String, dynamic>
A Map representing the credentials

# Return

A boolean indicating if the credentials are valid.

# Usage

Copied to clipboard!
await kuzzle
  .auth
  .login(
    'local',
    {
      'username': 'foo',
      'password': 'bar'
    },
);
final result = await kuzzle
  .auth
  .validateMyCredentials(
    'local',
    {
      'username': 'foo',
      'password': 'bar'
    }
);