geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: Programatically querying security realm
Date Fri, 02 Mar 2007 18:22:41 GMT

On Mar 2, 2007, at 7:28 AM, Aman Nanner/MxI Technologies wrote:

> Hi,
> I have a custom security realm defined that uses a database login  
> module.
> What I would like to do is, from a custom GBean, query the
> realm/login-module somehow to test if a given username/password is  
> valid.
> So I will have a username string and a password string, and I would  
> like to
> validate it and get back a boolean indicating its validity.  I think I
> would use the Kernel to grab an instance of some security-related  
> GBean to
> do this and invoke an operation on it, but I'm not sure which one I  
> would
> have to use.  Anybody have any ideas?

Why not simply

new LoginContext(realmName, callbackHandler).login()

with an appropriately setup CallbackHandler?

david jencks

> Thanks,
> Aman
> ______________________________________________________________________ 
> ____________
> * This message is intended only for the use of the individual or  
> entity to which it is addressed, and may contain information that  
> is privileged, confidential and exempt from disclosure under  
> applicable law. Unless you are the addressee (or authorized to  
> receive for the addressee), you may not use, copy or disclose the  
> message or any information contained in the message. If you have  
> received this message in error, please advise the sender by reply e- 
> mail , and delete the message, or call (collect) 001 613 747 4698. *

View raw message