4 Replies Latest reply on Oct 3, 2002 12:58 PM by Prem Sumetpong

    JAAS - Programmatic access to Subject

    Chris Gerrard Newbie

      Is there any way I can get access to the authenticated Subject from my application code running in JBoss?
      This particular code is neither a Servlet nor an EJB, therefore doesn't have access to the HttpServletRequest or EJBContext mechanisms for retrieving this (user) information.
      In our case we need to be able to determine the current user's identity in order to be able the retrieve some personalization stuff. FWIW the new Java 1.4 Preferences interface exposes methods which don't accept user/Subject parameters & so the implication seems to be that implementations need to have some mechanism for determining user identity information.
      I'm aware of the Security Proxies available in JBoss, but can't see how they'd be of real use in this circumstance.
      Thanks, sorry for the length.