Revision history [back]

click to hide/show revision 1
initial version

asked 2020-02-08 01:44:08 +0800

gvguad gravatar image gvguad

Spring security login after server reload

In my project we use spring security for user authentication. It was made as said in ZKDeveloper'sReference/Integration/Security/Spring_Security + added small to provide ability press enter in for login even form is not in focus.

document.addEventListener("keydown", submitFormOnKeydown, false);
function submitFormOnKeydown(e) {
    var keyCode = e.keyCode;
    if(keyCode==13) {
        document.getElementById("loginForm").submit();
    }
}


The main problem is if I open login page and then restart. After that switch back in a browser by alt+tab, wait till the server starts and then press ENTER this will send a request to the authentification server but the authorization will fail because login page will be reloaded. Does ZK provide some id for clients? Is this possible that this happens because ZK does recognize user and reinit all inner js state?

Spring security login after server reload

In my project we use spring security for user authentication. It was made as said in ZKDeveloper'sReference/Integration/Security/Spring_Security + added small to provide ability press enter in for login even form is not in focus.

document.addEventListener("keydown", submitFormOnKeydown, false);
function submitFormOnKeydown(e) {
    var keyCode = e.keyCode;
    if(keyCode==13) {
        document.getElementById("loginForm").submit();
    }
}


The main problem is if I open login page and then restart. After that switch back in a browser by alt+tab, wait till the server starts and then press ENTER this will send a request to the authentification server but the authorization will fail because login page will be reloaded. Does ZK provide some id for clients? Is this possible that this happens because ZK does recognize user and reinit all inner js state? state? P.S. Also this happens if open page and left it inactive for 20-30 min.

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More