Exemple #1
0
        public string GetToken(ILog log)
        {
            var receipt  = GoogleHttpRequests.GetReceipt(log);
            var token    = VkHttpRequests.GetNonRefreshedToken(log);
            var newToken = VkHttpRequests.RefreshToken(token, receipt, log);

            log.Info($"success! fresh token [{newToken}]");
            return(newToken);
        }
Exemple #2
0
 public VkTokenReceiver(FileCache <GoogleCredentials> credentialsCache, VkHttpRequests vkHttpRequests, GoogleHttpRequests googleHttpRequests)
 {
     CredentialsCache   = credentialsCache;
     VkHttpRequests     = vkHttpRequests;
     GoogleHttpRequests = googleHttpRequests;
 }