I want to implement single sign on between an asp.net application and an existing SharePoint web application which is claims authentication enabled.
- asp.net application is farm authentication enabled and itauthenticate users from sql server database.
- i created a custom STS service using asp.net security token serviceapplication using windows identity foundation in
customsecuritytokenservicce
class methods inGetOutputClaimsIdentity
i added emailoutputIdentity.Claims.Add(new Claim(ClaimTypes.Email , "adil@test.com"));
to issue email claim
i added sts reference to asp.net application
the same sts i registered using powershell to my sharepoint web application
$cert=New-object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\SPPROJECTS\STS\stscert.cer")$map1 = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" -IncomingClaimTypeDisplayName "EmailAddress" -SameAsIncoming$map2 = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" -IncomingClaimTypeDisplayName "Role" -SameAsIncoming$realm = "http://sp2010/_trust/default.aspx"$ap=New-SPTrustedIdentityTokenIssuer -Name "STSPRO" -Description "Our Fancy CustomSTS" -Realm $realm -ClaimsMappings $map1,$map2 -ImportTrustCertificate $cert -SignInUrl "https://localhost:96/login.aspx" -IdentifierClaim $map1.InputClaimTypeNew-SPTrustedRootAuthority -Name "sp2010" -Certificate $cert
now when i open sharepoint site it shows two authenction opetions to login to sharepoint site, when i login using customsts i able to login to sharepoint site andit shows adil@test.com user , before that i added this user in sharepoint as administrator.
Now here
- How to wirte code the custom sts can validate user from sql server
- how i do or implement single sign on from asp.net to sharepoint site
when user authenticated to asp.net application and when user goes to sharepoint site from asp.net it would not ask authentication