Dear Sahil,
Thanks for asking this question.
If you are planning to rely on OOTB Apache Sling, Brilliant Framework! Then you need to listen on the org.apache.sling.auth.core.AuthConstants.TOPIC_LOGIN_FAILED event and implement a failed login throttling solution, as per your needs, e.g. count number of failures in an hour and if more then x lock the account.
API's as per Sling Exist, it just needs your tailoring to make it fit for your requirements.
Regards,
Peter