Java Jersey SecurityContext的优点是什么,以及如何使用它?

Java Jersey SecurityContext的优点是什么,以及如何使用它?,java,rest,swagger,security-context,Java,Rest,Swagger,Security Context,我有一个这样的API @GET @Path("/tasks") @Consumes({ "application/json" }) @Produces({ "application/json" }) @io.swagger.annotations.ApiOperation(value = "List all tasks", notes = "", response = Tasks.class, authorizations = { @io.swagger.annotations.Authoriz

我有一个这样的API

@GET
@Path("/tasks")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "List all tasks", notes = "", response = Tasks.class, authorizations = {
@io.swagger.annotations.Authorization(value = "api_key")
}, tags={ "tasks",  })
@io.swagger.annotations.ApiResponses(value = { 
@io.swagger.annotations.ApiResponse(code = 200, message = "An array of tasks", response = Tasks.class),
@io.swagger.annotations.ApiResponse(code = 200, message = "unexpected error", response = Tasks.class) })
public Response getTasks(@Context SecurityContext securityContext) throws NotFoundException {
    return delegate.getTasks(securityContext);
}
参数为Jersey SecurityContext。我的问题是,, 我可以用这个securitycontext做什么? 对这个api的请求是什么样子的

我读过这篇文章,但对SecurityContext一点都不了解

如果可能的话,希望的行为是发送两个字符串信息,如用户和密钥