How to have a 'unique or single session' by user
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2010 12:02 PM
Here is the case:
There is any way that one user who logs in Share, with an active session, couldn't log in another browser or PC with the same user?
Regards, and thanks for your comments…
There is any way that one user who logs in Share, with an active session, couldn't log in another browser or PC with the same user?
Regards, and thanks for your comments…
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2010 02:24 PM
You would need to code that yourself. Intercept the login and store some sort of flag, that prevents a second login. Reset the flag on log out.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2010 07:49 AM
Assuming you are using 3.3 or 3.4 then you can override the LoginController SpringMVC controller bean in Share:
spring-surf-mvc-context.xml
<bean id="logoutController" class="org.springframework.extensions.surf.mvc.LogoutController">
This bean is responsible for authenticating users. You would override it and code up your own class that checked to see if the user was currently logged in and reject them if they were.
Kev
spring-surf-mvc-context.xml
<bean id="logoutController" class="org.springframework.extensions.surf.mvc.LogoutController">
This bean is responsible for authenticating users. You would override it and code up your own class that checked to see if the user was currently logged in and reject them if they were.
Kev
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2010 05:36 PM
Thanks a lot for your help. I follow your instructions and code my own solution:
I modified the spring-surf-mvc-context.xml from spring with new classes Login and Logout controllers, each one with the same sign of the original (extends AbstractController).
Plus, I code a singleton that will be the listener of my application, so when any user's session were created/destroyed, singleton updates a list of current users.
If anyone needs more support about my solution post it…I will mark this forum as solved.
PS. kevir, I will give you a YES in the useful post rating
I modified the spring-surf-mvc-context.xml from spring with new classes Login and Logout controllers, each one with the same sign of the original (extends AbstractController).
Plus, I code a singleton that will be the listener of my application, so when any user's session were created/destroyed, singleton updates a list of current users.
If anyone needs more support about my solution post it…I will mark this forum as solved.
PS. kevir, I will give you a YES in the useful post rating

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2016 12:49 AM
Hi Andrew,
Can you please let me know how can I achieve the same in alfresco 5.1 ??

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2010 05:15 AM
Good stuff!
Cheers,
Kev
Cheers,
Kev
