Maven allows configuring specific HTTP headers that are added to outgoing requests.
This is sometimes needed for token-based authentication. An example are the Maven repositories provided by Gitlab.
This is not currently supported. A proposed solution is included as a patch, which is based on the code found here:
Note that the example in the Gitlab docs contradicts the Maven docs and the implementation I linked to, it uses a <property> xml tag where the Maven docs use <httpHeader>. I have stuck with the version from the Maven docs.