How to get credentials from the HTTP basic access authentication?

Use the \Magento\Framework\HTTP\Authentication::getCredentials() method.

Examples

1.

2.

3.