You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "madhawa-gunasekara (via GitHub)" <gi...@apache.org> on 2023/11/12 12:31:43 UTC
Re: [I] Allow multiple authentication methods per route [apisix]
madhawa-gunasekara commented on issue #10196:
URL: https://github.com/apache/apisix/issues/10196#issuecomment-1807113251
Hi @shreemaan-abhishek ,
I have looked into the code, I found two ways to implement this feature.
- Plugin Addition:
Consider integrating an additional plugin, acting as a wrapper, to facilitate multi-authentication seamlessly. This would enhance the existing authentication framework and provide a streamlined solution.
- Modifying the Core Plugin
The second approach involves modifying the [apisix.plugin](https://github.com/apache/apisix/blob/master/apisix/plugin.lua#L1108) to support multiple authentications at the route level. Given our current execution flow, where plugins are prioritized and filtered, this adjustment requires a special case. We will iterate through all plugins associated with a route, identify those related to authentication, and execute them sequentially. This way, we can discern if any authentication method aligns with the incoming request.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org