<!--
    GatewayPortlet configuration.

    One GatewayPortlet configuration file should exist per GatewayPortlet
    instance desired. Each GatewayPortlet instance can hold any number of SSO
    entries.

    There exists no internal mechanism for providing authorization rules on a
    specific sso-entry; instead, it is recommended that a separate
    GatewayPortlet instance be used when only a certain group of people should
    have access to an entry point. ChannelManager can then be used to restrict
    access to the channel publication.
-->
<gateway peephole="gateway_main">

    <!--
        The title to display when showing a list of available SSO entries. If
        only a single iframe entry is specified, the sso-entry's label will be
        displayed in its place.
    -->
    <title>Webadvisor</title>

    <ajax-callback-url>/portal/ssoCallback</ajax-callback-url>
    
    <sso-entry handle="Cct" class="largeLink">        
               
        <label>Webadvisor</label>
        <description>Webadvisor</description>  
                
        <target handle="log">
            <!-- I believe the absolute URL will work.  If not, you can do the full URL with http(s)://subdomain.someschool.edu/AcademusApps/... -->
            <!-- Also, you will need to make sure that bridgeB.html is located at the URL indicated otherwise you will need to change it -->
            <url>/AcademusApps/rendering/html/sso/bridgeA.html?SSODynamicFormId=WEBADVISOR&amp;url=https%3A//webadvisor.someschool.edu/bridgeB.html</url>
            <method>POST</method>
            <parameter name="SSODynamicFormUrl"><value>https://webadvisor.someschool.edu/WebAdvisor/WebAdvisor</value></parameter>
            <parameter name="SSODynamicFormButtonName"><value>SUBMIT</value></parameter>
            <parameter name="SSODynamicFormFollowLinkText"><value>Log In</value></parameter>
            <!-- 
            Username and password may have to be mapped differently, depending on your configuration
            This also assumes that the username/password for the portal is the same as for WebAdvisor
            -->
            <parameter name="user_name"><value>{user.login.id}</value></parameter>
            <parameter name="user_password"><value>{password}</value></parameter>
        </target>
        
        <sequence type="login">
            <target handle="log" />
        </sequence>

        <window type="iframe">
            <title>Webadvisor</title>
            <name>Webadvisor</name>
            <style>width: 100%; height: 500px; border: 0px;</style>
        </window>
        <!-- If you prefer, you can launch it as an iframe, just uncomment the <window/> element below, and comment out the <window/> above  -->
        <!--
        <window type="popup">
            <title>Webadvisor</title>
            <name>Webadvisor</name>
            <properties>location=yes,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes</properties>
        </window>
        -->

    </sso-entry>

    <!-- Nothing below this line should require modification in normal usage. -->

    <!-- JNDI Reference to the database. -->
    <jndi-ref>java:comp/env/jdbc/PortalDb</jndi-ref>
</gateway>
