Matt, my session-timeout is set to 10 minutes, but I noticed that after doing
this changes (using email to login instead of username) after 2 minutes of
inactivity the session ends... ¿?

Tomas 


mraible wrote:
> 
> The reason you're likely getting logged out is because of the
> session-timeout in web.xml. I'd suggest boosting it from 10 minutes to
> 30 or 60 minutes.  If one is not specified, the default is 30 minutes.
> 
> Matt
> 
> On 6/18/07, Tomas Barrios <[EMAIL PROTECTED]> wrote:
>>
>> Matt,
>> (First of all Im using Appfuse 1.8.3)
>> I can't go through the easiest way because I am using a generated id as
>> username in order to keep privacy of users. So I have to keep the email
>> attribute in it's own column. To login in the user I changed the
>> ApplicationContextSecurity.xml to ask in the first query by the email...
>> like this
>>
>>     <!-- Read users from database -->
>>     <bean id="jdbcAuthenticationDao"
>> class="net.sf.acegisecurity.providers.dao.jdbc.JdbcDaoImpl">
>>         <property name="dataSource" ref="dataSource"/>
>>         <property name="usersByUsernameQuery">
>>             <value>SELECT username,password,enabled FROM mobile_user
>> WHERE
>> email = ?</value>
>>         </property>
>>         <property name="authoritiesByUsernameQuery">
>>             <value>SELECT username,role_name FROM user_role WHERE
>> username =
>> ?</value>
>>         </property>
>>     </bean>
>>
>> With that modification I can login without problems but after a little
>> time
>> of inactivity (less than what is set) the app logs me out and ask to 
>> login.
>> I read that that happens because acegi tries to login with the username
>> of
>> the session instead an the sql uses the email then no user is found by
>> that
>> email and can't keep the session.
>>
>> What solution is possible?
>>
>>
>>
>>
>> Matt Raible-3 wrote:
>> >
>> > The easiest thing to do is to change "Username" in
>> > ApplicationResources.properties to "E-Mail". ;-)
>> >
>> > If you want to get rid of username all together, you'll need to do the
>> > following, and delete the username references in User.java as well as
>> > sample-data.xml.  You might be best off just deleting e-mail and
>> > changing validation so username has to be an e-mail address.
>> >
>> > In UserDaoHibernate, you'll need to change the loadByUsername() method
>> > to handle whatever change you make appropriately.
>> >
>> > Matt
>> >
>> > On 6/5/06, roc bhakta <[EMAIL PROTECTED]> wrote:
>> >>
>> >> How can I use email address and password for authenication ?
>> >> What are the steps involved and the appfuse files I need to change.
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/How-to-change-login-to-use-email-addr-instead-of-username-t1737218s2369.html#a4720656
>> >> Sent from the AppFuse - User forum at Nabble.com.
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-change-login-to-use-email-addr-instead-of-username-tf1737218s2369.html#a11181583
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> http://raibledesigns.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-change-login-to-use-email-addr-instead-of-username-tf1737218s2369.html#a11186764
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to