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
Conversation
There was a problem hiding this 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. |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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`() { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Thanks for the PR @evgeniycheban! This is now merged into master. |
Closes gh-8783