CheckToken #
Checks an authentication token's validity.
Arguments #
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 #
final jwt = await kuzzle
.auth
.login(
'local',
{
'username': 'foo',
'password': 'bar'
}
);
final token = await kuzzle
.auth
.checkToken(jwt);
Edit this page on Github(opens new window)