@Override protected void configure(HttpSecurity http) throws Exception { // @formatter:off http .requestMatchers() .mvcMatchers("/path") .and() .httpBasic().and() .authorizeRequests() .anyRequest().denyAll(); // @formatter:on }
@Override protected void configure(HttpSecurity http) throws Exception { // @formatter:off http .requestMatchers() .mvcMatchers("/path").servletPath("/spring") .mvcMatchers("/never-match") .and() .httpBasic().and() .authorizeRequests() .anyRequest().denyAll(); // @formatter:on }
@Override public MvcMatchersRequestMatcherConfigurer mvcMatchers(HttpMethod method, String... mvcPatterns) { List<MvcRequestMatcher> mvcMatchers = createMvcMatchers(method, mvcPatterns); setMatchers(mvcMatchers); return new MvcMatchersRequestMatcherConfigurer(getContext(), mvcMatchers); }
@Override protected void configure(HttpSecurity http) throws Exception { super.configure(http); http .requestMatchers() .mvcMatchers("/.well-known/jwks.json") .and() .authorizeRequests() .mvcMatchers("/.well-known/jwks.json").permitAll(); } }
@Override public MvcMatchersRequestMatcherConfigurer mvcMatchers(HttpMethod method, String... mvcPatterns) { List<MvcRequestMatcher> mvcMatchers = createMvcMatchers(method, mvcPatterns); setMatchers(mvcMatchers); return new MvcMatchersRequestMatcherConfigurer(getContext(), mvcMatchers); }
@Override public MvcMatchersRequestMatcherConfigurer mvcMatchers(HttpMethod method, String... mvcPatterns) { List<MvcRequestMatcher> mvcMatchers = createMvcMatchers(method, mvcPatterns); setMatchers(mvcMatchers); return new MvcMatchersRequestMatcherConfigurer(getContext(), mvcMatchers); }