Results 1 to 4 of 4

Thread: Maximum sessions of 1 for this principal exceeded

  1. #1
    Join Date
    Aug 2012
    Posts
    8

    Default Maximum sessions of 1 for this principal exceeded

    hello ;
    i need your help
    i'm using spring security 3.0.5
    remember-me with session control
    i note that in my controller i use an HttpSession to store data
    ;
    in my spring-security.xml i have

    <remember-me key="keys" token-validity-seconds="60"/>
    <session-management invalid-session-url="/index.htm">
    <concurrency-control max-sessions="1" error-if-maximum-exceeded="true" />
    </session-management>

    in web.xm i have or.spring......web.session.HttpSessionEventPublish er

    but when i close the browser and open it
    i get this error :

    authentication failur: Maximum sessions of 1 for this principal exceeded

    like it try to login again with the previous cookies of remember-me
    any helpe please ?

  2. #2
    Join Date
    Aug 2012
    Posts
    8

    Default

    any one here !!!!!!!!!!!!!!

  3. #3
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,695

    Default

    Use the search...

    The fact that you close your browser doesn't destroy the serverside session you do however remove the connection between the client and server (the cookie storing the sessionid is removed). This leads to the server thinking that you are connecting with a new browser.

    This is a fact and you can login again after the session timeout it has nothing to do with your remember-me cookies or whatever.

    There is however no solution for this (at least not one that is 100% watertight), you could create a javascript hack which prevents the browser from closing (you can show a popup) but that isn't a really reliable solution. (And basically website/-apps that do this are really anoying IMHO).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  4. #4
    Join Date
    Aug 2012
    Posts
    8

    Default

    thank's
    i understand

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •