1
votes

I am using Jersey Grizzly and want to implement Basic Authentication to Grizzly. I create my grizzly server as follows:

ResourceConfig rc = new PackagesResourceConfig("com.abc.de");
GrizzlyServerFactory.createHttpServer(BASE_URI, rc);

at another class I have something like:

@GET
@Produces("text/plain")
@Path("/description")
public String getDescription() {
    String description = "probeDescription";
    return description;
}

I don't know the difference and main concepts of jersey and grizzly. What jersey can't do that grizzly can. However I want that if a user wants to get description it should pass the basic authentication.

Any ideas about how can I implement it?

1

1 Answers