import json
import base64
import time


def _is_useridtoken_valid(user_id_token):
    """Check if user id token is not expired"""
    token_data = json.loads(base64.standard_b64decode(user_id_token['tokendata']))
    return token_data['expiration'] > time.time()