Closed GoogleCodeExporter closed 9 years ago
Original comment by jeff.br...@gmail.com
on 29 Jun 2009 at 8:33
Original comment by Yann.Tre...@gmail.com
on 30 Jun 2009 at 5:36
Jeff,
I have implemented the ImpersonateAttribute.
But I'm not sure about the usage of PrincipalAttribute. What do you mean by
spoofing?
Is "foo" a completely fake user who does actually not exist? So is that
implying to
create a custom IPrincipal object that simulates the specified credentials?
Original comment by Yann.Tre...@gmail.com
on 30 Jun 2009 at 7:43
Yes, we would just create a custom IPrincipal object with the desired roles.
Of course any code that checks the type of the principal would fail. So we
could
make the attribute a little extensible by exposing a virtual factory method to
create
the principle. Users could then override how that works so they can create a
[Principal] attribute for their own principal types.
eg.
public class PrincipalAttribute : .....
{
protected virtual IPrincipal CreatePrincipal()
{
return new FakePrincipal(Name, Roles);
}
}
Original comment by jeff.br...@gmail.com
on 18 Jul 2009 at 5:23
Original comment by jeff.br...@gmail.com
on 18 Jul 2009 at 5:24
PrincipalAttribute implemented.
Original comment by Yann.Tre...@gmail.com
on 24 Jul 2009 at 9:40
Original issue reported on code.google.com by
Yann.Tre...@gmail.com
on 4 Jun 2009 at 5:40