مصادقة المطالبات (ADFS & STS)
-
09-12-2019 - |
سؤال
هل يمكنني الحصول على آلية مصادقة ADFS للحصول على 1 فرعية وتنفيذ SSO لمدة 3-4 فرعية؟ أنا أستخدم المصادقة القائمة على المطالبات. لدي ADFS تم تكوينها بالفعل. لدي WebApplication 1 ولديها حوالي 12 فرعية. الآن أخطط لتنفيذ SSO لعملاء عملاء واحتياجات راحة العملاء للعمل مع ADF.But للمطالبات إذا كان لدي 2 مزود مصادقة STS و ADFS.I سيحصل على
لا أريد استخدام SSO هذه الصفحة، بدلا من ذلك، يجب أن تؤخذ مباشرة إلى موقع SharePoint دون بيانات اعتماد. يجب أن تؤخذ ADFS إلى صفحة تسجيل الدخول ADFS .FYI I أنا باستخدام SAML 2.0 إلى SAML 1.1 التحويل إلى SAML 1.1SSO
المحلول 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