<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://jetty.org/configure_10_0.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
  <New id="openid-httpclient" class="org.eclipse.jetty.client.HttpClient">
    <Arg>
      <New class="org.eclipse.jetty.client.transport.HttpClientTransportOverHTTP">
        <Arg>
          <New class="org.eclipse.jetty.io.ClientConnector">
            <Set name="sslContextFactory">
              <New class="org.eclipse.jetty.util.ssl.SslContextFactory$Client">
                <Set name="trustAll" type="boolean">
                  <Property name="jetty.openid.sslContextFactory.trustAll" default="false"/>
                </Set>
              </New>
            </Set>
          </New>
        </Arg>
      </New>
    </Arg>
    <Set name="executor"><Ref refid="threadPool"/></Set>
  </New>
  <Call name="addBean">
    <Arg>
      <Ref refid="BaseLoginService"/>
    </Arg>
  </Call>
  <Call name="addBean">
    <Arg>
      <New id="OpenIdConfiguration" class="org.eclipse.jetty.security.openid.OpenIdConfiguration">
        <Arg name="issuer"><Property name="jetty.openid.provider" deprecated="jetty.openid.openIdProvider"/></Arg>
        <Arg name="authorizationEndpoint"><Property name="jetty.openid.provider.authorizationEndpoint"/></Arg>
        <Arg name="tokenEndpoint"><Property name="jetty.openid.provider.tokenEndpoint"/></Arg>
        <Arg name="clientId"><Property name="jetty.openid.clientId"/></Arg>
        <Arg name="clientSecret"><Property name="jetty.openid.clientSecret"/></Arg>
        <Arg name="authenticationMethod"><Property name="jetty.openid.authenticationMethod" deprecated="jetty.openid.authMethod" default="client_secret_post"/></Arg>
        <Arg name="httpClient"><Ref refid="openid-httpclient"/></Arg>
        <Set name="authenticateNewUsers">
          <Property name="jetty.openid.authenticateNewUsers" default="false"/>
        </Set>
        <Set name="logoutWhenIdTokenIsExpired">
          <Property name="jetty.openid.logoutWhenIdTokenIsExpired" default="false"/>
        </Set>
        <Call name="addScopes">
          <Arg>
            <Call class="org.eclipse.jetty.util.StringUtil" name="csvSplit">
              <Arg><Property name="jetty.openid.scopes"/></Arg>
            </Call>
          </Arg>
        </Call>
      </New>
    </Arg>
  </Call>
</Configure>
