- Common ways to obtain HttpSecurityBuilder
private void myMethod () {HttpSecurityBuilder h =
HttpSecurity http;http.csrf().disable()
HttpSecurity httpSecurity;httpSecurity.httpBasic().disable()
HttpSecurity httpSecurity;httpSecurity.authorizeRequests().anyRequest().authenticated().and().csrf().disable()
- Smart code suggestions by Codota
}
/** * Disables the {@link AbstractHttpConfigurer} by removing it. After doing so a fresh * version of the configuration can be applied. * * @return the {@link HttpSecurityBuilder} for additional customizations */ @SuppressWarnings("unchecked") public B disable() { getBuilder().removeConfigurer(getClass()); return getBuilder(); }
/** * Disables the {@link AbstractHttpConfigurer} by removing it. After doing so a fresh * version of the configuration can be applied. * * @return the {@link HttpSecurityBuilder} for additional customizations */ @SuppressWarnings("unchecked") public B disable() { getBuilder().removeConfigurer(getClass()); return getBuilder(); }
/** * Disables the {@link AbstractHttpConfigurer} by removing it. After doing so a fresh * version of the configuration can be applied. * * @return the {@link HttpSecurityBuilder} for additional customizations */ @SuppressWarnings("unchecked") public B disable() { getBuilder().removeConfigurer(getClass()); return getBuilder(); }
/** * Disables anonymous authentication. * * @return the {@link HttpSecurity} since no further customization of anonymous authentication would be * meaningful. */ @SuppressWarnings("unchecked") public H disable() { getBuilder().removeConfigurer(getClass()); return getBuilder(); }
@SuppressWarnings("unchecked") public H disable() { getBuilder().removeConfigurer(getClass()); return getBuilder(); }