You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by me...@twrichter.de on 2001/05/28 16:56:06 UTC
RE:RE: How to get Role and Password from JDBC Realme -using 3.2.2
Thanks Jan,
I have to apologize not to have explained the intended usage:
I need username, userpassword and userrole since I will use it for
DB-Authorization (GRANT to group, and user to tables and so on, connecting
DB with username,userpass). I intend to synchronize username, password and
role with the authDB of the specific Datebase (Interbase and isc4.gdb). Is
there a methode like org.apache.catalina.realm.GenericPrincipal principal
= request.getUserPrincipal() for Tomcat 3.2.2 and is there an elegant
method for attaching password, too?
Thank you for help
Thomas
"Pernica, Jan" wrote:
>It depends what do you want:
>to get user login = request.getRemoteUser()
>to whether he/she have a role you can use
>request.isUserInRole("myrole")
>
> Even you are able to get the list of roles
> org.apache.catalina.realm.GenericPrincipal principal =
>request.getUserPrincipal();
>principal.getRoles()
>
>Regards
>
>Jan
On Monday, May 28, 2001 4:22 PM, me@twrichter.de
[SMTP:me@twrichter.de]
wrote:
> Hello,
>
> I want to use the provided user_pass and user_role in the
> JDBCRealm-Database given in server.xml. What is the most
elegant way to do
> this? Of cource I would be able to get it via
request.getRemoteUser() and
> then make a select to the hardcoded database name with provided
auth user
> and pass like it is given in server.xml. But there must be a
better way
> since database name, username and driver url is already
included in the
> Realm section? How to use it? I read the JDBCRealm code but I
did not find
> out where it gets the connectionUrl a.s.o.
>
> Best Regards
> Thomas