A machine-learning algorithm receives code indicative of a software unit and parses the code to extract an authenticating parameter. The machine-learning algorithm constructs an authentication template based on the authenticating parameter and providing the authentication template to a user. The algorithm receives user input from the user responsive to the authentication template and creates an authentication microservice based on the authentication template (and optionally the input). The algorithm links the authentication microservice to the software unit to deploy the authentication microservice within the software unit. The machine-learning algorithm is then modified based on the input.