public void AddOrUpdateProfile(DateTime start)
        {
            MultipleProfile multipleProfile = getMultipleProfile();

            multipleProfile.AddOrUpdateProfile(environment.oktaProfile, environment.awsRoleToAssume, start);

            using (var fileWriter = FileHelper.GetWriter(FileHelper.GetOktaDirectory(), "profiles"))
            {
                multipleProfile.Save(fileWriter);
            }
        }
 /**
  * Gets the current session file's path
  *
  * @return A {@link Path} for the current session file
  * @throws IOException
  */
 private string GetSessionPath()
 {
     return(FileHelper.ResolveFilePath(FileHelper.GetOktaDirectory(), ".current-session"));
 }
 private string GetMultipleProfilesPath()
 {
     return(FileHelper.GetFilePath(FileHelper.GetOktaDirectory(), "profiles"));
 }
        private MultipleProfile getMultipleProfile()
        {
            var reader = FileHelper.GetReader(FileHelper.GetOktaDirectory(), "profiles");

            return(new MultipleProfile(reader));
        }
        /**
         * Get the path for the cookies file
         *
         * @return A {@link Path} to the cookies.properties file
         * @throws IOException
         */
        private static string GetCookiesFilePath()
        {
            var filePath = FileHelper.GetFilePath(FileHelper.GetOktaDirectory(), "cookies.properties");

            return(filePath);
        }