I have a servlet application running in tomcat with shiro authentication. My servlet URL looks like this
http://builds/Query/User?which_option=ui_data&which_out=json
The "which_option" in the above URL can take various values. I want to authenticate only those URLs having "which_option=ui_data" in shiro. I tried the following using regex in URL filtering in my shiro.ini.
[urls]
/Query/User*ui_data* = authcBuilds
But that does not work. The Shiro URL configuration page mentions that the URL expression must of URL_Ant_Path_Expression. The ANT path expression seems to apply for matching only file names, and not part of URL string.
Is there any other way to do this (URL regex matching)? or else I have to shift my code to another servlet like
http://builds/Query/UI_Data
and use the following authentication in shiro.ini
[urls]
/Query/UI_Data* = authcBuilds