users@glassfish.java.net

Re: Default principal to role mapping problem...

From: <glassfish_at_javadesktop.org>
Date: Fri, 16 Nov 2007 06:08:31 PST

Nice work on the flexible jdbc realm. I tried this, and it seems to be working, or I might not have understood the problem. I get the following results from a jsp after authentication.

request.isUserInRole("manager") ===> role assigned by the custom realm (i.e. group)
request.getUserPrincipal() ===> my username


for eg,
if my database has

username | password | group |
-----------------------------------------------
bob | **** |manager |


and if I login as bob, I get to access a page which is constrained to be accessed by the role 'manager'.

Can you please let me know what the problem is?
[Message sent by forum member 'raharsha' (raharsha)]

http://forums.java.net/jive/thread.jspa?messageID=245817