public async Task<GeoLocationState> GetGeoLocationStateAsync(User user) { if (user.SupportsGeoLocation == false) return GeoLocationState.NotRequired; if (await this.HasAccessAsync() == false) return GeoLocationState.RequiredNotAvailable; return GeoLocationState.RequiredAndAvailable; }
public async Task RememberUserForBiometricAuthAsync(User user) { Guard.NotNull(user, nameof(user)); var result = await UserConsentVerifier.RequestVerificationAsync(CTime2CoreResources.Get("BiometricsService.RememberLogin")); if (result == UserConsentVerificationResult.Verified) { this._applicationStateService.SetBiometricAuthUser(user); } else if (result == UserConsentVerificationResult.DeviceNotPresent) { throw new CTimeException(CTime2CoreResources.Get("BiometricsService.NoBiometricDevicePresent")); } }
public static async Task SaveTimer(this ICTimeService self, User user, TimeState state) { await self.SaveTimer(user.Id, string.Empty, DateTime.Now, user.CompanyId, state, user.SupportsGeoLocation); }
private async Task AfterLoginAsync(User user) { this._applicationStateService.SetCurrentUser(user); await this._applicationStateService.SaveStateAsync(); this._shell.CurrentMode = IoC.Get<LoggedInApplicationMode>(); }