def _process_string_exps(str_list):
    """
    common.credentials._process_string_exps accepts pre-parsed string data
    from the common.expressions library and pulls username, password, secret,
    and type information from the list of lists based on position.
    """
    if len(str_list) == 1:
        ctype = None
    else:
        ctype = str_list[1][0]
    if len(str_list[0]) == 1:
        return {'username': str_list[0][0], 'password': str_list[0][0],
            'secret': str_list[0][0], 'type': ctype}
    elif len(str_list[0]) == 2:
        return {'username': str_list[0][0], 'password': str_list[0][1],
            'secret': str_list[0][1], 'type': ctype}
    elif len(str_list[0]) > 2:
        return {'username': str_list[0][0], 'password': str_list[0][1],
            'secret': str_list[0][2], 'type': ctype}
