31 January 2014

IHttpModule & IPrincipal and IIdentity

Today I got exact meaning of IIdentity and IPrincipal in Microsoft .Net.

Actually as per as my knowledge these two interfaces are required for Authentication purpose I am still searching whether these things can be used in desktop application authentication. But I used it in Web application FORMS authentication.

Actually IPrincipal is an interface which contains many things one of that is Current request's User name and that user has some identity i.e some name so here comes the IIdentity

So for Forms authentication first we have to create an Identity of that user (Here User means current request's owner i.e client)So we create IIdentity. For creating IIdentity there is a class GenericIdentity so create a object of GenericIdentity and pass a User name of the user.

So for today stop here next we will see tomorrow.

No comments: