Skip to content

Use idiomatic Kotlin in custom filter documentation #18967

@jzheaux

Description

@jzheaux

The Adding a Custom Filter section of the servlet architecture reference only demonstrates addFilterAfter; it would be nice if it demonstrated addFilterBefore as well.

More specifically, though, the Kotlin snippets would be more helpful if they demonstrated idiomatic Kotlin using reified type parameters (e.g., addFilterBefore<LogoutFilter>(TenantFilter())). That is, for the addFilterAfter documentation, something like:

http {
    addFilterAfter<AnonymousAuthenticationFilter>(TenantFilter())
}

When updating these snippets, please move the snippet into docs/src/test/java and use include:: syntax to include the snippet instead of including them inline.

Related to #17993

Metadata

Metadata

Labels

in: docsAn issue in Documentation or samplestype: enhancementA general enhancement

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions