@groovy.util.logging.Slf4j @groovy.transform.CompileStatic class AnnotationFilterInvocationDefinition extends AbstractFilterInvocationDefinition implements ServletContextAware
A FilterInvocationSecurityMetadataSource that uses rules defined with
Controller annotations combined with static rules defined in
SecurityConfig.groovy, e.g. for js, images, css or for rules
that cannot be expressed in a controller like '/**'.
| Modifiers | Name | Description |
|---|---|---|
protected static java.lang.String |
SLASH |
|
protected UrlMappingsHolder |
urlMappingsHolder |
| Fields inherited from class | Fields |
|---|---|
class AbstractFilterInvocationDefinition |
ALLOW404, DENY, ERROR404, authenticatedVoter, compiled, initialized, messages, roleVoter, urlMatcher, urlPathHelper |
| Type | Name and description |
|---|---|
GrailsApplication |
applicationDependency injection for the application. |
UrlConverter |
grailsUrlConverterDependency injection for the grailsUrlConverter bean. |
HttpServletResponseExtension |
httpServletResponseExtensionDependency injection for the httpServletResponseExtension bean. |
ServletContext |
servletContext |
| Properties inherited from class | Properties |
|---|---|
class AbstractFilterInvocationDefinition |
rejectIfNoRule |
| Constructor and description |
|---|
AnnotationFilterInvocationDefinition() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected void |
compileActionClosures(java.util.Map<java.lang.String, java.util.List<InterceptedUrl>> map) |
|
protected void |
compileActionRoles(java.util.Map<java.lang.String, java.util.List<InterceptedUrl>> map) |
|
protected void |
compileClassClosures(java.util.List<InterceptedUrl> classClosures) |
|
protected void |
compileClassRoles(java.util.List<InterceptedUrl> classRoles) |
|
protected void |
compileStaticRules(java.lang.Object staticRules) |
|
protected void |
configureMapping(UrlMappingInfo mapping, GrailsWebRequest grailsRequest, java.util.Map<java.lang.String, java.lang.Object> savedParams) |
|
protected java.util.Map<java.lang.String, java.lang.Object> |
copyParams(GrailsWebRequest grailsRequest) |
|
protected java.lang.String |
createControllerUri(java.lang.String controllerName, java.lang.String actionName) |
|
protected java.lang.String |
determineUrl(FilterInvocation filterInvocation) |
|
protected void |
doStoreMapping(java.lang.String fullPattern, HttpMethod method, java.util.Collection<ConfigAttribute> configAttributes) |
|
protected java.util.List<InterceptedUrl> |
findActionClosures(java.lang.Class<?> clazz) |
|
protected java.util.List<InterceptedUrl> |
findActionRoles(java.lang.Class<?> clazz) |
|
protected java.util.Collection<java.lang.reflect.Method> |
findActions(java.lang.Class<?> clazz) |
|
protected java.lang.Class<?> |
findClosureClass(Secured annotation) |
|
protected void |
findControllerAnnotations(GrailsControllerClass controllerClass, java.util.Map<java.lang.String, java.util.List<InterceptedUrl>> actionRoles, java.util.List<InterceptedUrl> classRoles, java.util.Map<java.lang.String, java.util.List<InterceptedUrl>> actionClosures, java.util.List<InterceptedUrl> classClosures) |
|
protected void |
findDomainAnnotations(GrailsDomainClass domainClass, java.util.Map<java.lang.String, java.util.List<InterceptedUrl>> actionRoles, java.util.List<InterceptedUrl> classRoles, java.util.Map<java.lang.String, java.util.List<InterceptedUrl>> actionClosures, java.util.List<InterceptedUrl> classClosures) |
|
protected java.lang.String |
findGrailsUrl(UrlMappingInfo mapping) |
|
protected java.lang.annotation.Annotation |
findSecuredAnnotation(java.lang.reflect.AccessibleObject annotatedTarget) |
|
protected java.util.List<java.lang.String> |
generatePatterns(java.lang.String controllerNameOrPattern, java.lang.String actionName, boolean isPattern) |
|
protected HttpMethod |
getHttpMethod(java.lang.annotation.Annotation annotation) |
|
protected java.util.Collection<java.lang.String> |
getValue(java.lang.annotation.Annotation annotation) |
|
void |
initialize(java.lang.Object staticRules, UrlMappingsHolder mappingsHolder, GrailsClass[] controllerClasses, GrailsClass[] domainClasses)Called by the plugin to set controller role info. |
|
protected groovy.lang.Closure<?> |
newInstance(java.lang.Class<?> closureClass) |
|
protected java.lang.String |
resolveFullControllerName(GrailsControllerClass controllerClass) |
|
protected java.lang.String |
resolveFullControllerName(java.lang.String controllerNameInUrlFormat, java.lang.String namespaceInUrlFormat) |
|
protected void |
storeMapping(java.lang.String controllerNameOrPattern, java.lang.String actionName, java.util.Collection<ConfigAttribute> configAttributes, boolean isPattern, HttpMethod method) |
|
protected void |
storeMapping(java.lang.String controllerName, java.lang.String actionName, java.lang.Class<?> closureClass, HttpMethod method) |
| Methods inherited from class | Name |
|---|---|
class AbstractFilterInvocationDefinition |
calculateUri, compileAndStoreMapping, determineUrl, findConfigAttributes, findMatchingAttributes, getAllConfigAttributes, getAttributes, getConfigAttributeMap, getInterceptedUrl, initialize, lowercaseAndStripQuerystring, reset, resetConfigs, split, stopAtFirstMatch, storeMapping, stripContextPath, supports |
Dependency injection for the application.
Dependency injection for the grailsUrlConverter bean.
Dependency injection for the httpServletResponseExtension bean.
Called by the plugin to set controller role info.
Reinitialize by calling ctx.objectDefinitionSource.initialize(
ctx.authenticateService.securityConfig.security.annotationStaticRules,
ctx.grailsUrlMappingsHolder,
grailsApplication.controllerClasses)
staticRules - data from the controllerAnnotations.staticRules config attributemappingsHolder - mapping holdercontrollerClasses - all controllersdomainClasses - all domain classes