Class UserIdService
java.lang.Object
org.jasig.portlet.newsreader.service.UserIdService
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 Summary
Constructors -
Method Summary
-
Constructor Details
-
UserIdService
public UserIdService()
-
-
Method Details
-
init
@PostConstruct public void init()init.
-
getUserId
getUserId.
- Parameters:
req- aPortletRequestobject- Returns:
- a
Stringobject
-