>> 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

Reply via email to