Tabnine Logo
org.apache.cxf.rs.security.cors
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.cxf.rs.security.cors

Best Java code snippets using org.apache.cxf.rs.security.cors (Showing top 20 results out of 315)

origin: apache/cxf

private boolean effectiveAllowCredentials(CrossOriginResourceSharing ann) {
  if (ann != null) {
    return ann.allowCredentials();
  }
  return allowCredentials;
}
origin: org.apache.brooklyn/brooklyn-rest-resources

@Override
public void filter(ContainerRequestContext requestContext) {
  if (enableCors) {
    super.filter(requestContext);
  }
}
origin: apache/cxf

private Integer effectiveMaxAge(CrossOriginResourceSharing ann) {
  if (ann != null) {
    int ma = ann.maxAge();
    if (ma < 0) {
      return null;
    }
    return Integer.valueOf(ma);
  }
  return maxAge;
}
origin: apache/cxf

@CrossOriginResourceSharing(allowOrigins = {
    "http://area51.mil:31415"
    }, allowCredentials = true, maxAge = 1, allowHeaders = {
    "X-custom-1", "X-custom-2"
    }, exposeHeaders = {
    "X-custom-3", "X-custom-4"
    }
)
public interface CorsSecuredBase {

}

origin: apache/cxf

private boolean effectiveAllowOrigins(CrossOriginResourceSharing ann, List<String> origins) {
  if (effectiveAllowAllOrigins(ann)) {
    return true;
  }
  List<String> actualOrigins = Collections.emptyList();
  if (ann != null) {
    actualOrigins = Arrays.asList(ann.allowOrigins());
  }
  if (actualOrigins.isEmpty()) {
    actualOrigins = allowOrigins;
  }
  return actualOrigins.containsAll(origins);
}
origin: apache/cxf

private boolean effectiveAllowAnyHeaders(CrossOriginResourceSharing ann) {
  if (ann != null) {
    return ann.allowHeaders().length == 0;
  }
  return allowHeaders.isEmpty();
}
origin: apache/cxf

private boolean effectiveAllowAllOrigins(CrossOriginResourceSharing ann) {
  if (ann != null) {
    return ann.allowAllOrigins();
  }
  return allowOrigins.isEmpty();
}
origin: apache/cxf

private List<String> effectiveExposeHeaders(CrossOriginResourceSharing ann) {
  List<String> actualExposeHeaders = null;
  if (ann != null) {
    actualExposeHeaders = Arrays.asList(ann.exposeHeaders());
  } else {
    actualExposeHeaders = exposeHeaders;
  }
  return actualExposeHeaders;
}
origin: org.apache.brooklyn/brooklyn-rest-resources

@Override
public void setMaxAge(Integer maxAge) {
  if (Integer.valueOf(-1).equals(maxAge)) {
    super.setMaxAge(null);
  } else {
    super.setMaxAge(maxAge);
  }
}

origin: org.apache.cxf/cxf-rt-rs-security-cors

private boolean effectiveAllowCredentials(CrossOriginResourceSharing ann) {
  if (ann != null) {
    return ann.allowCredentials();
  }
  return allowCredentials;
}
origin: org.apache.cxf/cxf-rt-rs-security-cors

private Integer effectiveMaxAge(CrossOriginResourceSharing ann) {
  if (ann != null) {
    int ma = ann.maxAge();
    if (ma < 0) {
      return null;
    }
    return Integer.valueOf(ma);
  }
  return maxAge;
}
origin: org.apache.cxf/cxf-bundle-jaxrs

private boolean effectiveAllowAnyHeaders(CrossOriginResourceSharing ann) {
  if (ann != null) {
    return ann.allowHeaders().length == 0;
  } else {
    return allowHeaders.isEmpty();
  }
}

origin: org.apache.cxf/cxf-rt-rs-security-cors

private boolean effectiveAllowAllOrigins(CrossOriginResourceSharing ann) {
  if (ann != null) {
    return ann.allowAllOrigins();
  }
  return allowOrigins.isEmpty();
}
origin: org.apache.cxf/cxf-bundle-jaxrs

private List<String> effectiveExposeHeaders(CrossOriginResourceSharing ann) {
  List<String> actualExposeHeaders = null; 
  if (ann != null) {
    actualExposeHeaders = Arrays.asList(ann.exposeHeaders());
  } else {
    actualExposeHeaders = exposeHeaders;
  }
  
  return actualExposeHeaders;
}
origin: org.apache.brooklyn/brooklyn-rest-resources

  @Override
  public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) {
    if (enableCors) {
      super.filter(requestContext, responseContext);
    }
  }
}
origin: org.apache.cxf/cxf-bundle-jaxrs

private boolean effectiveAllowCredentials(CrossOriginResourceSharing ann) {
  if (ann != null) {
    return ann.allowCredentials();
  } else {
    return allowCredentials;
  }
}
origin: org.apache.cxf/cxf-bundle-jaxrs

private Integer effectiveMaxAge(CrossOriginResourceSharing ann) {
  if (ann != null) {
    int ma = ann.maxAge();
    if (ma < 0) {
      return null;
    } else {
      return Integer.valueOf(ma);
    }
  } else {
    return maxAge;
  }
}

origin: org.apache.cxf/cxf-rt-rs-security-cors

private boolean effectiveAllowAnyHeaders(CrossOriginResourceSharing ann) {
  if (ann != null) {
    return ann.allowHeaders().length == 0;
  }
  return allowHeaders.isEmpty();
}
origin: org.apache.cxf/cxf-bundle-jaxrs

private boolean effectiveAllowAllOrigins(CrossOriginResourceSharing ann) {
  if (ann != null) {
    return ann.allowAllOrigins();
  } else {
    return allowOrigins.isEmpty();
  }
}
origin: org.apache.cxf/cxf-rt-rs-security-cors

private List<String> effectiveExposeHeaders(CrossOriginResourceSharing ann) {
  List<String> actualExposeHeaders = null;
  if (ann != null) {
    actualExposeHeaders = Arrays.asList(ann.exposeHeaders());
  } else {
    actualExposeHeaders = exposeHeaders;
  }
  return actualExposeHeaders;
}
org.apache.cxf.rs.security.cors

Most used classes

  • CrossOriginResourceSharing
  • CrossOriginResourceSharingFilter
    A single class that provides both an input and an output filter for CORS, following http://www.w3.or
  • CrossOriginResourceSharingFilter$CorsInInterceptor
  • LocalPreflight
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now