@Test public void shouldCreateGlobalConstraintWithRoles() { config = restConfigWith(ImmutableMap.of( RestConfig.AUTHENTICATION_ROLES_CONFIG, " r1 , r2 ")); final ConstraintMapping mapping = AuthUtil.createGlobalAuthConstraint(config); assertThat(mapping.getConstraint().isAnyRole(), is(false)); assertThat(mapping.getConstraint().getRoles(), is(new String[]{"r1","r2"})); }
public static ConstraintMapping createGlobalAuthConstraint(final RestConfig restConfig) { return createConstraint(restConfig, true, "/*"); }
AuthUtil { public static ConstraintMapping createGlobalAuthConstraint(final RestConfig restConfig) { return createConstraint(restConfig, true, "/*"); } }
AuthUtil { public static ConstraintMapping createGlobalAuthConstraint(final RestConfig restConfig) { return createConstraint(restConfig, true, "/*"); } private  AuthUtil(); }
AuthUtil { public static ConstraintMapping createGlobalAuthConstraint(final RestConfig restConfig) { return createConstraint(restConfig, true, "/*"); } 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 ConstraintMapping createGlobalAuthConstraint(final RestConfig restConfig) { return createConstraint(restConfig, true, "/*"); } 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);  }