Class UserIdService

java.lang.Object
org.jasig.portlet.newsreader.service.UserIdService

@Service public class UserIdService extends Object
This Spring-managed bean is responsible for extracting the userId from the PortletRequest. The NewsReaderPortlet uses userId as a foreign key when it stores data. Normally this process is simple -- all authenticated users use PortletRequest.getRemoteUser as a userId. Unauthenticated users, however, need a different strategy. Users who aren't authenticated will have null for both getRemoteUser and the USER_INFO map. We need to differentiate them (in the case of multiple guest users) based on the role(s) they belong to.
Since:
5.1.1
Author:
bgonzalez
  • Constructor Details

    • UserIdService

      public UserIdService()
  • Method Details

    • init

      @PostConstruct public void init()

      init.

    • getUserId

      public String getUserId(javax.portlet.PortletRequest req)

      getUserId.

      Parameters:
      req - a PortletRequest object
      Returns:
      a String object