Follow this tutorial to create an Azure Application and request access to Mojang authentication.
Example Integration
API for using the Processes
Interface Class for structure
Class with Authentication process for Minecraft launchers and account switchers
29: Change Client ID to the one given on Azure
35: Same here
32: Leave it as is or change the port
36: Same here
38: Adjust timeout for auth-wait
460: Adjust finishing message on auth
535: Same here