<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
    <!-- This context parameter tells the AutographRedirection switch where to find the user profiles.
        The redirection switch needs them in order to determine if the user visits the ServiceProvider the first time.
    -->
    <context-param>
        <param-name>userProfileStorePath</param-name>
        <param-value>/usr/local/shibboleth-autograph/userProfiles</param-value>
    </context-param>
    <context-param>
        <param-name>IdPConfigFile</param-name>
        <param-value>file:/usr/local/shibboleth-idp//etc/idp.xml</param-value>
    </context-param>

    <servlet>
        <servlet-name>IdP</servlet-name>
        <display-name>Shibboleth Identity Provider</display-name>
        <servlet-class>edu.internet2.middleware.shibboleth.idp.IdPResponder</servlet-class>
    </servlet>
    <!-- This servlet decides when to include Autograph in the SSO profile -->
    <servlet>
        <servlet-name>AutographRedirectionSwitch</servlet-name>
        <display-name>Autograph Redirection Switch</display-name>
        <servlet-class>au.edu.mq.melcoe.mams.autograph.AutographRedirectionSwitch</servlet-class>
    </servlet>

    <!-- this mapping is added in order to include Autograph in the SSO profile -->
    <servlet-mapping>
        <servlet-name>AutographRedirectionSwitch</servlet-name>
        <url-pattern>/SSO</url-pattern>
    </servlet-mapping>

    <!-- this mapping is changed in order to include Autograph in the SSO profile:
 The url-pattern '/SSO' is replaced by '/IdP'.
	 -->
    <servlet-mapping>
        <servlet-name>IdP</servlet-name>
        <url-pattern>/IdP</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>IdP</servlet-name>
        <url-pattern>/AA</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>IdP</servlet-name>
        <url-pattern>/Artifact</url-pattern>
    </servlet-mapping>

    <mime-mapping>
        <extension>css</extension>
        <mime-type>text/css</mime-type>
    </mime-mapping>

    <security-constraint>

                        <display-name>Example Security Constraint</display-name>

                        <web-resource-collection>

                                    <web-resource-name>Protected Area</web-resource-name>

 

                                    <!-- Define the context-relative URL(s) to be protected -->

                                    <url-pattern>/IdP</url-pattern>

                                    <url-pattern>/SSO</url-pattern>

 

                                    <!-- If you list http methods, only those methods are protected -->

                                    <http-method>DELETE</http-method>

                                    <http-method>GET</http-method>

                                    <http-method>POST</http-method>

                                    <http-method>PUT</http-method>

                        </web-resource-collection>

                        <auth-constraint>

                                    <!-- Anyone with one of the listed roles may access this area -->

                                    <role-name>*</role-name>

                        </auth-constraint>

</security-constraint>

 

<!-- Default login configuration uses form-based authentication -->

<login-config>

                        <auth-method>FORM</auth-method>

                        <realm-name>Example Form-Based Authentication Area</realm-name>

                        <form-login-config>

                                    <form-login-page>/login.jsp</form-login-page>

                                    <form-error-page>/login-error.jsp</form-error-page>

                        </form-login-config>

</login-config>

 
    
</web-app>
