import base64
import json


def decode_token(token):
    """
    Decodes an "opaque" token string to a dictionary.
    """
    json_string = base64.b64decode(token.encode('utf-8')).decode('utf-8')
    return json.loads(json_string)