예제 #1
0
        private async Task <Session> CreateTestAppAsync(AuthReq authReq)
        {
            (uint _, string reqMsg) = await Session.EncodeAuthReqAsync(authReq);

            IpcReq ipcReq = await _authenticator.DecodeIpcMessageAsync(reqMsg);

            AuthIpcReq authIpcReq = ipcReq as AuthIpcReq;
            string     resMsg     = await _authenticator.EncodeAuthRespAsync(authIpcReq, true);

            IpcMsg ipcResponse = await Session.DecodeIpcMessageAsync(resMsg);

            AuthIpcMsg authResponse = ipcResponse as AuthIpcMsg;

            return(await Session.AppRegisteredAsync(authReq.App.Id, authResponse.AuthGranted));
        }
예제 #2
0
        public RequestDetailViewModel(IpcReq req)
        {
            var requestType = req.GetType();

            if (requestType == typeof(AuthIpcReq))
            {
                _authReq  = req as AuthIpcReq;
                PageTitle = "Authentication Request";
                ProcessAuthRequestData();
            }
            else if (requestType == typeof(ContainersIpcReq))
            {
                _containerReq = req as ContainersIpcReq;
                PageTitle     = "Container Request";
                ProcessContainerRequestData();
            }
            else if (requestType == typeof(ShareMDataIpcReq))
            {
                _shareMdReq    = req as ShareMDataIpcReq;
                PageTitle      = "Share MData Request";
                IsMDataRequest = true;
                ProcessMDataRequestData();
            }
        }