SDK
SDK Dart v2.x
2

CheckToken #

Checks an authentication token's validity.

Arguments #

Future<Map<String, dynamic>> checkToken(String token)
ArgumentTypeDescription
token
String
Authentication token

Return #

A Map which has the following properties:

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

Usage #

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