We've created a custom forms login page that successfully authenticates fba users.
The problem is that windows users who are already logged into the network and sitting at their desks will access the site using their domain credentials. I don't want them to pick between logging in as forms users or as windows user.
How can I programmatically create a token from a Windows Identity. For a forms user it's done this way:
SecurityToken token = SPSecurityContext.SecurityTokenForFormsAuthentication(new Uri(SPContext.Current.Web.Url), "Ext", "ExtRole", userName, password);
SPFederationAuthenticationModule.Current.SetPrincipalAndWriteSessionToken(token);
I assume it would require a call to the security token service using the identity of the logged in windows user.
SecurityToken token = getTokenFromSTS();
SPFederationAuthenticationModule.Current.SetPrincipalAndWriteSessionToken(token);
Thoughts?
Thanks
Nate