/// <summary>
        ///   Initiate a new instance. The token will be refreshed once it expires.
        ///   The initialToken will be updated with the new values on refresh!
        /// </summary>
        public PKCEAuthenticator(string clientId, PKCETokenResponse initialToken)
        {
            Ensure.ArgumentNotNull(clientId, nameof(clientId));
            Ensure.ArgumentNotNull(initialToken, nameof(initialToken));

            InitialToken = initialToken;
            ClientId     = clientId;
        }
Esempio n. 2
0
 public void SerializeConfig(PKCETokenResponse data)
 {
     using (StreamWriter file = new StreamWriter(Path, false))
     {
         XmlSerializer controlsDefaultsSerializer = new XmlSerializer(typeof(PKCETokenResponse));
         controlsDefaultsSerializer.Serialize(file, data);
         file.Close();
     }
 }