Strangely enough, as much as I do _not_ prefer 'runAs' (I like
assumeIdentity for being explicit), I thought of a case where 'runAs'
nomenclature might actually be a benefit to us as framework
developers.

If we had a method:

runAs(Subject anotherSubject);

then the implementation has a lot of freedom to do whatever it wants
when interpreting the method call.

For example, would we need to retain other information than just the
other identity (the PrincipalCollection)?  What about the other
Subject's session ID (if it exists), the 'authenticated' flag, or
source InetAddress ?

If so, then 'assumeIdentity' doesn't make as much sense as 'runAs' to
me since there is more state than just identity that would be assumed.

Thoughts?

Les

Reply via email to