Yep, the heuristic will remain. At least I can't think of a better default ;)
I'll move forward with this concept - it seems like everyone is pretty much in agreement this will be OK. On Thu, Sep 17, 2009 at 7:30 AM, Peter Ledbrook <[email protected]> wrote: >>> I do like this option. With regard to Alan's comment, the primary >>> principal is (in my view) something that's important to the >>> application, not to the realms. >> >> I agree - and we've got that covered by the Subject#getPrincipal() >> method. However, our implementation of that method just returns the >> PrincipaCollection's first iterated element. There is no control for >> an Realm implementor to specify what the primary would be other than >> our heuristic. > > Ah, OK. I hadn't read the proposal properly. I was thinking > Subject.getPrimaryPrincipal(), which you point out already exists. > > PrincipalCollection.getPrimaryPrincipal() sounds good. Could we leave > the heuristic in as default behaviour? > > Peter >
