Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBCRealm and programmatic authentication

 
Mike Gru
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible (when using JDBC Realm in tomcat for authentication) to catch and handle the event of the athentication? I mean is it possible to handle this event?
Best regards!
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not possible using the standard Realms that ship with Tomcat. But you could extend JDBCRealm, add some notification mechanism to it, and configure Tomcat to use that instead of JDBCRealm. Details on how to get started with a custom Realm are here.

It's also possible to obtain at runtime the Realm object that Tomcat uses, but you would need to utilize Tomcats internal API, and it doesn't solve your problem by itself. The details can be found here if you're curious.
[ September 14, 2005: Message edited by: Ulf Dittmer ]
 
Mike Gru
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the answer. I appreciate it. I've seen the method of geting Realm reference. But I did not find the Realm customization description on Tomcat site page you have pointed to. Could you check it up, please?
Thank you.
Best regards!
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is the last paragraph in the "What is a Realm?" section. They're more like hints on what you need to do, not a full step-by-step guide.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic