-
Notifications
You must be signed in to change notification settings - Fork 6k
Idiomatic Kotlin DSL for configuring HTTP security #5558
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
Comments
@eleftherias and @joshlong, what do you think about simplifying this further? override fun configure(http: HttpSecurity) {
http {
authorizeRequests {
+ "/path" to permitAll
+ "/user/{userName}" to "#userName == 'user'"
+ RegexRequestMatcher(".*", null) to authenticated
}
}
} This option implements a |
Thanks for the suggestion @metacubed. |
A native Kotlin DSL for servlet based applications is available as of Spring Security 5.3. |
there are some exciting options for DSL designers in the Kotlin world. It'd be nice to support a Kotlin-DSL that does in a more idiomatic way what Spring Security does.
It would be able to take advantage of nested builder DSLs, like this
The text was updated successfully, but these errors were encountered: