Exemple #1
0
        /// <summary>
        /// Handle for the Login Information
        /// </summary>
        /// <param name="challenge">The acctually handle response for the Login</param>
        public override void HandleChallenge(WorklightResponse challenge = null)
        {
#if DEBUG
            Debug.WriteLine("We were challenged.. so we are handling it");
#endif
            var parms = new Dictionary <string, string>();
            parms.Add("j_username", "worklight");
            parms.Add("j_password", "password");

            LoginFormParameters    = new LoginFormInfo("j_security_check", parms, null, 30000, "post");
            _shouldSubmitLoginForm = true;

            //this is for Adapter based authentication
            if (challenge.ResponseJSON["authRequired"] == true)
            {
                AdapterAuthenticationInfo        AdapterAuthenticationParameters = new AdapterAuthenticationInfo();
                WorklightProcedureInvocationData invocationData = new WorklightProcedureInvocationData("HTTP",
                                                                                                       "submitAuthentication", new object[1]);
                AdapterAuthenticationParameters.InvocationData = invocationData;
                AdapterAuthenticationParameters.RequestOptions = null;
            }
            else
            {
                _isAdapterAuth = false;
                _authSuccess   = true;
            }
        }
        public override void HandleChallenge(WorklightResponse challenge)
        {
            Console.WriteLine("We were challenged.. so we are handling it");
            Dictionary <String, String> parms = new Dictionary <String, String> ();

            parms.Add("j_username", "worklight");
            parms.Add("j_password", "password");
            LoginFormParameters   = new LoginFormInfo("j_security_check", parms, null, 30000, "post");
            shouldSubmitLoginForm = true;
            //authSuccess = true;
            //this is for Adapter based authentication
            //            if (challenge.ResponseJSON["authRequired"] == true)
            //            {
            //				AdapterAuthenticationInfo AdapterAuthenticationParameters = new AdapterAuthenticationInfo();
            //                WorklightProcedureInvocationData invocationData = new WorklightProcedureInvocationData("HTTP",
            //                    "submitAuthentication" , new object[1]);
            //				AdapterAuthenticationParameters.InvocationData = invocationData;
            //				AdapterAuthenticationParameters.RequestOptions = null;
            //            }
            //            else
            //            {
            //				isAdapterAuth = false;
            //				authSuccess = true;
            //            }
        }
 public override void HandleChallenge(WorklightResponse challenge)
 {
     Console.WriteLine ("We were challenged.. so we are handling it");
     Dictionary<String,String > parms = new Dictionary<String, String> ();
     parms.Add ("j_username", "admin");
     parms.Add ("j_password", "admin");
     LoginFormParameters = new LoginFormInfo ("j_security_check", parms, null, 30000, "post");
     shouldSubmitLoginForm = true;
 }
Exemple #4
0
        public override void HandleChallenge(WorklightResponse challenge)
        {
            Console.WriteLine("We were challenged.. so we are handling it");
            Dictionary <String, String> parms = new Dictionary <String, String> ();

            parms.Add("j_username", "admin");
            parms.Add("j_password", "admin");
            LoginFormParameters   = new LoginFormInfo("j_security_check", parms, null, 30000, "post");
            shouldSubmitLoginForm = true;
        }
 public override void HandleChallenge(WorklightResponse challenge)
 {
     Console.WriteLine ("We were challenged.. so we are handling it");
     Dictionary<String,String > parms = new Dictionary<String, String> ();
     parms.Add ("j_username", "worklight");
     parms.Add ("j_password", "password");
     LoginFormParameters = new LoginFormInfo ("j_security_check", parms, null, 30000, "post");
     shouldSubmitLoginForm = true;
     //authSuccess = true;
     //this is for Adapter based authentication
     //            if (challenge.ResponseJSON["authRequired"] == true)
     //            {
     //				AdapterAuthenticationInfo AdapterAuthenticationParameters = new AdapterAuthenticationInfo();
     //                WorklightProcedureInvocationData invocationData = new WorklightProcedureInvocationData("HTTP",
     //                    "submitAuthentication" , new object[1]);
     //				AdapterAuthenticationParameters.InvocationData = invocationData;
     //				AdapterAuthenticationParameters.RequestOptions = null;
     //            }
     //            else
     //            {
     //				isAdapterAuth = false;
     //				authSuccess = true;
     //            }
 }