Beispiel #1
0
        // loadPrivateData loads private data (i.e., username, password, etc.) from a file
        private PrivateData loadPrivateData()
        {
            if (File.Exists(PRIVATE_DATA_FILENAME))
            {
                string rawJSON = File.ReadAllText(PRIVATE_DATA_FILENAME);
                return(new PrivateData(rawJSON));
            }

            // Create a default private data file that can be manually edited
            privateData = new PrivateData();
            savePrivateData();

            return(new PrivateData());
        }
Beispiel #2
0
 public Authentication()
 {
     // Load any saved settings
     this.privateData   = loadPrivateData();
     this.userPrincipal = new UserPrincipalResponse();
 }