Authentication from external Api

Hi,
I have my Rest Api that use an external DB.
If I want to use this API I need an authenticated user. He use a REST call that generate a Token usable for alla the session.
How can I do it?

Thank you

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/4/feed