在访问企业单点登录之前,您应确保为当前用户正确设置 Enterprise Single Sign-On。 对于大多数配置,请使用两个接口之一。
ISSOAdmin 是一般管理界面,可用于创建新的附属应用程序。 但是,通过使用 ISSOAdmin.GetGlobalInfo 和 ISSOAdmin.UpdateGlobalInfo,可以设置各种标志和管理值。 根据以下步骤说明,一个可能的任务是确保已启用SSO票务功能。
启用票证
创建
ISSOAdmin的一个新实例。检索当前设置通过
ISSOAdmin.GetGlobalInfo。如有必要,你可能希望确认标志已设置为此时的正确值。
使用
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;
}