Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation incorrect - SpringSecurityUtils.clientRegisterFilter does not accept FilterRegistrationBean #1027

Closed
codeconsole opened this issue Oct 8, 2024 · 0 comments

Comments

@codeconsole
Copy link
Contributor

codeconsole commented Oct 8, 2024

According to the documentation, clientRegisterFilter is supposed to be called with beans of type FilterRegistrationBean, not Filter.

clientRegisterFilter currently only supports beans of type filter and not FilterRegistrationBean

static void clientRegisterFilter(String beanName, int order) {
Filter oldFilter = configuredOrderedFilters.get(order)
assert !oldFilter,
"Cannot register filter '$beanName' at position $order; '$oldFilter' is already registered in that position"
Filter filter = getBean(beanName)
configuredOrderedFilters[order] = filter
List<GrailsSecurityFilterChain> filterChains = getBean('securityFilterChains', List)
mergeFilterChains configuredOrderedFilters, filter, beanName, order, filterChains
log.trace 'Client registered bean "{}" as a filter at order {}', beanName, order
log.trace 'Updated filter chain: {}', filterChains
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant