Reputation: 61
I'd like to read the session cookie in the java quarkus app.
According to this page https://quarkus.io/guides/security-built-in-authentication#form-auth, it's possible so we can get access to the information across services.
I'd like to use it to manage all possible sessions of the same user, and add some information, specially for websocket.
Thanks!
Upvotes: 0
Views: 690
Reputation: 1121
I'm guessing you need to add Security Context to endpoints, like this :
@GET
@Path("/")
public String getSubjectSecured(@Context SecurityContext sec) {
Principal user = sec.getUserPrincipal();
// Do stuff with user
}
See documentation
Upvotes: 0