You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jon Yeargers <jo...@bme.ogi.edu> on 2006/09/08 19:07:50 UTC
Tomcat: form authentication - creating a login bean
I have a site that uses Tomcat's form based authentication. It reads
from a MySQL db using a 'DataSourceRealm' defined in the context.xml
file. All well and good.
What Im hoping to achieve is creation of a session bean with info about
the logged in account when a valid login is sent. Is there a value in
context.xml, web.xml or other that I can enter / trap / override?
Im using TC5.
Jon
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat: form authentication - creating a login bean
Posted by David Smith <dn...@cornell.edu>.
The table used in the DataSourceRealm can contain more than just the
user's credentials. Expand the schema to include all the info. When
they login, just query the database for the remaining info.
request.getRemoteUser() provide's the username of the client. A request
filter would be ideal for this.
--David
Jon Yeargers wrote:
> I have a site that uses Tomcat's form based authentication. It reads
> from a MySQL db using a 'DataSourceRealm' defined in the context.xml
> file. All well and good.
>
> What Im hoping to achieve is creation of a session bean with info
> about the logged in account when a valid login is sent. Is there a
> value in context.xml, web.xml or other that I can enter / trap /
> override?
>
> Im using TC5.
>
> Jon
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org