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

Support custom filter in Server Kotlin DSL #8850

Merged
merged 1 commit into from Jul 22, 2020

Conversation

evgeniycheban
Copy link
Contributor

Closes gh-8783

Copy link
Contributor

@eleftherias eleftherias left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @evgeniycheban!
I have left some feedback inline.

@@ -89,6 +90,33 @@ class ServerHttpSecurityDsl(private val http: ServerHttpSecurity, private val in
this.http.securityMatcher(securityMatcher)
}

/**
* Adds a [WebFilter] at a specific position.
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice to have an example of how to use this method, similar to what we have in HttpSecurityDsl.

The same applies for addFilterBefore and addFilterAfter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -123,4 +129,74 @@ class ServerHttpSecurityDslTests {
}
}
}

@Test
fun `add filter at is applied`() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make the test names more descriptive.

For example, this test could be renamed to:

add filter at applies custom at specified filter position

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@eleftherias eleftherias added in: config An issue in spring-security-config type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 21, 2020
@eleftherias
Copy link
Contributor

Thanks for the PR @evgeniycheban! This is now merged into master.

@eleftherias eleftherias added this to the 5.4.0-RC1 milestone Jul 22, 2020
@eleftherias eleftherias added the status: duplicate A duplicate of another issue label Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: config An issue in spring-security-config status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support custom filter in Server Kotlin DSL
3 participants