Ambarish Mitra wrote: >> How do I get the roles of the user in the custom Valve? >> >> The custom valve talks with an external authentication system and gets the >> username. The external system does not store the roles. >> >> The authenticated username is then read in the Valve - it is one of the >> usernames in the tomcat Realm. Now, from here in the Valve, how do I get > the >> roles of the user in the tomcat realm? > > Which Realm are you trying to use? > > I am using a custom realm. I am not using any of the standard realms because > the authentication is not handled by the standard realms. > > > N.B. just reply to the list, not me as well.
Please reply to the LIST, not just me. The reason I ask is that I wanted to know where you're storing the user/role information. I will assume that you are using a database. In your Valve, you could just replicate the internal processes* of the Realm to determine the roles and assign them to the Principal. * define & use SQL statements to look up the roles for the supplied username. p > > > > > DISCLAIMER > ========== > This e-mail may contain privileged and confidential information which is the > property of Persistent Systems Ltd. It is intended only for the use of the > individual or entity to which it is addressed. If you are not the intended > recipient, you are not authorized to read, retain, copy, print, distribute or > use this message. If you have received this communication in error, please > notify the sender and delete all copies of this message. Persistent Systems > Ltd. does not accept any liability for virus infected mails. > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org