Added by Sebastian Gonzalez Oyuela, last edited by Sebastian Gonzalez Oyuela on Mar 19, 2009  (view change)

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

Introduction

This guide will teach you how to configure JOSSO to enable Automatic Login (aka Remember Me). Users that has been successfully authenticated in a previous session can be automatically authenticated by enabling the Remember Me option. The user can choose to be remembered or not during login process using a checkbox in the login form.

Prerequisites

Before starting, you need a configured JOSSO Gateway and at least a partner application.
In this example, we're enabling Remember Me support for a java partner application deployed on Tomcat 6.

Enable Automatic Login

Edit the josso-gateway-web.xml and set the rememberMe property to true.

josso-gateway-web.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
    <web-configuration id="josso-web-configuraiton"
                       rememberMeEnabled="true"
                       sessionTokenOnClient="false"
                       sessionTokenSecure="false"
                       sendP3PHeader="false"/>
</s:beans>

Configure your Web application

The next thing to do is to configure the partner applications that will attempt an automatic user login. If this process fails, user will remain anauthenticated until a protected resource is requested and the normal authentication procedure is triggered.

Edit the josso-agent-config.xml file and set the rememberMeEnabled to true for the partner applications that will use this feature:

josso-agent-config.xml
<?xml version="1.0" encoding="UTF-8" ?>
<s:beans xmlns:s="http://www.springframework.org/schema/beans"
         xmlns:tc60="urn:org:josso:agent:tomcat60"
         xmlns:agent="urn:org:josso:agent:core"
         xmlns:protocol="urn:org:josso:protocol:client"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
         urn:org:josso:agent:tomcat60 http://www.josso.org/schema/josso-tomcat60-agent.xsd
         urn:org:josso:agent:core http://www.josso.org/schema/josso-agent.xsd
         urn:org:josso:protocol:client http://www.josso.org/schema/josso-protocol-client.xsd">

    <tc60:agent name="josso-tomcat60-agent" sessionAccessMinInterval="1000" >
        ...
        <configuration>
            <agent:agent-configuration>
                <agent:partner-apps>
                    <agent:partner-app id="MySimplePartnerApp" context="/simple-partnerapp" rememberMeEnabled="true"/>
                </agent:partner-apps>
            </agent:agent-configuration>
        </configuration>
        ...
    </tc60:agent>

</s:beans>