def verify_token(request):
    """

    Verify client token is valid

    :param request:
    :return:
    """
    key = request.POST.get('token', '')

    try:
        token = AccessToken.objects.get(token=key)

        if AccessToken.is_valid(token):
            logging.info('Valid access')
            return JsonResponse(
                {'isValid': 'true'}
            )

    except AccessToken.DoesNotExist, e:
        return JsonResponse(
            {'isValid': 'false'}
        )