suxxez commented on issue #11514:
URL: https://github.com/apache/apisix/issues/11514#issuecomment-2623695639

   I found a solution for my problem by implementing two basically identical 
routes **/api/my-service/***
   
   The first route has OIDC enabled and this extra vars: 
   
   ``` 
   "vars": [
       [
         "arg_apikey",
         "!",
         "~~",
         "."
       ]
   ]
   ```
   
   The second route has key-auth enabled and this extra vars:
   
   ``` 
   "vars": [
       [
         "arg_apikey",
         "~~",
         "."
       ]
   ]
   ```
   
   This approach uses pattern matching to figure out which route the request 
should take. If there is the request parameter "`apikey=ANYSTRING`" present, 
second route is used. If there is no request parameter apikey present, the 
first route is used.
   
   It's not great and it would be cool to have multi-auth work out of the box, 
but it works.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to