public AccountApiController(ISecureDataFormat<AuthenticationTicket> accessTokenFormat, IAccountProvider accountManager, IAuthenticationManager authenticationManager, AppUserManager appUserManager)
 {
     AccessTokenFormat = accessTokenFormat;
     AccountManager = accountManager;
     AccountManager.AuthenticationManager = authenticationManager;
     AccountManager.UserManager = appUserManager;
     AccountManager.UrlManager = Url;
     AccountManager.StartupPublicClientId = Startup.PublicClientId;
 }
 public static IAccountProvider GetAccountProvider()
 {
     Lock.EnterReadLock();
     try
     {
         {
             if (_provider == null)
             {
                 if (Configuration.IsMock)
                     _provider = new MockAccountProvider();
                 else
                     _provider = new AccountProvider(AuthenticationProviderFactory.GetAuthenticationProvider(),
                                                     CaptchaProviderFactory.GetCaptchaProvider(),
                                                     EmailProviderFactory.GetEmailProvider(),
                                                     MobileProviderFactory.GetMobileProvider());
             }
         }
     }
     finally
     {
         Lock.ExitReadLock();
     }
     return _provider;
 }
Exemple #3
0
 public Handler(CustomDbContext dbContext, IAccountProvider accountProvider)
 {
     this.dbContext       = dbContext;
     this.accountProvider = accountProvider;
 }
Exemple #4
0
 public GetBalanceCommand(IRippleRestClient client, IAccountProvider defaultAccountProvider)
 {
     this.client = client;
     this.defaultAccountProvider = defaultAccountProvider;
 }
 public HomeWorksProvider(IAccountProvider accountProvider)
 {
     _accountProvider = accountProvider;
 }
Exemple #6
0
 /// <summary>
 /// Initializes the provider.
 /// </summary>
 /// <param name="providerString">
 /// E.g. "Fan.Admins.SqlAccountProvider, Fan.Admins"
 /// </param>
 public static void Initialize(string providerString)
 {
     if (Provider == null)
     {
         lock (_lock)
         {
             if (Provider == null)
             {
                 Provider = Activator.CreateInstance(Type.GetType(providerString)) as IAccountProvider;
                 if (Provider == null) throw new ProviderException(string.Format("Failed to load '{0}'.", providerString));
             }
         }
     }
 }
 public UserServiceUoW(string userId, IAccountProvider accountProvider)
 {
     DbContext = new CustomApplicationDbContext();
     UserRole = GetUserRole(userId);
     UserRepository = new UserRepository(DbContext, userId, accountProvider);
 }
Exemple #8
0
 public Handler(IAccountProvider accountProvider, CustomDbContext dbContext)
 {
     this.accountProvider = accountProvider;
     this.dbContext       = dbContext;
 }
Exemple #9
0
 public Login()
 {
     this.accountProvider = DependencyService.Resolve <IAccountProvider>();
     InitializeComponent();
     var loginState = new LoginViewModel();
 }
 public InventoryViewModel(IAccountProvider accountProvider)
 {
     Inventory = new ObservableCollection <InventoryModel>(accountProvider.SelectedAccount.Inventory);
 }
 public AccountsController()
 {
     userProvider = AccountFactory.CreateAccountProvider(ConfigurationManager.AppSettings["providerType"]);
 }
Exemple #12
0
 public AccountService(IAccountProvider provider)
 {
     accountProvider = provider;
 }
 public AccountsController(IAccountProvider accountProvider)
 {
     _accountProvider = accountProvider;
 }
 public SimpleAuthenticator(IAccountProvider accountProvider, IAccountService accountService)
 {
     this.accountProvider = accountProvider;
     this.accountService = accountService;
 }
Exemple #15
0
 public AccountHelper(IAccountProvider accountProvider)
 {
     _accountProvider = accountProvider;
 }
Exemple #16
0
 public SimpleAuthenticator(IAccountProvider accountProvider, IAccountService accountService)
 {
     _accountProvider = accountProvider;
     _accountService  = accountService;
 }
Exemple #17
0
 public Account(IAccountProvider accountProvider)
 {
     _accountProvider = accountProvider;
 }
 public AccountController(IAccountProvider accountProvider)
 {
     _accountProvider = accountProvider;
 }
 public SignAndSubmitCommand(IRippleRestClient client, IAccountProvider defaultAccountAndPasswordProvider)
 {
     this.client = client;
     this.defaultAccountAndPasswordProvider = defaultAccountAndPasswordProvider;
 }
 public AccountApiController(IAccountProvider accountManager, IAuthenticationManager authenticationManager, AppUserManager appUserManager) 
     : this(Startup.OAuthOptions.AccessTokenFormat, accountManager, authenticationManager, appUserManager) { }
 public AccountManager(IAccountProvider accountProvider)
 {
     m_accountProvider = accountProvider;
 }
 public AccountService(IAccountProvider accountProvider)
 {
     _accountProvider = accountProvider;
 }
 /// <summary>
 /// Fetch basic account details and credits balance
 /// </summary>
 /// <returns></returns>
 public AccountResult Account()
 {
     var r = new AccountResult();
     try
     {
         if (AccountProvider == null)
             AccountProvider = new AccountProvider();
         var json = AccountProvider.Get(Url, _proxy, KeyPublic, KeySecret);
         r = JsonConvert.DeserializeObject<AccountResult>(json.Replace("\"results\":[", "\"resultsArray\":["));
     }
     catch (Exception err)
     {
         r.Status.Code = -1;
         r.Status.Msg = err.Message;
     }
     return r;
 }
 public RequestProvider(IAccountProvider accountProvider)
 {
     _accountProvider = accountProvider;
 }
 public AccountController(IAccountProvider Provider)
 {
     _Provider = Provider;
 }