Score:0

Combination of HTTP authentication and Shibboleth authentication on the same Apache 2.4 website

uz flag

I'd like to have 2 types of authentication on my web app (PHP 7.4 on Apache 2.4):

  • for the URLs /api/ and its children /api/xxxx (not actual directory, just url) I'd like to have HTTP authentication
  • for any other URL, I'd like to have shibboleth auth

in my main .htaccess in the root folder, I have the following:

AuthType shibboleth
Require shibboleth

for HTTP authentication, I would use something like this

AuthType Basic
  AuthName "Authentication Required"
  AuthUserFile "/path/to/htpasswd/.htpasswd"
  Require valid-user

  Order allow,deny
  Allow from all

But I cannot find how to combine it, so shibboleth would work for any URL except /api/ (and children like /api/xxx etc.) and HTTP authentication just for /api/ and children /api/xxx, etc.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.