I wouldn't go the road of a RuntimeException,  If you have more then one
Realm configured in a ModularRealmAuthenticator you would need to make sure
it was catching throwable, as to not effect any other configured realms.

I would stick with the realm only throwing a AthenticationException for now,
at least if/unless the method signature changes.

In the case of any sort of remote system, connection problems should be
expected, someone might be doing something as simple as restarting the
machine, or its under heavy load.  Either way it all comes down one of two
facts a.) the user cannot authenticate or b.) the the user cannot authorize.


I am still working with the jsecurity code base (will be changing soon i
hope) so please forgive me if my class name references are a bit off.

Just a few thoughts,
-Brian


On Thu, Jan 14, 2010 at 2:42 AM, Peter Ledbrook <[email protected]>wrote:

> > NamingException is a checked exception.  The Realm interface does not
> > permit checked exceptions since they can vary dramatically across
> > implementations. :/
>
> I would wrap it with a runtime exception then. It's been a while since
> I played with LDAP, so do all cases of NamingException imply either a
> system problem or programmer error?
>
> I certainly think that AuthenticationException and
> AuthorizationException shouldn't be used in such cases where the realm
> should deal with the issue.
>
> Cheers,
>
> Peter
>

Reply via email to