示例#1
0
        static public bool ApiKeyAuthenticator(string apiKey)
        {
            UserDataBase UDBobj = new UserDataBase();
            int          Adminid;

            if (int.TryParse(apiKey, out Adminid))
            {
                if (UDBobj.GetValidUser(Adminid) || Adminid == 1234)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }