I'd like to be able to have a path on an apache server (2.4.18+ on ub16) that primarily authenticates using SAML (using the mod_auth_mellon plugin) for interactive use, but also supports having the caller pre-emptively send Basic auth credentials. (Think REST api endpoint that normally triggers an interactive form login, but will allow bypass if you pre-send basic auth credentials.)
Essentially I'm looking for this behavior:
- If creds are sent with request:
- Try them, and if they work, allow the request
- If above creds fail, or none were provided
- Trigger the preferred authentication plugin.
Is such a thing possible? I'd prefer to NOT push this back into the application itself.
What I do NOT want to happen is for the apache server to send back the response triggering the basic auth dialog.