We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

HTTP Basic Authentication

How can I get the username and password from the Authorization: Basic header that was sent with the request?

I'm using the \Phalcon\Mvc\Micro() framework.

Try this

$userName = $this->request->getServer('PHP_AUTH_USER');
$password = $this->request->getServer('PHP_AUTH_PW');