public WebViewRouter( IComponentModel componentModel, ICodeStreamService codestreamService, IWebviewUserSettingsService webviewUserSettingsService, ISessionService sessionService, ICodeStreamAgentService codeStreamAgent, ISettingsServiceFactory settingsServiceFactory, IEventAggregator eventAggregator, IBrowserService browserService, IIdeService ideService, IEditorService editorService, IAuthenticationServiceFactory authenticationServiceFactory) { _componentModel = componentModel; _codeStreamService = codestreamService; _webviewUserSettingsService = webviewUserSettingsService; _sessionService = sessionService; _codeStreamAgent = codeStreamAgent; _settingsManager = settingsServiceFactory.GetOrCreate(nameof(WebViewRouter)); _eventAggregator = eventAggregator; _browserService = browserService; _ideService = ideService; _editorService = editorService; _authenticationServiceFactory = authenticationServiceFactory; }
/// <summary> /// Initializes a new instance of the <see cref="VstsApplicationRegistry"/> class. /// </summary> /// <param name="applicationId">Application ID used by default.</param> /// <param name="applicationSecret">Application secret used by default.</param> /// <param name="applicationScope">Application scope used by defult.</param> /// <param name="redirectUri">Redirect URI.</param> /// <param name="authenticationServiceFactory">The authentication service factory.</param> public VstsApplicationRegistry(string applicationId, string applicationSecret, string applicationScope, Uri redirectUri, IAuthenticationServiceFactory authenticationServiceFactory) { this.applicationId = applicationId ?? throw new ArgumentNullException(nameof(applicationId)); this.applicationSecret = applicationSecret ?? throw new ArgumentNullException(nameof(applicationSecret)); this.applicationScope = applicationScope ?? throw new ArgumentNullException(nameof(applicationScope)); this.redirectUri = redirectUri ?? throw new ArgumentNullException(nameof(redirectUri)); this.authenticationServiceFactory = authenticationServiceFactory ?? throw new ArgumentNullException(nameof(authenticationServiceFactory)); }
/// <summary> /// Initializes a new instance of the <see cref="VstsApplication"/> class. /// </summary> /// <param name="id">Application ID</param> /// <param name="secret">Application secret</param> /// <param name="scope">Application scope</param> /// <param name="redirectUri">Redirect URI</param> /// <param name="authenticationServiceFactory">The authentication service factory.</param> public VstsApplication(string id, string secret, string scope, Uri redirectUri, IAuthenticationServiceFactory authenticationServiceFactory) { this.Id = id ?? throw new ArgumentNullException(nameof(id)); this.Secret = secret ?? throw new ArgumentNullException(nameof(secret)); this.Scope = scope ?? throw new ArgumentNullException(nameof(scope)); this.RedirectUri = redirectUri ?? throw new ArgumentNullException(nameof(redirectUri)); this.authenticationServiceFactory = authenticationServiceFactory ?? throw new ArgumentNullException(nameof(authenticationServiceFactory)); }
public UserService(IIdentityClient client, IAuthenticationServiceFactory factory) { _client = client; _authenticationService = factory.GetAuthorizationService(AuthorizationType.IdentityAuthentication); }
public SomeClass(IAuthenticationServiceFactory _authenticationServiceFactory) { var authenticationService = _authenticationServiceFactory.GetAuthenticationService(); }
public static void SetCurrent(IAuthenticationServiceFactory authenticationFactory) { current = authenticationFactory; }