示例#1
0
        protected virtual void TryAssociateAccountWithExternalAccount(Customer customer)
        {
            var parameters = ExternalAuthorizerHelper.RetrieveParametersFromRoundTrip(true);

            if (parameters == null)
            {
                return;
            }

            if (_openAuthenticationService.AccountExists(parameters))
            {
                return;
            }

            _openAuthenticationService.AssociateExternalAccountWithUser(customer, parameters);
        }
 /// <summary>
 /// Check that account exists
 /// </summary>
 /// <param name="parameters">Open authentication parameters</param>
 /// <returns>True if it exists; otherwise false</returns>
 public bool AccountExists(OpenAuthenticationParameters parameters)
 {
     return(_openAuthenticationService.AccountExists(parameters));
 }