I have restricted my web application for time validity like 1 year on the basis of date. I maintain one table with purchase-date, expireydate, NumberofUsers
and all this records in my table on the basis of this records, I validate web application for specific time period:
Timestampvalidity timestamp=timestampDao.findByUsername(username);
Date expdate=timestamp.getExpireyDtae();
System.out.println(expdate);
if(loginDate.before(expdate))
{
return true;
}else
return false;
}
Using this function, I restrict for perticular user for valid timeperiod. Now I want to secure my web application for limited number of user accesss.
So how can I restrict my web application to provide this security?