Re: GenericPrincipal
- From: "Joe Kaplan" <joseph.e.kaplan@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 9 Sep 2007 21:13:19 -0500
Right, but what I'm saying is that all of the other frameworks for doing
this have code to authenticate the user, recreate the principal and perform
authorization on each request and so must your code. If you need to save
your roles in between executions to avoid a round trip to the db to look
them up again, then you need to persist them in cache, session or in a
secure cookie and regenerate them that way.
People usually use the membership providers so they don't have to write all
that code.
Joe K.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Erick" <josefszeliga@xxxxxxxxxxx> wrote in message
news:1189382631.010209.256770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The genericprincipal is there to use for when you don't want to use
forms or windows authtentication. I want to create a single
genericprincipal object for windows authtenticated users within our
domain and for users comming in through our internet.
Once I have a principal object I can then add roles to the principal
object and use that to authorize my users through the rest of the
application. I only want to get their roles once at the start of their
session. Then use that for authorization throughout the application
Like this
If my.user.isinrole("administrator") then
....
...
end if
If i use forms authentication for those comming in from the outside I
can use the code above but for users within our domain i would need to
write something like this to handle nt security groups
If my.user.isinrole("OurDomain\ag myapplication administratorsgourp")
then
...
,,
end if
The code shouldn't really care that my administator is external or
internal ..once authenticated the authorization should be the same.
So i want to convert both forms and windows into generic. Then use
the one type of syntax throughout. My issue is that the principal
object should apply for the entire users session. It makes no sense
to have to authorize and authenticate some one on each request. Just
once per session is required.
.
- Follow-Ups:
- Re: GenericPrincipal
- From: Dominick Baier
- Re: GenericPrincipal
- References:
- GenericPrincipal
- From: Erick
- Re: GenericPrincipal
- From: Joe Kaplan
- Re: GenericPrincipal
- From: Erick
- GenericPrincipal
- Prev by Date: Re: GenericPrincipal
- Next by Date: RE: Trust level required for AppDomain.CurrentDomain.UnhandledExcept
- Previous by thread: Re: GenericPrincipal
- Next by thread: Re: GenericPrincipal
- Index(es):
Relevant Pages
|