public AuthenticationViewModel(IJiraToolWindowNavigatorViewModel parent, IOAuthService oAuthService, IBasicAuthenticationService basicService, IUserService userService) { this._parent = parent; this._baseUrl = UserSettingsHelper.ReadStringFromUserSettings("JiraBaseUrl"); this._baseUrlBasic = UserSettingsHelper.ReadStringFromUserSettings("JiraBaseUrl"); this._username = UserSettingsHelper.ReadStringFromUserSettings("JiraUsername"); this._oAuthService = oAuthService; this._basicService = basicService; this._userService = userService; SettingsManager settingsManager = new ShellSettingsManager(ServiceProvider.GlobalProvider); this._userSettingsStore = settingsManager.GetWritableSettingsStore(SettingsScope.UserSettings); this.SignInOAuthCommand = new DelegateCommand(SignInOAuth); this.SignInBasicCommand = new DelegateCommand(SignInBasic); this.HowToSetupOAuthCommand = new DelegateCommand(HowToSetupOAuth); SetPanelTitles(); }
public LoginViewModel( INavigationService navigationService, IBasicAuthenticationService basicAuthenticationService) { _navigationService = navigationService ?? throw new ArgumentNullException(nameof(navigationService)); _basicAuthenticationService = basicAuthenticationService ?? throw new ArgumentNullException(nameof(basicAuthenticationService)); LoginCommand = new Command(async() => await Login()); }
public BasicAuthenticationHandler( IOptionsMonitor <AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock, IBasicAuthenticationService basicAuthenticationService) : base(options, logger, encoder, clock) { _basicAuthenticationService = basicAuthenticationService; }
public AuthenticationView(JiraToolWindowNavigatorViewModel parent, IOAuthService oAuthService, IBasicAuthenticationService basicService, IUserService userService) { InitializeComponent(); this._viewModel = new AuthenticationViewModel(parent, oAuthService, basicService, userService); this.DataContext = this._viewModel; }
public JiraToolWindowNavigatorViewModel(ToolWindowPane parent) { this._parent = (JiraToolWindow)parent; this._searchHost = parent.SearchHost; this._historyNavigator = new HistoryNavigator(); this._service = JiraPackage.Mcs; this._oAuthService = new OAuthService(); this._basicAuthenticationService = new BasicAuthenticationService(); InitializeCommands(this._service); }
public ConnectionViewModel(IJiraToolWindowNavigatorViewModel parent, IUserService userService, IBasicAuthenticationService basicAuthenticationService) { this._parent = parent; this._userService = userService; this._basicAuthenticationService = basicAuthenticationService; this.GetAuthenticatedUserAsync(); SettingsManager settingsManager = new ShellSettingsManager(ServiceProvider.GlobalProvider); this._userSettingsStore = settingsManager.GetWritableSettingsStore(SettingsScope.UserSettings); this.SignOutCommand = new DelegateCommand(SignOut); this.IssueReportGitHubCommand = new DelegateCommand(IssueReportGitHub); SetPanelTitles(); }
public AccountsController(BasicAuthenticationHandler authenticationHandler, IBasicAuthenticationService authenticationService) { _authenticationService = authenticationService; _authenticationHandler = authenticationHandler; }