REST api with Basic_Auth plugin
Posted: 05 Apr 2023, 21:36
We're using the Basic_Auth plugin, so users are automatically logged in via the Apache authentication.
Mantis 2.25.6
PHP 7.4
Apache 2.4
To use the REST API, however , would require passing both the HTTP auth and the Mantis token
for example
issue_id=1234
curl --header "Authorization: $token" \
--user $user:$pwd \
http://server/mantis/api/rest/issues/$issue_id
but Apache doesn't like mixing --user with the Authorization header.
I tried removing the authentication requirement for the path /mantis/api/rest
but I still get 401 errors.
Is there some Mantis or Apache setup to make this work?
Mantis 2.25.6
PHP 7.4
Apache 2.4
To use the REST API, however , would require passing both the HTTP auth and the Mantis token
for example
issue_id=1234
curl --header "Authorization: $token" \
--user $user:$pwd \
http://server/mantis/api/rest/issues/$issue_id
but Apache doesn't like mixing --user with the Authorization header.
I tried removing the authentication requirement for the path /mantis/api/rest
but I still get 401 errors.
Is there some Mantis or Apache setup to make this work?