<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
  ~
  ~ WSO2 Inc. licenses this file to you under the Apache License,
  ~ Version 2.0 (the "License"); you may not use this file except
  ~ in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied. See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://java.sun.com/xml/ns/javaee"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         version="2.5">
    <display-name>Windows-Agent-Webapp</display-name>

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/cxf-servlet.xml</param-value>
    </context-param>

    <listener>
        <listener-class>org.wso2.carbon.device.mgt.mobile.windows.api.common.util.ContextInitializer
        </listener-class>
    </listener>

    <servlet>
        <description>JAX-WS/JAX-RS-windows Endpoint</description>
        <display-name>JAX-WS/JAX-RS-windows Servlet</display-name>
        <servlet-name>JAXServlet-windows</servlet-name>
        <servlet-class>
            org.apache.cxf.transport.servlet.CXFServlet
        </servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>JAXServlet-windows</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>60</session-timeout>
    </session-config>
    <context-param>
        <param-name>managed-api-enabled</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>doAuthentication</param-name>
        <param-value>true</param-value>
    </context-param>
	<context-param>
		<param-name>isSharedWithAllTenants</param-name>
		<param-value>true</param-value>
	</context-param>
    <context-param>
        <param-name>nonSecuredEndPoints</param-name>
        <param-value>/api/device-mgt/windows/v1.0/discovery/get,/api/device-mgt/windows/v1.0/discovery/post,
            /api/device-mgt/windows/v1.0/certificatepolicy/xcep,/api/device-mgt/windows/v1.0/deviceenrolment/wstep,
            /api/device-mgt/windows/v1.0/syncml/devicemanagement/request,
            /api/device-mgt/windows/v1.0/deviceenrolment/enrollment,
            /api/device-mgt/windows/v1.0/management/devicemgt/pending-operations
        </param-value>
    </context-param>
</web-app>