public CsrfConfigurer csrf() throws Exception { return new CsrfConfigurer(); }
/** * Adds CSRF support. This is activated by default when using * {@link WebSecurityConfigurerAdapter}'s default constructor. You can disable it * using: * * <pre> * @Configuration * @EnableWebSecurity * public class CsrfSecurityConfig extends WebSecurityConfigurerAdapter { * * @Override * protected void configure(HttpSecurity http) throws Exception { * http * .csrf().disable() * ...; * } * } * </pre> * * @return the {@link ServletApiConfigurer} for further customizations * @throws Exception */ public CsrfConfigurer<HttpSecurity> csrf() throws Exception { ApplicationContext context = getContext(); return getOrApply(new CsrfConfigurer<>(context)); }
/** * Adds CSRF support. This is activated by default when using * {@link WebSecurityConfigurerAdapter}'s default constructor. You can disable it * using: * * <pre> * @Configuration * @EnableWebSecurity * public class CsrfSecurityConfig extends WebSecurityConfigurerAdapter { * * @Override * protected void configure(HttpSecurity http) throws Exception { * http * .csrf().disable() * ...; * } * } * </pre> * * @return the {@link ServletApiConfigurer} for further customizations * @throws Exception */ public CsrfConfigurer<HttpSecurity> csrf() throws Exception { ApplicationContext context = getContext(); return getOrApply(new CsrfConfigurer<>(context)); }
public CsrfConfigurer csrf() throws Exception { return new CsrfConfigurer(); }
/** * Adds CSRF support. This is activated by default when using * {@link WebSecurityConfigurerAdapter}'s default constructor. You can disable it * using: * * <pre> * @Configuration * @EnableWebSecurity * public class CsrfSecurityConfig extends WebSecurityConfigurerAdapter { * * @Override * protected void configure(HttpSecurity http) throws Exception { * http * .csrf().disable() * ...; * } * } * </pre> * * @return the {@link ServletApiConfigurer} for further customizations * @throws Exception */ public CsrfConfigurer<HttpSecurity> csrf() throws Exception { ApplicationContext context = getContext(); return getOrApply(new CsrfConfigurer<>(context)); }