Ben,
Once I get the ObjectDefinitionSource, how do I query it to get the correct URL's attributes?
Here is what I have so far (my tag extends RequestContextAwareTag):
Code:
String resolvedURL = ExpressionEvaluationUtils.evaluateString("url", this.url, pageContext);
Map beans = this.getRequestContext().getWebApplicationContext().getBeansOfType(FilterSecurityInterceptor.class);
//Get the 1 FSI definition
FilterSecurityInterceptor fsi = (FilterSecurityInterceptor) beans.values().iterator().next();
//How do I do this??
ConfigAttributeDefinition attr = fsi.obtainObjectDefinitionSource().getAttributes(Need FilterInvocation obj????)
if (attr != null) {
Authentication auth = ((SecureContext) ContextHolder.getContext())
.getAuthentication();
try {
fsi.getAccessDecisionManager().decide(auth, resolvedURL, attr);
} catch (AccessDeniedException e) {
return SKIP_BODY;
}
}
return EVAL_BODY_INCLUDE;
--Rexxe