checkToken method
- String sessionToken
inherited
Endpoint used: GET /auth/check
Returns an AuthenticationCheck
class instance with data on whether the sessionToken
is authenticated and the
user's permissions.
Implementation
Future<AuthenticationCheck> checkToken(String sessionToken) async {
var response = await checkTokenResponse(sessionToken);
try {
return AuthenticationCheck.fromJson(jsonDecode(response.body));
} on Exception {
throw MangadexServerException(jsonDecode(response.body));
}
}