/** * Configures X509 based pre authentication. * * <h2>Example Configuration</h2> * * The following configuration will attempt to extract the username from the X509 * certificate. Remember that the Servlet Container will need to be configured to * request client certificates in order for this to work. * * <pre> * @Configuration * @EnableWebSecurity * public class X509SecurityConfig extends WebSecurityConfigurerAdapter { * * @Override * protected void configure(HttpSecurity http) throws Exception { * http.authorizeRequests().antMatchers("/**").hasRole("USER").and() * // Example x509() configuration * .x509(); * } * } * </pre> * * @return the {@link X509Configurer} for further customizations * @throws Exception */ public X509Configurer<HttpSecurity> x509() throws Exception { return getOrApply(new X509Configurer<>()); }
/** * Configures X509 based pre authentication. * * <h2>Example Configuration</h2> * * The following configuration will attempt to extract the username from the X509 * certificate. Remember that the Servlet Container will need to be configured to * request client certificates in order for this to work. * * <pre> * @Configuration * @EnableWebSecurity * public class X509SecurityConfig extends WebSecurityConfigurerAdapter { * * @Override * protected void configure(HttpSecurity http) throws Exception { * http.authorizeRequests().antMatchers("/**").hasRole("USER").and() * // Example x509() configuration * .x509(); * } * } * </pre> * * @return the {@link X509Configurer} for further customizations * @throws Exception */ public X509Configurer<HttpSecurity> x509() throws Exception { return getOrApply(new X509Configurer<>()); }
/** * Configures X509 based pre authentication. * * <h2>Example Configuration</h2> * * The following configuration will attempt to extract the username from the X509 * certificate. Remember that the Servlet Container will need to be configured to * request client certificates in order for this to work. * * <pre> * @Configuration * @EnableWebSecurity * public class X509SecurityConfig extends WebSecurityConfigurerAdapter { * * @Override * protected void configure(HttpSecurity http) throws Exception { * http.authorizeRequests().antMatchers("/**").hasRole("USER").and() * // Example x509() configuration * .x509(); * } * } * </pre> * * @return the {@link X509Configurer} for further customizations * @throws Exception */ public X509Configurer<HttpSecurity> x509() throws Exception { return getOrApply(new X509Configurer<>()); }
return apply(new X509Configurer<HttpSecurity>());