'Parses YAML data into a list of APIAuthorization objects.'

@staticmethod
def ParseYAMLAuthorizationsList(yaml_data):

    try:
        raw_list = list(yaml.safe_load_all(yaml_data))
    except (ValueError, yaml.YAMLError) as e:
        raise InvalidAPIAuthorization(('Invalid    YAML:    %s' % e))
    result = []
    for auth_src in raw_list:
        auth = APIAuthorization()
        auth.router = auth_src['router']
        auth.users = auth_src.get('users', [])
        auth.groups = auth_src.get('groups', [])
        auth.router_params = auth_src.get('router_params', {})
        result.append(auth)
    return result
