Пример #1
0
        /*--------------------------------------------------------------------------------------------*/
        private static IApiResponse PostLoginScope(IApiRequest pApiReq, bool pAllow)
        {
            Action <IApiResponse> getResp = (apiResp => {
                string client = pApiReq.GetQueryValue(LoginClientIdParam, false);
                string redirUri = pApiReq.GetQueryValue(LoginRedirectUriParam, false);

                var op = new OauthLoginPostOperation();
                OauthLoginResult result = op.ExecuteScope(pApiReq.OpCtx, new OauthLoginTasks(),
                                                          client, redirUri, pAllow);

                apiResp.RedirectUrl = BuildRedirectUri(result.Redirect, result.Code,
                                                       pApiReq.GetQueryValue(LoginStateParam, false));
            });

            var exec = new CustomExecutor(pApiReq, getResp, OnLoginException);

            return(exec.Execute());
        }
        /*--------------------------------------------------------------------------------------------*/
        private OauthLoginResult ExecuteScope()
        {
            var op = new OauthLoginPostOperation();

            return(op.ExecuteScope(OpCtx, vTasks, vClientId, vRedirUri, vAllowScope));
        }
Пример #3
0
 /*--------------------------------------------------------------------------------------------*/
 private void DoExecuteScope()
 {
     vExecuteResult = vOper.ExecuteScope(vMockOpCtx.Object, vMockTasks.Object,
                                         vClientId, vRedirUri, vAllowScope);
 }