def verify_secret_key(request):
    if request.user.username:
        # always allow authenticated users
        return True
    else:
        key = request.GET['secret']
        user_id, secret = key.split('.', 1)
        try:
            profile = User.objects.get(pk=user_id)
        except:
            return False
        if key == get_secret_key(request, profile):
            request.user = profile.user
            return True
    return False
Verifies secret key for a request
dataset/ETHPy150Open treeio/treeio/treeio/core/rss.py/verify_secret_key