Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 1 KB

File metadata and controls

46 lines (32 loc) · 1 KB
code type title description
true
page
validateCredentials
Checks if the provided credentials are well-formed. Does not actually save credentials.

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 |

bool
telling whether credentials are valid.

Usage

<<< ./snippets/validate-credentials.dart