Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

problem with security

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

I'm trying to write an application and I have a problem with security. I need to know when a user is logged in. I'm using standart jaas web authentication. On the jboss forum I found someone with similar problem that is:


I am using JAAS for my security in a web application. I would like to get notified whenever a user logs in or logs out. Is there a way to do this in JBoss?
Back to top
View user's profile Send private message Send e-mail
MrForms



Joined: Wed Aug 10, 2005 17:39 PM
Posts: MrForms
Location:

PostPosted: Tue Jan 17, 2006 21:20 PM Post subject: Re: JAAS Login/Logout Notification Reply with quote
Just some random suggestions ...

If you are using a web application, how about using a simple Session listener and checking for sessionCreated, sessionDestroyed ?

Doesn't your application offer a explicit login/logout mechanism ?

I am not aware that JAAS offers any listener/callback support for these events as they are usually explicit calls to the the LoginContext.login and LoginContext.logout methods.

You could always set up your own login module or recompile the login modules of JBoss with a embedded logging strategy in it. Download the source of JBoss and edit the desired login modules, add your logging mechanism in the commit method for example and in the logout methods. A quick build and you are done.


(http://www.jboss.org/index.html?module=bb&op=viewtopic&t=75595)

Now my question is : where I can find any information how to write such "simple Session listener" ? I would be very grateful for any help.

Kind Regards,

Karol
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This might help:

http://www.roseindia.net/javacertification/wcd-guide/session_listeners.shtml
 
Karol Oslowski
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much for you suggestion. I have found also this:
http://java.sun.com/developer/EJTechTips/2003/tt0626.html#2

cheers,

k.
 
No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic