public GoogleCredentials GetCredentials(ILog log) { if (CredentialsCache.Value != null) { return(CredentialsCache.Value); } var protobuf = GoogleHttpRequests.GetCheckIn(log); log.Debug($"parse protobuf response"); var googleCredentials = new ProtobufParser(protobuf).Parse(); MTalk.SendRequest(googleCredentials, log); log.Info($"success! {googleCredentials}"); CredentialsCache.Value = googleCredentials; return(CredentialsCache.Value); }
public AndroidAuth(FileCache <GoogleCredentials> credentialsCache, MTalk mTalk, GoogleHttpRequests googleHttpRequests) { CredentialsCache = credentialsCache; MTalk = mTalk; GoogleHttpRequests = googleHttpRequests; }