Skip to content

Add hook for adding authentication filters#19320

Open
therepanic wants to merge 1 commit into
spring-projects:mainfrom
therepanic:gh-19319
Open

Add hook for adding authentication filters#19320
therepanic wants to merge 1 commit into
spring-projects:mainfrom
therepanic:gh-19319

Conversation

@therepanic

Copy link
Copy Markdown
Contributor

This change will allow us to directly add authentication filters without resorting to various hacks by directly overriding the protected addAuthenticationFilter method.

Closes: gh-19319

This change will allow us to directly add authentication filters without
resorting to various hacks by directly overriding the protected
`addAuthenticationFilter` method.

Closes: spring-projectsgh-19319

Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
Comment on lines +306 to 313

/**
* Adds the authentication filter
* @param http the {@link HttpSecurityBuilder}
* @param filter the authentication filter
*/
protected void addAuthenticationFilter(B http, F filter) {
http.addFilter(filter);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this name makes perfect sense, we could consider another option if anyone has better ideas.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to use AbstractAuthenticationFilterConfigurer for custom filters

2 participants