Sometimes I want an area for those who have paid for a premium service, they
would have a role paid. Other areas are for if a user has been authenticated.
When unpaid users wander into the premium area it would be nice if they would
be redirected to another page enticing them to upgrade their membership.
I envision something like:
<bean id="shiroFilter"
class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
<property name="securityManager" ref="securityManager"/>
<property name="loginUrl" value="/signin/signIn.jspa?first=true"/>
<property name="successUrl" value="/home.jsp"/>
<property name="unauthorizedUrl" value="/unauthorized.jsap"/>
<property name="filterChainDefinitions">
<value>
/signin/** = myFilter
/admin/** = myFilter, roles[admin]
/premium/** = myFilter, roles[paid],
unauthorizedUrl[/upgrade.jspa]
</value>
</property>
</bean>
Thoughts?
Regards,
Alan