public IOSAccessTokenProvider(GoogleDriveSettings googleDriveSettings) { settings = googleDriveSettings; accessTokenRefresher = new AccessTokenRefresher(settings.UriSchemeClientCredentials); accessTokenRefresher.OnDone += HandleAccessTokenRefreshed; authCodeExchanger = new AuthCodeExchanger(settings, settings.UriSchemeClientCredentials); authCodeExchanger.OnDone += HandleAuthCodeExchanged; }
public LoopbackAccessTokenProvider(GoogleDriveSettings googleDriveSettings) { settings = googleDriveSettings; unitySyncContext = SynchronizationContext.Current; accessTokenRefresher = new AccessTokenRefresher(settings.GenericClientCredentials); accessTokenRefresher.OnDone += HandleAccessTokenRefreshed; authCodeExchanger = new AuthCodeExchanger(settings, settings.GenericClientCredentials); authCodeExchanger.OnDone += HandleAuthCodeExchanged; }
public LoopbackAccessTokenProvider(GoogleDriveSettings googleDriveSettings) { settings = googleDriveSettings; accessTokenRefresher = new AccessTokenRefresher(settings); accessTokenRefresher.OnDone += HandleAccessTokenRefreshed; authCodeExchanger = new AuthCodeExchanger(settings); authCodeExchanger.OnDone += HandleAuthCodeExchanged; }
public LuminAccessTokenProvider(GoogleDriveSettings googleDriveSettings) { settings = googleDriveSettings; unitySyncContext = SynchronizationContext.Current; accessTokenRefresher = new AccessTokenRefresher(settings.GenericClientCredentials); accessTokenRefresher.OnDone += HandleAccessTokenRefreshed; limitedDeviceExchanger = new LimitedDeviceExchanger(settings, settings.GenericClientCredentials); limitedDeviceExchanger.OnDone += HandleLimitedDeviceExchanged; deviceCodeExchanger = new DeviceCodeExchanger(settings, settings.GenericClientCredentials); deviceCodeExchanger.OnDone += HandleDeviceCodeExchanged; }
private void HandleAccessTokenRefreshed (AccessTokenRefresher refresher) { if (refresher.IsError) { if (Debug.isDebugBuild) { var message = "UnityGoogleDrive: Failed to refresh access token; executing full auth procedure."; if (!string.IsNullOrEmpty(refresher.Error)) message += string.Format("\nDetails: {0}", refresher.Error); Debug.Log(message); } ExecuteFullAuth(); } else { settings.CachedAccessToken = refresher.AccesToken; HandleProvideAccessTokenComplete(); } }