def authtoken_method(token):
    """ an authentication method using rest_framework Token
    """
    from rest_framework.authtoken.models import Token
    user = Token.objects.filter(key=token).first()
    if user is not None:
        user = user.user
    return user
