Skip to content

Add tokenFromMultipartDataEnabled to server CSRF Kotlin DSL #8602

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

Closed
eleftherias opened this issue May 27, 2020 · 0 comments
Closed

Add tokenFromMultipartDataEnabled to server CSRF Kotlin DSL #8602

eleftherias opened this issue May 27, 2020 · 0 comments
Assignees
Labels
in: config An issue in spring-security-config type: enhancement A general enhancement
Milestone

Comments

@eleftherias
Copy link
Contributor

eleftherias commented May 27, 2020

We should allow a user to set tokenFromMultipartDataEnabled in the Kotlin DSL, just as we do in the Java DSL.
The configuration would look like

@EnableWebSecurity
open class CsrfConfig : WebSecurityConfigurerAdapter() {
    override fun configure(http: HttpSecurity) {
        http {
            csrf {
                tokenFromMultipartDataEnabled = true
            }
        }
    }
}
@eleftherias eleftherias added in: config An issue in spring-security-config type: enhancement A general enhancement labels May 27, 2020
@eleftherias eleftherias added this to the 5.4.0-M2 milestone May 27, 2020
@eleftherias eleftherias self-assigned this May 27, 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 type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant