コード例 #1
0
        internal static void RegisterProvider(IParseAuthenticationProvider provider)
        {
            authProviders[provider.AuthType] = provider;
            var curUser = ParseUser.CurrentUser;

            if (curUser != null)
            {
                curUser.SynchronizeAuthData(provider);
            }
        }
コード例 #2
0
        private void SynchronizeAuthData(IParseAuthenticationProvider 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);
            }
        }
コード例 #3
0
ファイル: ParseUser.cs プロジェクト: cnbcyln/Parse-SDK-dotNET
 internal static void RegisterProvider(IParseAuthenticationProvider provider) {
   authProviders[provider.AuthType] = provider;
   var curUser = ParseUser.CurrentUser;
   if (curUser != null) {
     curUser.SynchronizeAuthData(provider);
   }
 }
コード例 #4
0
ファイル: ParseUser.cs プロジェクト: cnbcyln/Parse-SDK-dotNET
    private void SynchronizeAuthData(IParseAuthenticationProvider 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);
      }
    }