SEC-768: Changed exception to error reported through parser context. Added entry-point-ref to cas config

This commit is contained in:
Luke Taylor 2008-04-13 00:02:46 +00:00
parent a2f4ee1c58
commit 83c152e379
2 changed files with 8 additions and 5 deletions

View File

@ -414,7 +414,10 @@ public class HttpSecurityBeanDefinitionParser implements BeanDefinitionParser {
return;
}
throw new IllegalStateException("Couldn't set entry point");
parserContext.getReaderContext().error("No AuthenticationEntryPoint could be established. Please" +
"make sure you have a login mechanism configured through the namespace (such as form-login) or" +
"specify a custom AuthenticationEntryPoint with the custom-entry-point-ref ",
parserContext.extractSource(element));
}
static UrlMatcher createUrlMatcher(Element element) {

View File

@ -5,7 +5,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">
<sec:http>
<sec:http entry-point-ref="casProcessingFilterEntryPoint">
<sec:intercept-url pattern="/secure/extreme/**" access="ROLE_SUPERVISOR" requires-channel="https"/>
<sec:intercept-url pattern="/secure/**" access="ROLE_USER" />
<sec:logout />