Functions of FormsAuthenticationTicket

G

Grey

I read from some site to learn the form authentication with AD that it needs
to create a FormsAuthenticationTicket to store the group list. I want to
that what is the function of FormsAuthenticationTicket?? is it a must to
create those ticket if I need to get the user's group list??? If I only want
to authenticate the username and password with AD, do I need to create the
FormsAuthenticationTicket???


Million Thanks
 
J

John Saunders

Grey said:
I read from some site to learn the form authentication with AD that it needs
to create a FormsAuthenticationTicket to store the group list. I want to
that what is the function of FormsAuthenticationTicket?? is it a must to
create those ticket if I need to get the user's group list??? If I only want
to authenticate the username and password with AD, do I need to create the
FormsAuthenticationTicket???

Forms Authentication always creates a FormsAuthenticationTicket. The only
question is whether or not you create it manually and therefore can access
it yourself for your own purposes.

If you do nothing special, a FormsAuthenticationTicket is created with a
UserData property set to null. If you create one manually, you get the
opportunity to set UserData to a list of groups. You would then encrypt the
FormsAuthenticationTicket, and set the value of the forms authentication
cookie to the encrypted ticket.

Subsequently, on the next page request, your AuthenticateRequest handler in
global.asax will be able to get access to the decrypted
FormsAuthenticationTicket. This will give you access to your list of groups.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top