Exemple #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);
        }
Exemple #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);
        }