I am using quarkus in a new project and on o GET request I want to get the bearer token from the request.
while I am testing the request with postman (or talent api) it work perfect and retrieves the response data, but with I am trying to add authorization headers on request the request does not work. not even stops on break point and the response as 401 Unauthorized.
@GET
@Path("/all")
@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
@Operation(summary = "Retrieves all mailbox ", description = "Retrieves all mailbox using search ")
public Response getAllMailbox(@DefaultValue("0") @QueryParam("page") int page,
@DefaultValue("20") @QueryParam("max") int max,
@DefaultValue("mail.receivedate") @QueryParam("orderby") String orderby,
@DefaultValue("") @QueryParam("search") String search) {
MailboxResponse mailboxResponse;
try {
mailboxResponse = mailboxManager.getAllMailbox(search, page, max, orderby, asc, headers);
} catch (Exception e) {
return Response.serverError().build();
}
return Response.status(Response.Status.OK).entity(mailboxResponse).build();
}
in previous version using java ee with jaxs-rs I was using annotation
@Context HttpHeaders headers;
and so I had access on token on request.
any idea how I can do the same thing on quarkus?