Esempio n. 1
0
        internal static void RegisterProvider(IAVAuthenticationProvider provider)
        {
            authProviders[provider.AuthType] = provider;
            var curUser = AVUser.CurrentUser;

            if (curUser != null)
            {
                curUser.SynchronizeAuthData(provider);
            }
        }
Esempio n. 2
0
        private void SynchronizeAuthData(IAVAuthenticationProvider provider)
        {
            bool restorationSuccess = false;

            lock (mutex) {
                var authData = AuthData;
                if (authData == null || provider == null)
                {
                    return;
                }
                IDictionary <string, object> data;
                if (authData.TryGetValue(provider.AuthType, out data))
                {
                    restorationSuccess = provider.RestoreAuthentication(data);
                }
            }

            if (!restorationSuccess)
            {
                this.UnlinkFromAsync(provider.AuthType, CancellationToken.None);
            }
        }
Esempio n. 3
0
 internal static void RegisterProvider(IAVAuthenticationProvider provider)
 {
     authProviders[provider.AuthType] = provider;
     var curUser = AVUser.CurrentUser;
     if (curUser != null)
     {
         curUser.SynchronizeAuthData(provider);
     }
 }
Esempio n. 4
0
        private void SynchronizeAuthData(IAVAuthenticationProvider provider)
        {
            bool restorationSuccess = false;
            lock (mutex)
            {
                var authData = AuthData;
                if (authData == null || provider == null)
                {
                    return;
                }
                IDictionary<string, object> data;
                if (authData.TryGetValue(provider.AuthType, out data))
                {
                    restorationSuccess = provider.RestoreAuthentication(data);
                }
            }

            if (!restorationSuccess)
            {
                this.UnlinkFromAsync(provider.AuthType, CancellationToken.None);
            }
        }
 private void SynchronizeAuthData(IAVAuthenticationProvider provider)
 {
     bool flag = false;
     lock (this.mutex)
     {
         IDictionary<string, IDictionary<string, object>> local_2 = this.AuthData;
         if (!this.IsCurrentUser || local_2 == null || provider == null)
             return;
         IDictionary<string, object> local_0;
         if (local_2.TryGetValue(provider.AuthType, out local_0))
             flag = provider.RestoreAuthentication(local_0);
     }
     if (flag)
         return;
     this.UnlinkFromAsync(provider.AuthType, CancellationToken.None);
 }
 internal static void RegisterProvider(IAVAuthenticationProvider provider)
 {
     AVUser.authProviders[provider.AuthType] = provider;
     AVUser currentUser = AVUser.CurrentUser;
     if (currentUser == null)
         return;
     currentUser.SynchronizeAuthData(provider);
 }