클레임 인증 (ADFS & STS)
-
09-12-2019 - |
문제
3-4 하위 사이트에 대해 1 개의 하위 사이트 및 SSO 구현을위한 ADFS 인증 메커니즘을 가질 수 있습니까? 나는 청구 기반 인증을 사용하고 있습니다. adfs는 이미 구성되어 있습니다. 나는 1 개의 웹 응용 프로그램을 가지고 있고 약 12 개의 하위 사이트가 있습니다. 두 하위 사이트는 1 클라이언트를 나타냅니다. 이제 2 명의 클라이언트에 대한 SSO를 구현하고 휴식 클라이언트가 2 인증 공급자가 2 인 인증 공급자 STS & ADFS.I가 를 갖는 경우 청구를 위해 ADFS.But에서 작동해야합니다.
SSO는이 페이지를 사용하고 싶지 않습니다. 대신 자격 증명없이 SharePoint 사이트로 직접 가져와야합니다. ADFS 로그인 페이지로 ADFS를 가져와야합니다 .FYI I SAML 2.0을 사용하여 SAML 1.1 변환을 사용하여 구현합니다.SSO
해결책 2
Finally i got it to work :
SPWebApplication app = SPContext.Current.Site.WebApplication;
SPAlternateUrl u = app.AlternateUrls[Request.Url];
SPUrlZone zone = u.UrlZone;
SPIisSettings settings = app.IisSettings[zone];
string components = Request.Url.GetComponents(UriComponents.Query, UriFormat.SafeUnescaped);
string AuthProviderString;
if (flag == 1)
AuthProviderString = "SAML_STS";
else
AuthProviderString = "Staging External Users";
foreach (SPAuthenticationProvider provider in settings.ClaimsAuthenticationProviders)
{
if (string.Compare(provider.DisplayName, AuthProviderString, true, System.Globalization.CultureInfo.CurrentUICulture) == 0
|| string.Compare(provider.ClaimProviderName, AuthProviderString, true, System.Globalization.CultureInfo.CurrentUICulture) == 0)
{
string url = provider.AuthenticationRedirectionUrl.ToString();
SPUtility.Redirect(url, SPRedirectFlags.Default, this.Context, components);
}
}
다른 팁
Authentication is managed at the web application level only. It is not possible to have sites within the same web application use different authentication providers unless the entire application supports those providers.
Maybe this article will help: http://msdn.microsoft.com/en-us/library/hh237665.aspx