1. Domino REST
  2. Rest clients
  3. Credentials

Credentials

withCredentials property is a Boolean that indicates whether cross-site Access-Control requests should be made using credentials such as cookies, authorization headers or TLS client certificates. Setting withCredentials has no effect on same-site requests.

In domino-rest you can set the withCredentials flag using one of the following :

  • Directly set the value on the request instance :

    			@RequestFactory
    public interface MoviesService {
    
        @Path("library/movies/:movieName")
        @GET
        Movie getMovieByName(@PathParam("movieName") String movieName);
    
        @Path("library/movies")
        @GET
        List<Movie> listMovies();
    
        @Path("library/movies/:name")
        @PUT
        @SuccessCodes({200})
        void updateMovie(@beanParam @RequestBody Movie movie);
    }
    
    		
  • Using the @WithCredentials annotation.

    			MoviesServiceFactory.INSTANCE
        .getMovieByName("hulk")
        .onSuccess(movie ->{})
        .send();
    
    		

    The default value for the annotation is true and if it is not presented on the interface, the flag won't be set and will be left to the default implementation.

We are a group of passionate people who love what we do

Donate & Support Us