Mission Impossible / How to create datatypes which cannot contain invalid state
Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
In this program, the class AuthenticationProcedure implements the logic for the following passwordless login procedure:
- The user goes to the login form
- The user enters his email address
- The user gets an email with a randomly generated token
- The user enters the received token on the login form
- The user is logged in
Refactor the example with your newly aqcuired knowledge.
Authentication Procedure
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content