On Sep 15, 2009, at 12:22 PM, Les Hazlewood wrote:

I propose that we add a 'getPrimaryPrincipal()' method to the
PrincipalCollection interface.

We regularly talk about the 'primary' principal, and it is referenced
in many applications, but you need to resort to less-than-ideal ways
of accessing it (see
https://svn.apache.org/repos/asf/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/realm/AuthorizingRealm.java
- 'getAvailablePrincipal' - at the bottom of the file).

Most applications reference a single principal at runtime (e.g.
user/account ID), and I think it would clean up code.

Isn't what is thought of the primary principal up to different interpretations? Some realms may want it one way and others another.


Regards,
Alan

Reply via email to