SDK
SDK Dart v2.x
2

CheckToken #

Checks an authentication token's validity.

Arguments #

Copied to clipboard!
Future<Map<String, dynamic>> checkToken(String token)
Argument Type Description
token
String
Authentication token

Return #

A Map which has the following properties:

Property Type Description
valid
bool
Token validity
state
String
Explain why the token is invalid
expires_at
int
Token expiration timestamp

Usage #

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