@SuppressWarnings("unchecked") public static void permitAll( HttpSecurityBuilder<? extends HttpSecurityBuilder<?>> http, RequestMatcher... requestMatchers) { ExpressionUrlAuthorizationConfigurer<?> configurer = http .getConfigurer(ExpressionUrlAuthorizationConfigurer.class); if (configurer == null) { throw new IllegalStateException( "permitAll only works with HttpSecurity.authorizeRequests()"); } for (RequestMatcher matcher : requestMatchers) { if (matcher != null) { configurer .getRegistry() .addMapping( 0, new UrlMapping( matcher, SecurityConfig .createList(ExpressionUrlAuthorizationConfigurer.permitAll))); } } }
@SuppressWarnings("unchecked") public static void permitAll( HttpSecurityBuilder<? extends HttpSecurityBuilder<?>> http, RequestMatcher... requestMatchers) { ExpressionUrlAuthorizationConfigurer<?> configurer = http .getConfigurer(ExpressionUrlAuthorizationConfigurer.class); if (configurer == null) { throw new IllegalStateException( "permitAll only works with HttpSecurity.authorizeRequests()"); } for (RequestMatcher matcher : requestMatchers) { if (matcher != null) { configurer .getRegistry() .addMapping( 0, new UrlMapping( matcher, SecurityConfig .createList(ExpressionUrlAuthorizationConfigurer.permitAll))); } } }
@SuppressWarnings("unchecked") public static void permitAll( HttpSecurityBuilder<? extends HttpSecurityBuilder<?>> http, RequestMatcher... requestMatchers) { ExpressionUrlAuthorizationConfigurer<?> configurer = http .getConfigurer(ExpressionUrlAuthorizationConfigurer.class); if (configurer == null) { throw new IllegalStateException( "permitAll only works with HttpSecurity.authorizeRequests()"); } for (RequestMatcher matcher : requestMatchers) { if (matcher != null) { configurer .getRegistry() .addMapping( 0, new UrlMapping( matcher, SecurityConfig .createList(ExpressionUrlAuthorizationConfigurer.permitAll))); } } }
/** * Allows registering multiple {@link RequestMatcher} instances to a collection of * {@link ConfigAttribute} instances * * @param requestMatchers the {@link RequestMatcher} instances to register to the * {@link ConfigAttribute} instances * @param configAttributes the {@link ConfigAttribute} to be mapped by the * {@link RequestMatcher} instances */ private void interceptUrl(Iterable<? extends RequestMatcher> requestMatchers, Collection<ConfigAttribute> configAttributes) { for (RequestMatcher requestMatcher : requestMatchers) { REGISTRY.addMapping(new AbstractConfigAttributeRequestMatcherRegistry.UrlMapping( requestMatcher, configAttributes)); } }
/** * Allows registering multiple {@link RequestMatcher} instances to a collection of * {@link ConfigAttribute} instances * * @param requestMatchers the {@link RequestMatcher} instances to register to the * {@link ConfigAttribute} instances * @param configAttributes the {@link ConfigAttribute} to be mapped by the * {@link RequestMatcher} instances */ private void interceptUrl(Iterable<? extends RequestMatcher> requestMatchers, Collection<ConfigAttribute> configAttributes) { for (RequestMatcher requestMatcher : requestMatchers) { REGISTRY.addMapping(new AbstractConfigAttributeRequestMatcherRegistry.UrlMapping( requestMatcher, configAttributes)); } }
/** * Allows registering multiple {@link RequestMatcher} instances to a collection of * {@link ConfigAttribute} instances * * @param requestMatchers the {@link RequestMatcher} instances to register to the * {@link ConfigAttribute} instances * @param configAttributes the {@link ConfigAttribute} to be mapped by the * {@link RequestMatcher} instances */ private void interceptUrl(Iterable<? extends RequestMatcher> requestMatchers, Collection<ConfigAttribute> configAttributes) { for (RequestMatcher requestMatcher : requestMatchers) { REGISTRY.addMapping(new AbstractConfigAttributeRequestMatcherRegistry.UrlMapping( requestMatcher, configAttributes)); } }