Authentication in Windows AD

Hi. I am trying to integrate authentication in AD with in the same way like JWT. Can you say if you did it or preferred way will be put this authentication inside Controller? How to start and what will be best practices to use AD authentication from AdonisJS perspective? Many thanks for any suggestions.

AdonisJS ver. 4.1


Initial authentication itself can live in an controller, but it would be good to put auth check into middleware and then use it like you would use built-in auth