Lately I had to create a login functionality to an ASP.NET Web application from a coldfusion (or HTML) page and not using the ASP.NET Membership login control, therefor I had two choices: 1) either by implementing the IIdentity interface or by creating a GenericIdentity class as below which I thought it is easier to implmenet.
Therefore, I passed the userid and password (in a SSL environment) to a GenericIdentity object. Then we create a new GenericPrincipal object and assign it to the current thread.