Ejemplo n.º 1
0
        internal bool AuthenticateAccess(string FCMBAppKey, string FCMBSecretKey)
        {
            //    var ipEntry = Dns.GetHostEntry(Dns.GetHostName());
            //    IPAddress[] addr = ipEntry.AddressList;
            AuthenticationRequest authenticationRequest = new AuthenticationRequest();

            authenticationRequest.AppID  = FCMBAppKey;
            authenticationRequest.Appkey = FCMBSecretKey;
            //authenticationRequest.ClientIP = addr[2].ToString();
            GeneralEntity generalEntity = new GeneralEntity();

            return(generalEntity.isClientAuthenticated(authenticationRequest) ? true : false);
        }
Ejemplo n.º 2
0
        internal bool AuthenticateAccess(string[] auth, string clientIP)
        {
            var ipEntry = Dns.GetHostEntry(Dns.GetHostName());

            IPAddress[]           addr = ipEntry.AddressList;
            AuthenticationRequest authenticationRequest = new AuthenticationRequest();

            authenticationRequest.AppID    = auth[0];
            authenticationRequest.Appkey   = auth[1];
            authenticationRequest.ClientIP = clientIP;
            GeneralEntity generalEntity = new GeneralEntity();

            return(generalEntity.isClientAuthenticated(authenticationRequest) ? true : false);
        }