public static void Login() { NTPCLibrary.OpenID openId = new NTPCLibrary.OpenID(); if (!openId.IsAuthenticated) { openId.Login(); } else { Util.SetCookie(Util.OPENID_THIS_WEBSITE_COOKIE, "true"); } }
public static void MultiLogin() { NTPCLibrary.OpenID openId = new NTPCLibrary.OpenID(); if (!openId.IsAuthenticated) { openId.Login(); } else { if (Util.GetCookie(Util.OPENID_SELECT_USER_COOKIE) == string.Empty) { Util.SetCookie(Util.OPENID_THIS_WEBSITE_COOKIE, "true"); //多學校、多角色權限判斷 LoginMultiView(openId.User); } } }
public static void ExtensionLogin(string[] roleUser) { NTPCLibrary.OpenID openId = new NTPCLibrary.OpenID(); if (!openId.IsAuthenticated) { openId.Login(); } else { if (Util.GetCookie(Util.OPENID_ROLE_COOKIE) == string.Empty) { Util.SetCookie(Util.OPENID_THIS_WEBSITE_COOKIE, "true"); //擴充權限判斷 LoginExtensionView(openId.User, roleUser); } } }