-
1. Re: Implement evaluation version licensing for a gatein application - disables login when the grace period is expired
hoang_to May 28, 2012 5:00 AM (in response to rocky07)rakesh ramesan wrote:
hi ..
i have this application which gives an evaluation time period for its users, for the same i have obtained and store the installation date locally.. now my application needs to restrict login for its users once the grace period is timed out.. what is the best way to implement this..
Could you clearify the bold text?
-
2. Re: Implement evaluation version licensing for a gatein application - disables login when the grace period is expired
rocky07 May 28, 2012 6:31 AM (in response to hoang_to)thanks Minh ..
all what i am trying to implement is to add an evaluation license to my application,
the evaluation version is availbale for use for 30 days and once this grace period is expired the user should not be able to login to the application unless he purchase the application (enters a new license key) , what i am trying to do is, restrict any more logins if the evaulation period is expired
-
3. Re: Implement evaluation version licensing for a gatein application - disables login when the grace period is expired
hoang_to May 29, 2012 10:17 PM (in response to rocky07)1 of 1 people found this helpfulIf i were you, i would implement in following way:
1. For user using trial version, create and store somewhere a token that expires in 30 days (removed from its storage). Denote this storage as S1.
2. For user that has purchased for license, create a token with id = license key and store it in S2.
3. Create a JAAS login module that searchs for token in S2 first, then S1. The login module returns silently if non-null token could be found from either S2 or S1.
-
4. Re: Implement evaluation version licensing for a gatein application - disables login when the grace period is expired
rocky07 Jun 27, 2012 1:48 AM (in response to hoang_to)thanks for the reply.. i implemented the same by extending the login module ... how can i pass my custom message validation message to the default login.jsp.. for the purpose i am throwing an LoginException with my custom messgae if my validation failed .. but which variable holds this message ..how can i display it back to the user.. <%=res.getString("UILoginForm.label.SigninFail")%> is holding the same message for every login failure
-
5. Re: Implement evaluation version licensing for a gatein application - disables login when the grace period is expired
hoang_to Jun 28, 2012 10:37 PM (in response to rocky07)You could config form-error-page in web.xml and display error message in associated servlet/jsp
{code:xml}
<login-config>
<auth-method>FORM</auth-method>
<realm-name>gatein-domain</realm-name>
<form-login-config>
<form-login-page>/initiatelogin</form-login-page>
<form-error-page>/errorlogin</form-error-page>
</form-login-config>
</login-config>
{code}
-
6. Re: Implement evaluation version licensing for a gatein application - disables login when the grace period is expired
rocky07 Jun 29, 2012 1:05 AM (in response to hoang_to)thankks minh
but the real problem i am faceing is to differenciate between the the type of exception .. in my case i need to display if its an evaluation period failed message or a invalid username/password exception..