Example #1
0
 protected void OnPlayerAuthorize(AuthorizeEventArgs args)
 {
     if (PlayerAuthorize != null)
     {
         PlayerAuthorize(args);
     }
 }
Example #2
0
 protected static void OnAuthorize(AuthorizeEventArgs args)
 {
     if (Authorize != null)
     {
         Authorize(args);
     }
 }
Example #3
0
        internal static void OnAuthorize(Player player)
        {
            AuthorizeEventArgs auth = new AuthorizeEventArgs(player);

            OnAuthorize(auth);
            player.OnPlayerAuthorize(auth);

            player.ReloadPrivileges();
        }
Example #4
0
        private void HandleAuthorize(IntPtr resource, IntPtr username, IntPtr password)
        {
            AuthorizeEventArgs args = new AuthorizeEventArgs(resource, username, password);

            if (CheckAuthority != null)
            {
                CheckAuthority(this, args);
            }
            else
            {
                thow new ApplicationException("You must provide credentials");
            }
        }
Example #5
0
        /// <summary>
        /// 用户登录方法
        /// </summary>
        private void LoginView_Submit(object sender, AuthorizeEventArgs e)
        {
            string userName = LoginView.UserName;
            string password = LoginView.Password;

            if (ValidationUserInfo(userName, password))
            {
                ////同域单点登录
                //SSOSameDomain sso = new SSOSameDomain(e.Page);
                //sso.LogIn("CookiesTest", new TimeSpan(0, 1, 0), userName);

                //跨域单点登录
                SSOCrossDomain cross = new SSOCrossDomain(e.Page);
                cross.LogIn("CookiesTest", new TimeSpan(0, 1, 0), userName);
            }
        }
Example #6
0
 protected void OnPlayerAuthorize(AuthorizeEventArgs args)
 {
     if (PlayerAuthorize != null) {
         PlayerAuthorize(args);
     }
 }
Example #7
0
 protected static void OnAuthorize(AuthorizeEventArgs args)
 {
     if (Authorize != null) {
         Authorize(args);
     }
 }
Example #8
0
        internal static void OnAuthorize(Player player)
        {
            AuthorizeEventArgs auth = new AuthorizeEventArgs(player);
            OnAuthorize(auth);
            player.OnPlayerAuthorize(auth);

            player.ReloadPrivileges();
        }
		private void HandleAuthorize (IntPtr resource, IntPtr username, IntPtr password)
		{
			AuthorizeEventArgs args = new AuthorizeEventArgs (resource, username, password);
			if (CheckAuthority != null)
				CheckAuthority (this, args);
			else
				thow new ApplicationException ("You must provide credentials");
		}