I am working on an existing application, where this below condition is present inside the code, which handles user login.
if ((PresentTime - LoginTime) <= browservalidationinsecs)
{
// Means this is positive and proceed further processing .
}
Here the PresentTime is the time that is the present time inside the Server.
The LoginTime is the time at which the user has launched the application through the browser.
The browservalidationinsecs is hardcoded to 45 Seconds inside the application.
I am unable to understand why this condition is kept .
Could anybody please have any idea ??
This condition might be given for
Time out errorwhich is of 45 seconds.Suppose a user launches an application and does not login for the next 45 seconds,
then after that when he will enter his credentials instead of successful login ,
it will redirect him to the login page again.
This type of code you will find mostly in banking and finance applications where security is the utmost priority.