2
votes

We have a Single sign-on (SSO) web app used to authenticate users in different applications based on a username and password. It then generates a random token and saves it in the database.

To authenticate users in other apps, we have an http module running on every request, which verifies the token and sets the context user like this:

WindowsIdentity identity = new WindowsIdentity(currentUsername, "WindowsAuthentication");
WindowsPrincipal principal = new WindowsPrincipal(identity);
this.context.User = principal;

This method works in Sharepoint 2010 (configured with Windows Authentication). However this doesn't work with the new Sharepoint 2013 (configured with Windows Authentication as well).

  1. Do you have any idea why this method doesn't work anymore in Sharepoint 2013?
  2. Do you have any suggestions for what I can try to make this work?
  3. Do you have any suggestions for a different method of authentication for Sharepoint 2013?
1

1 Answers

0
votes

This looks like a use case for writing a custom claims provider to me.

http://msdn.microsoft.com/en-us/library/ee537299.aspx

Basically when a call is made to sharpoint, its going to redirect it to a custom claims service. here your code will run which will authenticate the user and issue a token. This token will be honored by SP2013 because you have established a trust relationship between SP2013 and claims provider.