Is there a way for a plugin to determine if Mantis is being accessed via a REST API call vs. the web UI?
I'm using the Basic_Auth plugin, which fails if the api is called, because the REMOTE_USER is not set.
Search found 4 matches
- 06 Apr 2023, 17:21
- Forum: General Plugin Discussion
- Topic: detect REST call in plugin
- Replies: 0
- Views: 129121
- 06 Apr 2023, 16:33
- Forum: General Discussion
- Topic: REST api with Basic_Auth plugin
- Replies: 1
- Views: 10146
Re: REST api with Basic_Auth plugin
I created this file:
DOCROOT/mantis/api/.htaccess
with contents:
Require all granted
This allows me to navigate to the URL https://server/mantis/api without requiring HTTP authentication. So far so good!
However, when I call the REST API, the call fails because it tries to get the user in the ...
DOCROOT/mantis/api/.htaccess
with contents:
Require all granted
This allows me to navigate to the URL https://server/mantis/api without requiring HTTP authentication. So far so good!
However, when I call the REST API, the call fails because it tries to get the user in the ...
- 05 Apr 2023, 21:36
- Forum: General Discussion
- Topic: REST api with Basic_Auth plugin
- Replies: 1
- Views: 10146
REST api with Basic_Auth plugin
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 ...
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 ...
- 28 Nov 2016, 01:39
- Forum: General Discussion
- Topic: Upgrade 1.1 -> 1.3 + BasicAuth
- Replies: 0
- Views: 3631
Upgrade 1.1 -> 1.3 + BasicAuth
We recently got around to upgrading from our initial 1.1 installation to 1.3.
The only tricky part was the Authentication piece, because we had hacked up the source code to use BasicAuth. So this post is just to share our experience.
Basically we followed the Upgrade instructions, up to the ...
The only tricky part was the Authentication piece, because we had hacked up the source code to use BasicAuth. So this post is just to share our experience.
Basically we followed the Upgrade instructions, up to the ...