Beispiel #1
0
 /// <summary>Initializes a new instance of the <see cref="AccessTokenLoader" /> class.</summary>
 /// <param name="projects">The projects.</param>
 /// <param name="samlAuthenticator">The saml authenticator.</param>
 /// <param name="oAuthClientFactory">The o authentication client factory.</param>
 /// <param name="serviceProvider">The service provider.</param>
 /// <exception cref="ArgumentNullException"><paramref name="projects"/>
 /// or
 /// <paramref name="samlAuthenticator"/>
 /// or
 /// <paramref name="oAuthClientFactory"/>
 /// or
 /// <paramref name="serviceProvider"/> is null.
 /// </exception>
 public AccessTokenLoader(
     ProjectConfigurationCollection projects,
     ISamlAuthenticator samlAuthenticator,
     IOAuthClientFactory oAuthClientFactory,
     IServiceProvider serviceProvider)
 {
     _projects           = projects ?? throw new ArgumentNullException(nameof(projects));
     _samlAuthenticator  = samlAuthenticator ?? throw new ArgumentNullException(nameof(samlAuthenticator));
     _oAuthClientFactory = oAuthClientFactory ?? throw new ArgumentNullException(nameof(oAuthClientFactory));
     _serviceProvider    = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider));
 }
Beispiel #2
0
 public SharePointResourceUserManagementService(
     ProjectConfiguration project,
     ProjectResource projectResource,
     IUserSearchService userSearchService,
     ISamlAuthenticator samlAuthenticator,
     ILogger logger)
     : base(project, projectResource, logger)
 {
     _userSearchService = userSearchService ?? throw new ArgumentNullException(nameof(userSearchService));
     _samlAuthenticator = samlAuthenticator ?? throw new ArgumentNullException(nameof(samlAuthenticator));
 }
        /// <summary>
        /// Creates a <see cref="ProjectAccessTokenHealthCheck"/> for the specified project.
        /// </summary>
        /// <param name="project">The project.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">project</exception>
        public ProjectAccessTokenHealthCheck Create(ProjectConfiguration project)
        {
            if (project == null)
            {
                throw new ArgumentNullException(nameof(project));
            }

            ISamlAuthenticator  samlAuthenticator  = _serviceProvider.GetRequiredService <ISamlAuthenticator>();
            IOAuthClientFactory oauthClientFactory = _serviceProvider.GetRequiredService <IOAuthClientFactory>();

            return(new ProjectAccessTokenHealthCheck(project, samlAuthenticator, oauthClientFactory));
        }
 public UserManagementService(
     ProjectConfigurationCollection projects,
     ILogger <UserManagementService> logger,
     IODataClientFactory oDataClientFactory,
     IUserSearchService userSearchService,
     ISamlAuthenticator samlAuthenticator)
 {
     _projects           = projects ?? throw new ArgumentNullException(nameof(projects));
     _logger             = logger ?? throw new ArgumentNullException(nameof(logger));
     _oDataClientFactory = oDataClientFactory ?? throw new ArgumentNullException(nameof(oDataClientFactory));
     _userSearchService  = userSearchService ?? throw new ArgumentNullException(nameof(userSearchService));
     _samlAuthenticator  = samlAuthenticator ?? throw new ArgumentNullException(nameof(samlAuthenticator));
 }
 protected AccessTokenHealthCheckBase(ISamlAuthenticator samlAuthenticator, IOAuthClientFactory oauthClientFactory)
 {
     _samlAuthenticator  = samlAuthenticator ?? throw new ArgumentNullException(nameof(samlAuthenticator));
     _oauthClientFactory = oauthClientFactory ?? throw new ArgumentNullException(nameof(oauthClientFactory));
 }
Beispiel #6
0
 public ProjectAccessTokenHealthCheck(ProjectConfiguration project, ISamlAuthenticator samlAuthenticator, IOAuthClientFactory oauthClientFactory)
     : base(samlAuthenticator, oauthClientFactory)
 {
     _project = project ?? throw new ArgumentNullException(nameof(project));
 }