Wednesday, February 4, 2009

getting the current Subject in oc4j

This is a copy of an email I sent.

The problem: How do you get the subject associated with the currently authenticated user.

Solution: There are two ways in oc4j.

* The standard way

1. Configure JAAS mode and
2. invoke Subject.getSubject(AccessController.getContext());

* OC4J proprietary way


This requires an oc4j patchset in and is automatically available in

No comments: