<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
         version="4.0">

    <!-- 1 -->

    <servlet>
        <servlet-name>OBConsentServlet</servlet-name>
        <servlet-class>com.wso2.openbanking.accelerator.authentication.webapp.OBConsentServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>OBConsentServlet</servlet-name>
        <url-pattern>/oauth2_authz.do</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>OBConsentServlet</servlet-name>
        <url-pattern>/oauth2_consent.do</url-pattern>
    </servlet-mapping>

    <context-param>
        <param-name>retrievalBaseURL</param-name>
        <param-value>https://localhost:9446/api/openbanking/consent/authorize/retrieve</param-value>
    </context-param>

    <context-param>
        <param-name>displayScopes</param-name>
        <param-value>true</param-value>
    </context-param>

    <!-- 2 -->

    <servlet>
        <servlet-name>OBConsentConfirmServlet</servlet-name>
        <servlet-class>com.wso2.openbanking.accelerator.authentication.webapp.OBConsentConfirmServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>OBConsentConfirmServlet</servlet-name>
        <url-pattern>/oauth2_authz_confirm.do</url-pattern>
    </servlet-mapping>

    <context-param>
        <param-name>persistenceBaseURL</param-name>
        <param-value>https://localhost:9446/api/openbanking/consent/authorize/persist</param-value>
    </context-param>

    <!-- 3 -->

    <servlet>
        <servlet-name>cookie_policy.do</servlet-name>
        <jsp-file>/cookie_policy.jsp</jsp-file>
    </servlet>

    <servlet-mapping>
        <servlet-name>cookie_policy.do</servlet-name>
        <url-pattern>/cookie_policy.do</url-pattern>
    </servlet-mapping>

    <!--  4 -->

    <servlet>
        <servlet-name>privacy_policy.do</servlet-name>
        <jsp-file>/privacy_policy.jsp</jsp-file>
    </servlet>

    <servlet-mapping>
        <servlet-name>privacy_policy.do</servlet-name>
        <url-pattern>/privacy_policy.do</url-pattern>
    </servlet-mapping>

    <!-- 5 -->

    <error-page>
        <exception-type>java.lang.Throwable</exception-type>
        <location>/generic-exception-response.jsp</location>
    </error-page>

    <!--  6 -->

    <servlet-mapping>
        <servlet-name>oauth2_authz_consent.do</servlet-name>
        <url-pattern>/oauth2_authz_consent.do</url-pattern>
    </servlet-mapping>

    <servlet>
        <servlet-name>retry.do</servlet-name>
        <jsp-file>/generic-exception-response.jsp</jsp-file>
    </servlet>

    <servlet>
        <servlet-name>oauth2_authz_consent.do</servlet-name>
        <jsp-file>/oauth2_authz_displayconsent.jsp</jsp-file>
    </servlet>

    <servlet-mapping>
        <servlet-name>retry.do</servlet-name>
        <url-pattern>/retry.do</url-pattern>
    </servlet-mapping>

</web-app>