Beispiel #1
0
        public string GetAuthTicket(string customData = null)
        {
            initAuthentication         itm      = CreateInitRequest(customData);
            initAuthenticationResponse response = proxy.initAuthentication(itm);

            if (response == null || response.authenticationResponse == null)
            {
                return(String.Empty);
            }
            return(response.authenticationResponse.ticket);
        }
Beispiel #2
0
        private initAuthentication CreateInitRequest(string customData = null)
        {
            authenticationRequest request = new authenticationRequest();

            request.id = uniqueNodeId;
            initAuthentication itm = new initAuthentication(request);

            itm.authenticationRequest.pid             = CustomAppSettings.ViispPid;
            itm.authenticationRequest.customData      = customData;
            itm.authenticationRequest.postbackUrl     = CustomAppSettings.ViispPostBack;
            itm.authenticationRequest.userInformation = new userInformation[]
            {
                userInformation.firstName,
                userInformation.lastName,
                userInformation.companyName
            };
            if (HttpContext.Current.IsDebuggingEnabled)
            {
                itm.authenticationRequest.authenticationProvider = new authenticationProvider[]
                {
                    authenticationProvider.authltidentitycard,
                    authenticationProvider.authltbank
                };
            }
            else
            {
                itm.authenticationRequest.authenticationProvider = new authenticationProvider[]
                {
                    authenticationProvider.authltidentitycard,
                    authenticationProvider.authltbank,
                    authenticationProvider.authsignatureProvider,
                    authenticationProvider.authltgovernmentemployeecard
                };
            };

            itm.authenticationRequest.authenticationAttribute = new authenticationAttribute[]
            {
                authenticationAttribute.ltpersonalcode,
                authenticationAttribute.ltcompanycode,
                authenticationAttribute.ltgovernmentemployeecode
            };

            return(itm);
        }