public AuthentificationPopupViewPresenter( IApplicationResources resources, IGoogleAccountService googleAccountService, IAuthentificationService authentificationService) { this.resources = resources; this.googleAccountService = googleAccountService; this.authentificationService = authentificationService; this.BindingModel = new AuthentificationPageViewBindingModel(); this.SignInCommand = new DelegateCommand(this.SignIn, () => !this.BindingModel.IsSigningIn); this.BindingModel.Subscribe(() => this.BindingModel.IsSigningIn, (sender, args) => this.SignInCommand.RaiseCanExecuteChanged()); }
public AuthentificationService( IApplicationResources resources, ILogManager logManager, IGoogleAccountService googleAccountService, IGoogleMusicSessionService sessionService, IGoogleAccountWebService googleAccountWebService, IGoogleMusicWebService googleMusicWebService) { this.logger = logManager.CreateLogger("AuthentificationService"); this.resources = resources; this.googleAccountService = googleAccountService; this.sessionService = sessionService; this.googleAccountWebService = googleAccountWebService; this.googleMusicWebService = googleMusicWebService; }
public AccountsViewPresenter( IApplicationResources resources, IGoogleAccountService googleAccountService, IGoogleMusicSessionService sessionService, ILastfmWebService lastfmWebService, ICurrentSongPublisherService publisherService, IApplicationSettingViewsService applicationSettingViewsService, INavigationService navigationService) { this.resources = resources; this.googleAccountService = googleAccountService; this.sessionService = sessionService; this.lastfmWebService = lastfmWebService; this.publisherService = publisherService; this.applicationSettingViewsService = applicationSettingViewsService; this.navigationService = navigationService; this.BindingModel = new AccountViewBindingModel(); this.ForgetAccountCommand = new DelegateCommand(this.ForgetAccount); this.SignOutCommand = new DelegateCommand(this.SignOutAccount); this.LastfmUnlinkCommand = new DelegateCommand(this.LastfmUnlink); this.LastfmLinkCommand = new DelegateCommand(this.LastfmLink, () => this.sessionService.GetSession().IsAuthenticated); this.ReloadSongsCommand = new DelegateCommand(this.ReloadSongs, () => this.navigationService.HasHistory()); var userInfo = this.googleAccountService.GetUserInfo(); if (userInfo != null) { this.BindingModel.AccountName = userInfo.Email; this.BindingModel.IsRemembered = userInfo.RememberAccount; } Session lastfmSession = this.lastfmWebService.GetSession(); if (lastfmSession != null) { this.BindingModel.LastfmAccountName = lastfmSession.Name; } this.BindingModel.HasSession = this.sessionService.GetSession().IsAuthenticated; }
public BearerTokenWithGoogleHandler(IOptionsMonitor <BearerTokenWithGoogleIdTokenOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock, IGoogleAccountService googleAccountService) : base(options, logger, encoder, clock) { this.googleAccountService = googleAccountService; }