I am working with a piece of code implementing JAAS LoginModule and in the commit method I set the principal with user UUID:
subject.getPrincipals().add(new SimplePrincipal(userUUID)
But for some reason when I access the user from EJB Context:
context.getCallerPrincipal().getName()
I receive the login name of the user instead of the userUUID I was expecting.
Should I implement custom principal or how to solve this?
Thank you!