@Test public void shouldCreateNoUnsecuredPathConstraints() { config = restConfigWith(ImmutableMap.of( RestConfig.AUTHENTICATION_SKIP_PATHS, "")); final List<ConstraintMapping> mappings = AuthUtil.createUnsecuredConstraints(config); assertThat(mappings.size(), is(0)); }
public static List<ConstraintMapping> createUnsecuredConstraints(final RestConfig restConfig) { final List<String> unsecuredPaths = restConfig.getList(RestConfig.AUTHENTICATION_SKIP_PATHS); return unsecuredPaths.stream() .map(p -> createConstraint(restConfig, false, p)) .collect(Collectors.toList()); }
AuthUtil { public static List<ConstraintMapping> createUnsecuredConstraints(final RestConfig restConfig) { final List<String> unsecuredPaths = restConfig.getList(RestConfig.AUTHENTICATION_SKIP_PATHS); return unsecuredPaths.stream() .map(p -> createConstraint(restConfig, false, p)) .collect(Collectors.toList()); } }
AuthUtil { public static List<ConstraintMapping> createUnsecuredConstraints(final RestConfig restConfig) { final List<String> unsecuredPaths = restConfig.getList(RestConfig.AUTHENTICATION_SKIP_PATHS); return unsecuredPaths.stream() .map(p -> createConstraint(restConfig, false, p)) .collect(Collectors.toList()); } private  AuthUtil(); }
AuthUtil { public static List<ConstraintMapping> createUnsecuredConstraints(final RestConfig restConfig) { final List<String> unsecuredPaths = restConfig.getList(RestConfig.AUTHENTICATION_SKIP_PATHS); return unsecuredPaths.stream() .map(p -> createConstraint(restConfig, false, p)) .collect(Collectors.toList()); } private  AuthUtil(); static boolean isCorsEnabled(final RestConfig restConfig); static boolean isSkipOptionsAuth(final RestConfig restConfig); static ConstraintMapping createGlobalAuthConstraint(final RestConfig restConfig); static ConstraintMapping createSecuredConstraint(
      final RestConfig restConfig,
      final String pathSpec
  ); static ConstraintMapping createUnsecuredConstraint(
      final RestConfig restConfig,
      final String pathSpec
  ); static List<ConstraintMapping> createUnsecuredConstraints(final RestConfig restConfig); }
AuthUtil { public static List<ConstraintMapping> createUnsecuredConstraints(final RestConfig restConfig) { final List<String> unsecuredPaths = restConfig.getList(RestConfig.AUTHENTICATION_SKIP_PATHS); return unsecuredPaths.stream() .map(p -> createConstraint(restConfig, false, p)) .collect(Collectors.toList()); } private  AuthUtil(); static boolean isCorsEnabled(final RestConfig restConfig); static boolean isSkipOptionsAuth(final RestConfig restConfig); static ConstraintMapping createGlobalAuthConstraint(final RestConfig restConfig); static ConstraintMapping createSecuredConstraint(
      final RestConfig restConfig,
      final String pathSpec
  ); static ConstraintMapping createUnsecuredConstraint(
      final RestConfig restConfig,
      final String pathSpec
  ); static List<ConstraintMapping> createUnsecuredConstraints(final RestConfig restConfig);  }