如何判斷目前的單一 Sign-On 存取
您需要為使用者執行的其中一個首要工作,就是判斷已為目前的使用者設定哪些附屬應用程式。 您可以呼叫 ISSOMapper.GetApplications 以執行此查詢。
若要查詢單一登入資料庫中目前使用者可用的應用程式
建立
ISSOMapper
的新執行個體。一般來說,
ISSOMapper
是設計來從單一 Sign-On (SSO) 取得資訊的介面。 您很可能會在許多類似的查詢中使用ISSOMapper
。呼叫 GetApplications 以擷取所有與目前使用者有關的應用程式。
GetApplications 只會自動傳回目前使用者的附屬應用程式。
下列程式碼範例將示範如何查詢「單一登入」資料庫。
private static string[] Applications=null;
. . .
public static string[] GetCurrentUserApplications()
{
if(Applications==null)
{
string[] descs;
string[] contacts;
ISSOMapper mapper=new ISSOMapper();
mapper.GetApplications(out Applications, out descs, out contacts);
}
return Applications;
}