如何設定單一 Sign-On

在存取「企業單一登入」之前,您應該確認目前的使用者已正確設定「企業單一登入」。 對於大部分的組態,您會使用兩個介面的其中一個。 ISSOAdmin 是可讓您建立新關聯應用程式的一般管理介面。 不過,藉由使用 ISSOAdmin.GetGlobalInfo 和 ISSOAdmin.UpdateGlobalInfo,您可以設定各種旗標和管理值。 如下所述的一項可能工作就是確保已經啟用 SSO 票證。

若要啟用票證

  1. 建立 ISSOAdmin 的新執行個體。

  2. 透過 ISSOAdmin.GetGlobalInfo 擷取目前的設定。

    如有需要,您可能要在此時確認旗標已設定為正確的值。

  3. 使用 ISSOAdmin.UpdateGlobalInfo 變更任何相關的旗標。

    在本個案中,所有旗標均會設為驗證並啟用票證。

    下列範例顯示如何使用「單一登入」啟用票證。

public static bool EnableTickets()  
{  
   try  
   {  
      ISSOAdmin admin=new ISSOAdmin();  
      int flags=0;  
      int appDeleteMax=1000;  
      int mappingDeleteMax=1000;  
      int ntpLookupMax=-1000;  
      int xplLookupMax=-1000;  
      int ticketTimeout=2;  
      int cacheTimeout=60;  
      string secretServer=null;  
      string ssoAdminGroup=null;  
      string affiliateAppMgrGroup=null;  
      // Get current default settings.  
      admin.GetGlobalInfo(out flags, out appDeleteMax, out mappingDeleteMax, out ntpLookupMax, out xplLookupMax, out ticketTimeout, out cacheTimeout, out secretServer, out ssoAdminGroup, out affiliateAppMgrGroup);  
      // Update global settings.  
      admin.UpdateGlobalInfo(SSOFlag.SSO_FLAG_ALLOW_TICKETS | SSOFlag.SSO_FLAG_VALIDATE_TICKETS, SSOFlag.SSO_FLAG_ALLOW_TICKETS | SSOFlag.SSO_FLAG_VALIDATE_TICKETS, ref appDeleteMax, ref mappingDeleteMax, ref ntpLookupMax, ref xplLookupMax, ref ticketTimeout, ref cacheTimeout, null, null, null);   
   }  
   catch  
   {  
      return false;  
   }  
return true;  
}  

另請參閱

企業單一登入程式設計