Java Reference
In-Depth Information
<!—Other beans -->
<bean name="daoAuthenticationProvider" class="org.springframework. å
security.providers.dao.DaoAuthenticationProvider">
<property name="userDetailsService" ref="authenticationDao "/>
</bean>
<bean id="authenticationDao"
class="org.springframework.security.userdetails.jdbc.JdbcDaoImpl">
<property name="dataSource" ref="dataSource"/>
<property name="userByUserNameQuery" >
<value>
SELECT email as username, password, enabled
FROM t_users
WHERE email=?
</value>
</property>
<property name="authoritiesByUserNameQuery" >
<value>
SELECT email as username, role as authority
FROM t_user_role
WHERE email=?
</value>
</property>
</bean>
</beans>
Thus, with Spring Security, a few lines of configuration are enough to set up your
authentication component. Once the user is successfully authenticated, the request is
forwarded to the URL specified by the defaultTargetURL , which in this case is /secure/app/
createPolicy.do .
Anonymous Processing Filter (ANPF)
This is the third filter in the chain. Its sole purpose is to set an anonymous Authentication
object in the security context. This will allow you to browse certain URLs that are not
 
Search WWH ::




Custom Search