I am trying to assign a different unauthorized url for different roles in the url section of the siro.ini file for a web application, but it seems like I cannot do this. Below is the code I tried.
siro.ini file
[main] authc1 = org.apache.shiro.web.filter.authc.FormAuthenticationFilter authc2 = org.apache.shiro.web.filter.authc.FormAuthenticationFilter authc1.loginUrl = /login.xhtml authc2.loginUrl = /secLoginPage.xhtml [urls] /login.xhtml = authc1 /secLoginPage.xhtml = authc2 /testapp/** = authc1, roles[admin,unauthorizedUrl=/adminAuthPage.xhtml] /userfld/**=authc2,roles[user,unauthorizedUrl=/abortPage.xhtml] /** = authc1 /** = authc2
After entering the application, it is redirected to the authorized page with the error Error 401: SRVE0295E: Error reported: 401 .
This error occurred after adding unauthorizedUrl=/adminAuthPage.xhtml . If there is any error in the code, please suggest.
source share