Annotation Type SecureClient


  • @ClientBinding(configClass=SecureClientConfig.class,
                   inheritServerProviders=false)
    @Documented
    @Retention(RUNTIME)
    @Target({FIELD,PARAMETER})
    public @interface SecureClient
    Annotation to inject clients that have security feature configured. Just send security context as request parameter using ClientSecurityFeature.PROPERTY_CONTEXT and security will be handled for outgoing request(s) on this client.
     @SecureClient
     @Uri("http://service-name:8787/base_path")
     private WebTarget target;
    
     @GET
     public Response getIt(@Context SecurityContext context) {
      return target.request()
          .property(SecureClient.PROPERTY_CONTEXT, context)
          .get();
     }