-
1. Re: Portlet with the user name
theute May 19, 2006 6:04 AM (in response to antitrust1982)You should really read the spec
request.getRemoteUser(); -
2. Re: Portlet with the user name
antitrust1982 May 19, 2006 9:57 AM (in response to antitrust1982)excuse me but I think you speak about JBPM specification. I want the loggin of Jboss Portal. I think this because I can't find your class in the javadoc and I remember of a similar class in jBpm.
thank you for you help -
3. Re: Portlet with the user name
theute May 19, 2006 10:06 AM (in response to antitrust1982)Portlet spec:
PLT.11.1.6 Security Attributes
The PortletRequest interface offers a set of methods that provide security information
about the user and the connection between the user and the portal. These methods are:
? getAuthType
? getRemoteUser
? getUserPrincipal
? isUserInRole
? isSecure
[...]
The getRemoteUser method returns the login name of the user making this request.
In the API:
http://docs.jboss.com/jbportal/v2.2/javadoc/javax/portlet/PortletRequest.html#getRemoteUser()
You *must* read the spec... -
4. Re: Portlet with the user name
antitrust1982 May 24, 2006 5:14 AM (in response to antitrust1982)Hi all,
I tried to use getRemoteUser() this methode is a PortletRequest's methode, but the PortletRequest class is an interface then I can use it directly in order to have my login name. So I have seen which classes are implement this class and I find ActionRequestImpl, but the constructor of this class needs an action invocation which needs a InputContext. I don't understand how I can have this InputContext. And how I can use the classes from portal in my portlet.
So when I wrote my portlet , I don't understand how I can link my portlet and the portlet context. If you have an example or some clues in order toexplain how I can take the login name easily, can you send me please?
thank you for your help
antitrust1982 -
5. Re: Portlet with the user name
theute May 24, 2006 5:21 AM (in response to antitrust1982)Please read the spec from the top to bottom... I insist till everything is there for portlet development.
You are trying to get your username either from a render method or an action method. So you have access either to a RenderRequest object or a ActionRequest object. Both objects extend PortletRequest.