public SimulatorRuntimeController(ISimulatorNetworkManager simNetworkManager, ISimulatorManager simManager, IAdminLogger logger, ISecureStorage secureStorage) { _simNetworkManager = simNetworkManager; _simManager = simManager; _secureStorage = secureStorage; _logger = logger; }
public ChooseAssetsViewModel(IAppData appData, IUserData userData, ISecureStorage secureStorage, IUserAssetsService userAssetsService) { this.appData = appData; this.userData = userData; this.secureStorage = secureStorage; this.userAssetsService = userAssetsService; }
public LegacyStorageService(ISecureStorage secureStorage, IFileSystem fileSystem) { SecureStorage = secureStorage ?? throw new ArgumentException(nameof(SecureStorage)); DbFile = new FileInfo(Path.Combine(fileSystem.LocalStorage.FullName, DbFileName)); EncryptionKey = new Lazy <byte[]>(GetEncryptionKey); }
/// <summary> /// Method that handles cleanup of the viewmodel /// </summary> public void Dispose() { _timerContinue = false; Definitions.Report = new DriveReport(); Unsubscribe(); _storage = null; }
public LoginPageViewModel(INavigationService navigationService, IAutApi autApi, ISecureStorage secureStorage) : base(navigationService) { _autApi = autApi; _secureStorage = secureStorage; }
public UserRepository(ISecureStorage storage) { _storage = storage; Observable.FromAsync(_ => GetUserAsync()) .Subscribe(user => _currentUser.Value = user); }
public MainPageViewModel(INavigationService navigationService, IAutApi autApi, ISecureStorage secureStorage) : base(navigationService) { Title = "Main Page"; _autApi = autApi; _secureStorage = secureStorage; }
public StorageService(ISecureStorage secureStorage, IFileSystem fileSystem) { SecureStorage = secureStorage ?? throw new ArgumentException(nameof(SecureStorage)); FileSystem = fileSystem ?? throw new ArgumentException(nameof(fileSystem)); DbFile = new FileInfo(Path.Combine(fileSystem.LocalStorage.FullName, DbFileName)); }
public VacationContext(ISecureStorage storage) { var token = storage.GetAsync(Settings.TokenStorageKey).Result; _client = new HttpClient(); _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); }
public MainPageViewModel(INavigationService navigationService, ISecureStorage secureStorage) : base(navigationService) { this.secureStorage = secureStorage; this._navigationService = navigationService; Title = "Main Page"; }
public static Account[] OpenVaultBrowser(string username, string password, string deviceId, string baseUrl, IUi ui, ISecureStorage storage, IRestTransport transport) { // Reset to default. Let the user simply pass a null or "" and not bother with an overload. if (baseUrl.IsNullOrEmpty()) { baseUrl = DefaultBaseUrl; } var rest = new RestClient(transport, baseUrl, defaultHeaders: DefaultRestHeaders); // 1. Request the number of KDF iterations needed to derive the key var iterations = RequestKdfIterationCount(username, rest); // 2. Derive the master encryption key or KEK (key encryption key) var key = Util.DeriveKey(username, password, iterations); // 3. Hash the password that is going to be sent to the server var hash = Util.HashPassword(password, key); // 4. Authenticate with the server and get the token var token = Login(username, hash, deviceId, ui, storage, rest); // 5. Fetch the vault var encryptedVault = DownloadVault(rest, token); // 6. Decrypt and parse the vault. Done! return(DecryptVault(encryptedVault, key)); }
public ServiceTicketTemplateManager(IServiceTicketTemplateRepo repo, ITemplateCategoryRepo templateCategoryRepo, IAppConfig appConfig, IAdminLogger logger, ISecureStorage secureStorage, IDependencyManager depmanager, ISecurity security) : base(logger, appConfig, depmanager, security) { _repo = repo; _secureStorage = secureStorage; _templateCategoryRepo = templateCategoryRepo; }
public SyncfusionService(AzureFunctionsApiService azureFunctionsApiService, IAnalyticsService analyticsService, ISecureStorage secureStorage) { _secureStorage = secureStorage; _analyticsService = analyticsService; _azureFunctionsApiService = azureFunctionsApiService; }
public ContainerRepositoryManager(IContainerRepositoryRepo repo, ISecureStorage secureStorage, IAdminLogger logger, Services.IDockerRegisteryServices dockerRegistryServices, IAppConfig appConfig, IDependencyManager dependencyManager, ISecurity security) : base(logger, appConfig, dependencyManager, security) { _repo = repo; _secureStorage = secureStorage; _dockerRegistryServices = dockerRegistryServices; }
public ClientService(ILogger logger, ISecureStorage secureStorage) : base() { _logger = logger; _secureStorage = secureStorage; Posts = new List <Post>(); Comments = new List <Comment>(); }
public EventListPageViewModel(INavigationService navigationService) : base(navigationService) { _secureStorage = CrossSecureStorage.Current; BackCommand = new Command(async() => await BackButton()); CreateCommand = new Command(async() => await CreateButton()); }
// TODO: Write a test that runs the whole sequence and checks the result. internal static Vault Open(string username, string password, Ui ui, ISecureStorage storage, IRestTransport transport) { return(new Vault(Client.OpenVault(username, password, ui, storage, transport))); }
public RegisterPage() { NavigationPage.SetHasBackButton(this, false); InitializeComponent(); _storage = App.Resolve <IStorage>().SecureStorage; _navi = App.Resolve <IAppNavigation>(); }
public ClientAppManager(IClientAppRepo repo, IAppConfig appConfig, IAdminLogger logger, ISecureStorage secureStorage, IUserManager userManager, IOrganizationManager orgManager, IDependencyManager depmanager, ISecurity security) : base(logger, appConfig, depmanager, security) { _repo = repo ?? throw new ArgumentNullException(nameof(repo)); _appConfig = appConfig ?? throw new ArgumentNullException(nameof(appConfig)); _secureStorage = secureStorage ?? throw new ArgumentNullException(nameof(secureStorage)); _userManager = userManager ?? throw new ArgumentNullException(nameof(userManager)); _orgManager = orgManager ?? throw new ArgumentNullException(nameof(orgManager)); }
public SecurityManager(ISecureStorage storage) { if (storage == null) { throw new ArgumentNullException("storage"); } this.storage = storage; }
public PinSignInViewModel(IViewService viewService, ISecureStorage secureStorage, IAppData appData, Func <MainViewModel> createMainViewModel) { this.viewService = viewService; this.secureStorage = secureStorage; this.appData = appData; this.createMainViewModel = createMainViewModel; SignInCommand = new XCommand(SignIn); SignInCommand.SetDependency(this); }
public OrderNewCardViewModel(ISecureStorage secureStorage, IConnectivity connectivity, ICardOrderService cardOrderService, ICardData cardData, IAppData appData, Func <EditAddressViewModel> createEditAddressViewModel) { this.secureStorage = secureStorage; this.connectivity = connectivity; this.cardOrderService = cardOrderService; this.cardData = cardData; this.appData = appData; this.createEditAddressViewModel = createEditAddressViewModel; }
public static int?GetUserId(this ISecureStorage secureStorage) { if (secureStorage.HasKey(UserIdkey)) { int.TryParse(secureStorage.GetValue(UserIdkey), out int result); return(result); } return(null); }
public static T Get <T>() where T : new() { ISecureStorage SecureStorage = DependencyService.Get <ISecureStorage>(); var json = SecureStorage.Get(typeof(T).Name); return(!string.IsNullOrEmpty(json) ? JsonConvert.DeserializeObject <T>(json) : new T()); }
public LoginProvider(IAppSettings appSettings, ISecureStorage secureStorage, ILoggingService loggingService, IDeviceInfo deviceInfo, IVersionTracking versionTracking) { _appSettings = appSettings; _secureStorage = secureStorage; _loggingService = loggingService; _deviceInfo = deviceInfo; _versionTracking = versionTracking; }
public DeviceManager(IDeviceManagementRepo deviceRepo, IDeviceManagementConnector deviceConnectorService, IDeviceConfigHelper deviceConfigHelper, IAdminLogger logger, ISecureStorage secureStorage, IAppConfig appConfig, IDependencyManager depmanager, ISecurity security) : base(logger, appConfig, depmanager, security) { _deviceRepo = deviceRepo; _secureStorage = secureStorage; _deviceConfigHelper = deviceConfigHelper; _deviceConnectorService = deviceConnectorService; }
/// <summary> /// Method is used a a constructor, because the constructor needs to be parameterless /// </summary> public void InitVm(Municipality m) { _model = m; // URL for testserver //_model.APIUrl = "http://os2indberetningmobil/api"; _storage = DependencyService.Get<ISecureStorage>(); }
internal static void SaveRememberMeToken(TokenOrSecondFactor reseponse, ISecureStorage storage) { var token = reseponse.RememberMeToken; if (token != null) { storage.StoreString(RememberMeTokenKey, token); } }
public LoggedInUserService(IUserDataManager userDataManager, IUserDataManager dataManager, IUserDataRealmManager dataRealmManager) { _userDataManager = userDataManager; _dataManager = dataManager; _dataRealmManager = dataRealmManager; _secureStorage = CrossSecureStorage.Current; }
//Task ReceivingTask; #endregion #region Constructor public SimulatorViewModel(ISecureStorage secureStorage) { ConnectCommand = new RelayCommand(Connect); DisconnectCommand = new RelayCommand(Disconnect); ShowMessageTemplatesCommand = new RelayCommand(ShowMessageTemplates); ShowReceivedMessagesCommand = new RelayCommand(ShowReceivedMessages); ReceivedMessageList = new ObservableCollection <ReceivedMessage>(); _secureStorage = secureStorage; }
/// <summary> /// Constructor that handles initialization of the viewmodel /// </summary> public UploadingViewModel() { UploaderText = "Uploader kørselsdata"; _storage = DependencyService.Get<ISecureStorage>(); var tokenByte = _storage.Retrieve(Definitions.AuthKey); Definitions.Purpose = null; _authorization = JsonConvert.DeserializeObject<Authorization>(Encoding.UTF8.GetString(tokenByte, 0, tokenByte.Length)); Subscribe(); }
/// <summary> /// Constructor that handles initialization of the viewmodel /// </summary> public MainViewModel() { PrimaryHex = Color.FromHex(Definitions.PrimaryColor); if (Definitions.Report == null) { Definitions.Report = new DriveReport(); } _driveReport = new ObservableCollection<DriveReportCellModel>(); _storage = DependencyService.Get<ISecureStorage>(); Subscribe(); FileHandler.ReadFileContent(Definitions.OrganizationFileName, Definitions.OrganizationFolder).ContinueWith( (result) => { if (!string.IsNullOrEmpty(result.Result)) { var obj = JsonConvert.DeserializeObject<Employment>(result.Result); Definitions.Report.EmploymentId = obj.Id; Definitions.Organization = obj; } FileHandler.ReadFileContent(Definitions.TaxeFileName, Definitions.TaxeFolder).ContinueWith( (result2) => { if (!string.IsNullOrEmpty(result2.Result)) { var obj = JsonConvert.DeserializeObject<Rate>(result2.Result); Definitions.Report.RateId = obj.Id; Definitions.Rate = obj; } }, TaskScheduler.FromCurrentSynchronizationContext()).ContinueWith( (result3) => { InitializeCollection(); }); }, TaskScheduler.FromCurrentSynchronizationContext()); }
/// <summary> /// Create a new instance of the AccountHelper. /// </summary> /// <param name="storage">The secure storage implemenation to use for fetching and setting values securely.</param> public AccountHelper(ISecureStorage storage) { this.storage = storage; }