How to make a secure user authentication (post call) in Yii2 RESTful Web Services?

Yii2 RESTful Web Services takes POST as CREATE in ActiveController.

How can I send by POST the username/password through my API, and take this as a user authentication method, instead of a "create" action ?

Thank you !

That would be custom method where you’ll exchange credentials for a token.