# {{ ansible_managed }}
jicofo {

  authentication {
{% if jitsi_auth == 'sso' %}
    enabled = true
    type = SHIBBOLETH
{% elif jitsi_auth == 'ldap' %}
    enabled = true
    type = XMPP
{% elif jitsi_auth == 'token' %}
    enabled = true
    type = JWT
    login-url = {{ jitsi_domain }}
{% endif %}
  }

  bridge {
    brewery-jid = "JvbBrewery@internal.{{ jitsi_auth_domain }}"
  }

  jibri {
    brewery-jid = "JibriBrewery@internal.{{ jitsi_auth_domain }}"
  }

{% if jitsi_jigasi %}
  jigasi {
    brewery-jid = "JigasiBrewery@internal.{{ jitsi_auth_domain }}"
  }
{% endif %}

  xmpp {
    client {
      domain = {{ jitsi_auth_domain }}
      xmpp-domain = {{ jitsi_domain }}
      username = {{ jitsi_jicofo_xmpp_user }}
      password = "{{ jitsi_jicofo_xmpp_pass }}"
      client-proxy = focus.{{ jitsi_domain }}
    }
    trusted-domains = ["{{ jitsi_jibri_xmpp_domain | default('recorder.' ~ jitsi_jibri_domain) }}"]
  }
}
