This class can be used to generate and validate one time passwords that may expire after a period of time (without using a database or saving the password of any kind).
It generates a code based on a secret key that is valid during a period of time.
The class can also be used to validate the generated code in a different server and check if the code expired.
One time passwords are useful to provide authorization to access restricted resources during a single access.
This class enhances the concept of one time passwords by giving a single access to the resources for a limited period of time.