|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
[Building Sakai] Get user session
Hi everyone,
I need get the id of user who is logged in Sakai. Example: I have my application that will get the user and that user will be logged by Sakai web page login and after he/she will select a link and that link redirect it to my application, so when my application is called I'll get the user id, and after I'll call another application passing more informations by post method. Is there any way to make it? If so, how can I do? Could you send me an example?
_______________________________________________ sakai-dev mailing list sakai-dev@... http://collab.sakaiproject.org/mailman/listinfo/sakai-dev TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe@... with a subject of "unsubscribe" |
||
|
|
Re: [Building Sakai] Get user sessionHi Wellington,
To get the current userId: sessionManager.getCurrentSessionUserId(); This will be a Sakai userId, you might need to translate it into an eid for use in other systems. See UserDirectoryService to get an eid from a userid via a User object. Alternatively you can get a Session object from the SessionManager and get the eid from that. You'll need to inject the SessionManager API into your service via Spring or use the ComponentManager to get it for you. If you have the full source, issue mvn javadoc:javadoc -Daggregate=true (or just mvn javadoc:aggregate) to get the docs. You might need to repeat for the Kernel source since most core API's live there. cheers, Steve On 05/11/2009, at 11:09 PM, Wellington Santos wrote:
_______________________________________________ sakai-dev mailing list sakai-dev@... http://collab.sakaiproject.org/mailman/listinfo/sakai-dev TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe@... with a subject of "unsubscribe" |
||
|
|
Re: [Building Sakai] Get user session
Ok Steve, I'll try here, any question I'll back here to ask.
Thanks a lot.
Em Qui, 2009-11-05 às 23:24 +1100, Steve Swinsburg escreveu: Hi Wellington, To get the current userId: sessionManager.getCurrentSessionUserId(); This will be a Sakai userId, you might need to translate it into an eid for use in other systems. See UserDirectoryService to get an eid from a userid via a User object. Alternatively you can get a Session object from the SessionManager and get the eid from that. You'll need to inject the SessionManager API into your service via Spring or use the ComponentManager to get it for you. If you have the full source, issue mvn javadoc:javadoc -Daggregate=true (or just mvn javadoc:aggregate) to get the docs. You might need to repeat for the Kernel source since most core API's live there. cheers, Steve On 05/11/2009, at 11:09 PM, Wellington Santos wrote: Hi everyone, _______________________________________________ _______________________________________________ sakai-dev mailing list sakai-dev@... http://collab.sakaiproject.org/mailman/listinfo/sakai-dev TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe@... with a subject of "unsubscribe" |
| Free embeddable forum powered by Nabble | Forum Help |