File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Security and the fly likes How to set the Roles of a user Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
Bookmark "How to set the Roles of a user" Watch "How to set the Roles of a user" New topic

How to set the Roles of a user

Sebastiaan Kortleven
Ranch Hand

Joined: Mar 12, 2004
Posts: 81
Hi there,
I'm working on a custom LoginModule for JAAS. I believe I have it all working, the loginmodule is called and completes without errors. But I don't know where the loginmodule should save the users roles... (I got a collection of roles for a certain user, but where do I put these?) I would like to use the isUserInRole from the SessionContext...
I couldn't find much useful information, so I'm turning to you guys.
Anyone who can point me to some docs or help me on my way?
[ March 22, 2004: Message edited by: Sebastiaan Kortleven ]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

J2EE Security For Servlets, EJBs, and Web Services by Pankaj Kumar (Prentice-Hall), p 129 "running code on behalf of a user":

LoginContext maintains information about a user in an instance of

Does that help?
[ March 26, 2004: Message edited by: Tim Holloway ]

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: How to set the Roles of a user
It's not a secret anymore!