The Subject (representing the authenticated identity) is currently obtained in Jakarta Authorization in the following way:
Subject subject;
try {
subject = (Subject) PolicyContext.getContext("javax.security.auth.Subject.container");
} catch (PolicyContextException ex) {
throw new RuntimeException(ex);
}
We could for convenience and for ease of readability in the using code add a getSubject() method to PolicyContext
The Subject (representing the authenticated identity) is currently obtained in Jakarta Authorization in the following way:
We could for convenience and for ease of readability in the using code add a
getSubject()method toPolicyContext