Question

I need to know how to make a trial version(e.g 30 days trial) of a client-server application which is implemented using Spring RMI(server side) and Java Swing(client side). I'm thinking of doing this in client side by checking current date against first login date. But it might be hackable easily. What are the best options available to do this in a reliable manner?

Thanks.

Was it helpful?

Solution

If you have client-side configuration, add couple of new keys with the date when the client is first launched. People usually won't look into the application configuration for expiration dates.

And, choose the key that doesn't say that it is related to licensing and encrypt your value if possible.

If one key is tampered, you can use the other key to check whether it is tampered or not and block the access.

OTHER TIPS

A better and safer solution would be to implement it on the server side.

You can make the client request for a token the first time it runs, and keep track of the token on the server. This has a drawback though,i.e. If someone deletes or reinstalls, you will never know.

You can also send a request for token with some identifying characteristics, i.e. MAC address. So that you will know if the client is making duplicate requests.

Even better, instead of tokens, keep track of the MAC addresses.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top