示例#1
0
 public GetTokenViaImplicitWorkflowOperation(
     IClientStore clientStore,
     IConsentRepository consentRepository,
     IAuthorizationCodeStore authorizationCodeStore,
     ITokenStore tokenStore,
     IScopeRepository scopeRepository,
     IJwksStore jwksStore,
     IEventPublisher eventPublisher,
     ILogger logger)
 {
     _logger = logger;
     _processAuthorizationRequest = new ProcessAuthorizationRequest(
         clientStore,
         consentRepository,
         jwksStore,
         logger);
     _generateAuthorizationResponse = new GenerateAuthorizationResponse(
         authorizationCodeStore,
         tokenStore,
         scopeRepository,
         clientStore,
         consentRepository,
         jwksStore,
         eventPublisher,
         logger);
 }
示例#2
0
 public ConsentController CreateConsentController(IConsentRepository consentRepository)
 {
     return(new ConsentController(
                Studies,
                StudySubjects,
                consentRepository,
                KnownEvidence.Registry));
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="AuthenticateController"/> class.
        /// </summary>
        /// <param name="dataProtectionProvider">The data protection provider.</param>
        /// <param name="urlHelperFactory">The URL helper factory.</param>
        /// <param name="actionContextAccessor">The action context accessor.</param>
        /// <param name="eventPublisher">The event publisher.</param>
        /// <param name="authenticationService">The authentication service.</param>
        /// <param name="authenticationSchemeProvider">The authentication scheme provider.</param>
        /// <param name="resourceOwnerServices">The resource owner services.</param>
        /// <param name="twoFactorAuthenticationHandler">The two factor authentication handler.</param>
        /// <param name="subjectBuilder">The subject builder.</param>
        /// <param name="authorizationCodeStore">The authorization code store.</param>
        /// <param name="scopeRepository">The scope repository.</param>
        /// <param name="tokenStore">The token store.</param>
        /// <param name="consentRepository">The consent repository.</param>
        /// <param name="confirmationCodeStore">The confirmation code store.</param>
        /// <param name="clientStore">The client store.</param>
        /// <param name="resourceOwnerRepository">The resource owner repository.</param>
        /// <param name="jwksStore"></param>
        /// <param name="accountFilters">The account filters.</param>
        /// <param name="logger">The controller logger.</param>
        /// <param name="runtimeSettings">The runtime settings.</param>
        public AuthenticateController(
            IDataProtectionProvider dataProtectionProvider,
            IUrlHelperFactory urlHelperFactory,
            IActionContextAccessor actionContextAccessor,
            IEventPublisher eventPublisher,
            IAuthenticationService authenticationService,
            IAuthenticationSchemeProvider authenticationSchemeProvider,
            IEnumerable <IAuthenticateResourceOwnerService> resourceOwnerServices,
            ITwoFactorAuthenticationHandler twoFactorAuthenticationHandler,
            ISubjectBuilder subjectBuilder,
            IAuthorizationCodeStore authorizationCodeStore,
            IScopeRepository scopeRepository,
            ITokenStore tokenStore,
            IConsentRepository consentRepository,
            IConfirmationCodeStore confirmationCodeStore,
            IClientStore clientStore,
            IResourceOwnerRepository resourceOwnerRepository,
            IJwksStore jwksStore,
            IEnumerable <AccountFilter> accountFilters,
            ILogger <AuthenticateController> logger,
            RuntimeSettings runtimeSettings)
            : base(
                dataProtectionProvider,
                urlHelperFactory,
                actionContextAccessor,
                eventPublisher,
                authenticationService,
                authenticationSchemeProvider,
                twoFactorAuthenticationHandler,
                authorizationCodeStore,
                consentRepository,
                scopeRepository,
                tokenStore,
                resourceOwnerRepository,
                confirmationCodeStore,
                clientStore,
                jwksStore,
                subjectBuilder,
                accountFilters,
                logger,
                runtimeSettings)
        {
            _eventPublisher = eventPublisher;
            _logger         = logger;
            var services = resourceOwnerServices.ToArray();

            _resourceOwnerServices     = services;
            _localOpenIdAuthentication = new LocalOpenIdUserAuthenticationAction(
                authorizationCodeStore,
                services,
                consentRepository,
                tokenStore,
                scopeRepository,
                clientStore,
                jwksStore,
                eventPublisher,
                logger);
        }
示例#4
0
 public ConsentNotificationController(
     IConsentRepository consentRepository,
     IBackgroundJobClient backgroundJob,
     GatewayClient gatewayClient)
 {
     this.consentRepository = consentRepository;
     this.backgroundJob     = backgroundJob;
     this.gatewayClient     = gatewayClient;
 }
示例#5
0
 /// <inheritdoc />
 public ConsentControllerTestBase()
 {
     Study         = Create.Study;
     StudyId       = new StudyIdentity(Study.Id);
     StudySubject  = new StudySubject(StudyId, "AA100023", new PersonIdentity(500L));
     Studies       = CreateStudyRepository(Study);
     StudySubjects = CreateSubjectRepository(Study, StudySubject);
     Consents      = CreateConsentRepository(Study, StudySubject);
 }
示例#6
0
 /// <inheritdoc />
 public Subject(IUserProvider user, ConsentContext db, IStudySubjectRepository subjects,
                IConsentRepository consents, IIdentityRepository identity)
 {
     Db            = db;
     this.user     = user;
     this.subjects = subjects;
     this.consents = consents;
     this.identity = identity;
 }
 public ProcessAuthorizationRequest(
     IClientStore clientStore,
     IConsentRepository consentRepository,
     IJwksStore jwksStore,
     ILogger logger)
 {
     _clientStore       = clientStore;
     _consentRepository = consentRepository;
     _jwksStore         = jwksStore;
     _logger            = logger;
 }
 public ConsentController(
     IStudyRepository studies,
     IStudySubjectRepository subjects,
     IConsentRepository consents,
     EvidenceDefinitionRegistry registry,
     ILogger <ConsentController> logger = null)
 {
     Studies  = studies;
     Subjects = subjects;
     Logger   = logger ?? NullLogger <ConsentController> .Instance;
     Consents = consents;
     EvidenceDtoMarshallers = new EvidenceDtosIdentifierDtoMarshaller(registry);
 }
示例#9
0
 public DataFlow(IDataFlowRepository dataFlowRepository,
                 IMessagingQueueManager messagingQueueManager,
                 IConsentRepository consentRepository,
                 IHealthInformationRepository healthInformationRepository,
                 IOptions <DataFlowConfiguration> dataFlowConfiguration,
                 ILogger <DataFlow> logger)
 {
     this.dataFlowRepository          = dataFlowRepository;
     this.messagingQueueManager       = messagingQueueManager;
     this.consentRepository           = consentRepository;
     this.healthInformationRepository = healthInformationRepository;
     this.dataFlowConfiguration       = dataFlowConfiguration;
     this.logger = logger;
 }
示例#10
0
 protected void RecordConsent(
     IIdentifierValueDto evidence,
     DateTime dateGiven,
     long?givenByPersonId = null,
     IConsentRepository consentRepository = null,
     long?studyId             = null,
     string subjectIdentifier = null,
     long?personId            = null
     ) =>
 RecordConsent(
     new[] { evidence },
     dateGiven,
     givenByPersonId,
     consentRepository,
     studyId,
     subjectIdentifier,
     personId);
示例#11
0
 public AuthorizationActions(
     IAuthorizationCodeStore authorizationCodeStore,
     IClientStore clientStore,
     ITokenStore tokenStore,
     IScopeRepository scopeRepository,
     IConsentRepository consentRepository,
     IJwksStore jwksStore,
     IEventPublisher eventPublisher,
     IEnumerable <IAuthenticateResourceOwnerService> resourceOwnerServices,
     ILogger logger)
 {
     _getAuthorizationCodeOperation = new GetAuthorizationCodeOperation(
         authorizationCodeStore,
         tokenStore,
         scopeRepository,
         clientStore,
         consentRepository,
         jwksStore,
         eventPublisher,
         logger);
     _getTokenViaImplicitWorkflowOperation = new GetTokenViaImplicitWorkflowOperation(
         clientStore,
         consentRepository,
         authorizationCodeStore,
         tokenStore,
         scopeRepository,
         jwksStore,
         eventPublisher,
         logger);
     _getAuthorizationCodeAndTokenViaHybridWorkflowOperation =
         new GetAuthorizationCodeAndTokenViaHybridWorkflowOperation(
             clientStore,
             consentRepository,
             authorizationCodeStore,
             tokenStore,
             scopeRepository,
             jwksStore,
             eventPublisher,
             logger);
     _authorizationCodeGrantTypeParameterValidator =
         new AuthorizationCodeGrantTypeParameterAuthEdpValidator(clientStore, logger);
     _eventPublisher        = eventPublisher;
     _logger                = logger;
     _resourceOwnerServices = resourceOwnerServices.ToArray();
 }
示例#12
0
 public HomeController(ILogger <HomeController> logger, IStanfordRepository stanfordRepository, IConsentRepository consentRepository, IPSQIRepository psqiRepository, IEpworthRepository epworthRepository, IDemographicsRepository demographicsRepository, ITestNameGetter testNameGetter, IPhaseSetsGetter phaseSetsGetter, IProgressGetter progressGetter, IEncodingFinishedChecker encodingFinishedChecker, IReturningUserPhaseDataGetter returningUserPhaseDataGetter, IParticipantEnrollmentVerifier participantEnrollmentVerifier, ISleepQuestionsRepository sleepQuestionsRepository, IParticipantLanguageQualificationChecker participantLanguageQualificationChecker, IOptions <Config> config)
 {
     _logger                                  = logger;
     _stanfordRepository                      = stanfordRepository;
     _consentRepository                       = consentRepository;
     _psqiRepository                          = psqiRepository;
     _epworthRepository                       = epworthRepository;
     _demographicsRepository                  = demographicsRepository;
     _testNameGetter                          = testNameGetter;
     _phaseSetsGetter                         = phaseSetsGetter;
     _progressGetter                          = progressGetter;
     _encodingFinishedChecker                 = encodingFinishedChecker;
     _returningUserPhaseDataGetter            = returningUserPhaseDataGetter;
     _participantEnrollmentVerifier           = participantEnrollmentVerifier;
     _sleepQuestionsRepository                = sleepQuestionsRepository;
     _participantLanguageQualificationChecker = participantLanguageQualificationChecker;
     _config                                  = config.Value;
 }
示例#13
0
 public GenerateAuthorizationResponse(
     IAuthorizationCodeStore authorizationCodeStore,
     ITokenStore tokenStore,
     IScopeRepository scopeRepository,
     IClientStore clientStore,
     IConsentRepository consentRepository,
     IJwksStore jwksStore,
     IEventPublisher eventPublisher,
     ILogger logger)
 {
     _authorizationCodeStore = authorizationCodeStore;
     _tokenStore             = tokenStore;
     _jwtGenerator           = new JwtGenerator(clientStore, scopeRepository, jwksStore, logger);
     _eventPublisher         = eventPublisher;
     _clientStore            = clientStore;
     _consentRepository      = consentRepository;
     _jwksStore = jwksStore;
 }
 public AuthenticateResourceOwnerOpenIdAction(
     IAuthorizationCodeStore authorizationCodeStore,
     ITokenStore tokenStore,
     IScopeRepository scopeRepository,
     IConsentRepository consentRepository,
     IClientStore clientStore,
     IJwksStore jwksStore,
     IEventPublisher eventPublisher,
     ILogger logger)
 {
     _authenticateHelper = new AuthenticateHelper(
         authorizationCodeStore,
         tokenStore,
         scopeRepository,
         consentRepository,
         clientStore,
         jwksStore,
         eventPublisher,
         logger);
 }
 public ConfirmConsentAction(
     IConsentRepository consentRepository,
     IClientRepository clientRepository,
     IScopeRepository scopeRepository,
     IResourceOwnerRepository resourceOwnerRepository,
     IParameterParserHelper parameterParserHelper,
     IActionResultFactory actionResultFactory,
     IGenerateAuthorizationResponse generateAuthorizationResponse,
     IConsentHelper consentHelper,
     IOpenIdEventSource openidEventSource)
 {
     _consentRepository             = consentRepository;
     _clientRepository              = clientRepository;
     _scopeRepository               = scopeRepository;
     _resourceOwnerRepository       = resourceOwnerRepository;
     _parameterParserHelper         = parameterParserHelper;
     _actionResultFactory           = actionResultFactory;
     _generateAuthorizationResponse = generateAuthorizationResponse;
     _consentHelper     = consentHelper;
     _openidEventSource = openidEventSource;
 }
示例#16
0
        /// <inheritdoc />
        public StudiesModel(
            IStudyRepository studies,
            IStudySubjectRepository subjects,
            IConsentRepository consent,
            IIdentityRepository identityRepository,
            IdentifierDefinitionRegistry identifierDefinitionRegistry,
            IUserProvider user,
            IOptions <IdentifierDisplayOptions> displayOptionsProvider,
            ILogger <StudiesModel> logger
            )
        {
            Studies                           = studies;
            Subjects                          = subjects;
            Logger                            = logger;
            this.user                         = user;
            this.consent                      = consent;
            this.identityRepository           = identityRepository;
            this.identifierDefinitionRegistry = identifierDefinitionRegistry;
            displayOptions                    = displayOptionsProvider.Value;

            SearchGroups = GetDefinedSearchGroups();
        }
 public LocalOpenIdUserAuthenticationAction(
     IAuthorizationCodeStore authorizationCodeStore,
     IAuthenticateResourceOwnerService[] resourceOwnerServices,
     IConsentRepository consentRepository,
     ITokenStore tokenStore,
     IScopeRepository scopeRepository,
     IClientStore clientStore,
     IJwksStore jwksStore,
     IEventPublisher eventPublisher,
     ILogger logger)
 {
     _resourceOwnerServices = resourceOwnerServices;
     _authenticateHelper    = new AuthenticateHelper(
         authorizationCodeStore,
         tokenStore,
         scopeRepository,
         consentRepository,
         clientStore,
         jwksStore,
         eventPublisher,
         logger);
 }
示例#18
0
 public DisplayConsentAction(
     IScopeRepository scopeRepository,
     IClientStore clientRepository,
     IConsentRepository consentRepository,
     IAuthorizationCodeStore authorizationCodeStore,
     ITokenStore tokenStore,
     IJwksStore jwksStore,
     IEventPublisher eventPublisher,
     ILogger logger)
 {
     _scopeRepository               = scopeRepository;
     _clientRepository              = clientRepository;
     _consentRepository             = consentRepository;
     _generateAuthorizationResponse = new GenerateAuthorizationResponse(
         authorizationCodeStore,
         tokenStore,
         scopeRepository,
         clientRepository,
         consentRepository,
         jwksStore,
         eventPublisher,
         logger);
 }
示例#19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UserController"/> class.
 /// </summary>
 /// <param name="resourceOwnerRepository">The resource owner repository.</param>
 /// <param name="authenticationService">The authentication service.</param>
 /// <param name="authenticationSchemeProvider">The authentication scheme provider.</param>
 /// <param name="urlHelperFactory">The URL helper factory.</param>
 /// <param name="actionContextAccessor">The action context accessor.</param>
 /// <param name="consentRepository">The consent repository.</param>
 /// <param name="scopeRepository"></param>
 /// <param name="twoFactorAuthenticationHandler">The two factor authentication handler.</param>
 /// <param name="logger">The logger</param>
 public UserController(
     IResourceOwnerRepository resourceOwnerRepository,
     IAuthenticationService authenticationService,
     IAuthenticationSchemeProvider authenticationSchemeProvider,
     IUrlHelperFactory urlHelperFactory,
     IActionContextAccessor actionContextAccessor,
     IConsentRepository consentRepository,
     IScopeRepository scopeRepository,
     ITwoFactorAuthenticationHandler twoFactorAuthenticationHandler,
     ILogger <UserController> logger)
     : base(authenticationService)
 {
     _resourceOwnerRepository = resourceOwnerRepository;
     _getUserOperation        = new GetUserOperation(resourceOwnerRepository, logger);
     _updateUserTwoFactorAuthenticatorOperation =
         new UpdateUserTwoFactorAuthenticatorOperation(resourceOwnerRepository, logger);
     _authenticationSchemeProvider = authenticationSchemeProvider;
     _consentRepository            = consentRepository;
     _scopeRepository = scopeRepository;
     _urlHelper       = urlHelperFactory.GetUrlHelper(actionContextAccessor.ActionContext !);
     _twoFactorAuthenticationHandler = twoFactorAuthenticationHandler;
     _logger = logger;
 }
示例#20
0
            protected void RecordConsent(
                IEnumerable <IIdentifierValueDto> evidence,
                DateTime dateGiven,
                long?givenByPersonId = null,
                IConsentRepository consentRepository = null,
                long?studyId             = null,
                string subjectIdentifier = null,
                long?personId            = null

                )
            {
                Result = CreateConsentController(consentRepository ?? Consents)
                         .PutConsent(
                    new ConsentSpecification
                {
                    StudyId           = studyId ?? Study.Id,
                    SubjectIdentifier = subjectIdentifier ?? StudySubject.SubjectIdentifier,
                    GivenBy           = givenByPersonId ?? StudySubject.PersonId,
                    PersonId          = personId ?? StudySubject.PersonId,
                    Evidence          = evidence.ToArray(),
                    DateGiven         = dateGiven
                });
            }
示例#21
0
 public AuthenticateHelper(
     IAuthorizationCodeStore authorizationCodeStore,
     ITokenStore tokenStore,
     IScopeRepository scopeRepository,
     IConsentRepository consentRepository,
     IClientStore clientRepository,
     IJwksStore jwksStore,
     IEventPublisher eventPublisher,
     ILogger logger)
 {
     _generateAuthorizationResponse = new GenerateAuthorizationResponse(
         authorizationCodeStore,
         tokenStore,
         scopeRepository,
         clientRepository,
         consentRepository,
         jwksStore,
         eventPublisher,
         logger);
     _consentRepository = consentRepository;
     _clientRepository  = clientRepository;
     _logger            = logger;
 }
示例#22
0
 public ConfirmConsentAction(
     IConsentRepository consentRepository,
     IClientRepository clientRepository,
     IScopeRepository scopeRepository,
     IResourceOwnerRepository resourceOwnerRepository,
     IParameterParserHelper parameterParserHelper,
     IActionResultFactory actionResultFactory,
     IGenerateAuthorizationResponse generateAuthorizationResponse,
     IConsentHelper consentHelper,
     ISimpleIdentityServerEventSource simpleIdentityServerEventSource,
     IAuthenticateResourceOwnerService authenticateResourceOwnerService)
 {
     _consentRepository             = consentRepository;
     _clientRepository              = clientRepository;
     _scopeRepository               = scopeRepository;
     _resourceOwnerRepository       = resourceOwnerRepository;
     _parameterParserHelper         = parameterParserHelper;
     _actionResultFactory           = actionResultFactory;
     _generateAuthorizationResponse = generateAuthorizationResponse;
     _consentHelper = consentHelper;
     _simpleIdentityServerEventSource  = simpleIdentityServerEventSource;
     _authenticateResourceOwnerService = authenticateResourceOwnerService;
 }
示例#23
0
        public static async Task <Consent?> GetConfirmedConsents(
            this IConsentRepository consentRepository,
            string subject,
            AuthorizationParameter authorizationParameter,
            CancellationToken cancellationToken)
        {
            var consents =
                (await consentRepository.GetConsentsForGivenUser(subject, cancellationToken).ConfigureAwait(false))
                ?.ToArray()
                ?? Array.Empty <Consent>();
            Consent?confirmedConsent = null;

            if (consents.Length > 0)
            {
                var claimsParameter = authorizationParameter.Claims;
                if (claimsParameter.IsAnyUserInfoClaimParameter() || claimsParameter.IsAnyIdentityTokenClaimParameter())
                {
                    var expectedClaims = claimsParameter.GetClaimNames();
                    confirmedConsent = consents.FirstOrDefault(
                        c => c.ClientId == authorizationParameter.ClientId &&
                        c.Claims.Length > 0 &&
                        expectedClaims.Length == c.Claims.Length &&
                        expectedClaims.All(cl => c.Claims.Contains(cl)));
                }
                else
                {
                    var scopeNames = authorizationParameter.Scope.ParseScopes();
                    confirmedConsent = consents.FirstOrDefault(
                        c => c.ClientId == authorizationParameter.ClientId &&
                        c.GrantedScopes.Length > 0 &&
                        scopeNames.Length == c.GrantedScopes.Length &&
                        c.GrantedScopes.All(g => scopeNames.Contains(g)));
                }
            }

            return(confirmedConsent);
        }
示例#24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConsentController"/> class.
 /// </summary>
 /// <param name="scopeRepository">The scope repository.</param>
 /// <param name="clientStore">The client store.</param>
 /// <param name="consentRepository">The consent repository.</param>
 /// <param name="dataProtectionProvider">The data protection provider.</param>
 /// <param name="eventPublisher">The event publisher.</param>
 /// <param name="tokenStore">The token store.</param>
 /// <param name="jwksStore">The JWKS store.</param>
 /// <param name="authorizationCodeStore">The authorization code store.</param>
 /// <param name="authenticationService">The authentication service.</param>
 /// <param name="logger">The controller logger.</param>
 public ConsentController(
     IScopeRepository scopeRepository,
     IClientStore clientStore,
     IConsentRepository consentRepository,
     IDataProtectionProvider dataProtectionProvider,
     IEventPublisher eventPublisher,
     ITokenStore tokenStore,
     IJwksStore jwksStore,
     IAuthorizationCodeStore authorizationCodeStore,
     IAuthenticationService authenticationService,
     ILogger <ConsentController> logger)
     : base(authenticationService)
 {
     _dataProtector  = dataProtectionProvider.CreateProtector("Request");
     _clientStore    = clientStore;
     _eventPublisher = eventPublisher;
     _logger         = logger;
     _displayConsent = new DisplayConsentAction(
         scopeRepository,
         clientStore,
         consentRepository,
         authorizationCodeStore,
         tokenStore,
         jwksStore,
         eventPublisher,
         logger);
     _confirmConsent = new ConfirmConsentAction(
         authorizationCodeStore,
         tokenStore,
         consentRepository,
         clientStore,
         scopeRepository,
         jwksStore,
         eventPublisher,
         logger);
 }
示例#25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContentService"/> class.
 /// </summary>
 public ConsentService(IScopeProvider provider, ILogger logger, IEventMessagesFactory eventMessagesFactory, IConsentRepository consentRepository)
     : base(provider, logger, eventMessagesFactory)
 {
     _consentRepository = consentRepository;
 }
示例#26
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AuthenticateController"/> class.
        /// </summary>
        /// <param name="smsClient">The SMS client.</param>
        /// <param name="dataProtectionProvider">The data protection provider.</param>
        /// <param name="urlHelperFactory">The URL helper factory.</param>
        /// <param name="actionContextAccessor">The action context accessor.</param>
        /// <param name="eventPublisher">The event publisher.</param>
        /// <param name="authorizationCodeStore">The authorization code store.</param>
        /// <param name="authenticationService">The authentication service.</param>
        /// <param name="authenticationSchemeProvider">The authentication scheme provider.</param>
        /// <param name="twoFactorAuthenticationHandler">The two factor authentication handler.</param>
        /// <param name="subjectBuilder">The subject builder.</param>
        /// <param name="consentRepository">The consent repository.</param>
        /// <param name="scopeRepository">The scope repository.</param>
        /// <param name="tokenStore">The token store.</param>
        /// <param name="resourceOwnerRepository">The resource owner repository.</param>
        /// <param name="confirmationCodeStore">The confirmation code store.</param>
        /// <param name="clientStore">The client store.</param>
        /// <param name="jwksStore">The JWKS store.</param>
        /// <param name="accountFilters">The account filters.</param>
        /// <param name="logger">The controller logger.</param>
        /// <param name="runtimeSettings">The runtime settings.</param>
        public AuthenticateController(
            ISmsClient smsClient,
            IDataProtectionProvider dataProtectionProvider,
            IUrlHelperFactory urlHelperFactory,
            IActionContextAccessor actionContextAccessor,
            IEventPublisher eventPublisher,
            IAuthorizationCodeStore authorizationCodeStore,
            IAuthenticationService authenticationService,
            IAuthenticationSchemeProvider authenticationSchemeProvider,
            ITwoFactorAuthenticationHandler twoFactorAuthenticationHandler,
            ISubjectBuilder subjectBuilder,
            IConsentRepository consentRepository,
            IScopeRepository scopeRepository,
            ITokenStore tokenStore,
            IResourceOwnerRepository resourceOwnerRepository,
            IConfirmationCodeStore confirmationCodeStore,
            IClientStore clientStore,
            IJwksStore jwksStore,
            IEnumerable <IAccountFilter> accountFilters,
            ILogger <AuthenticateController> logger,
            RuntimeSettings runtimeSettings)
            : base(
                dataProtectionProvider,
                urlHelperFactory,
                actionContextAccessor,
                eventPublisher,
                authenticationService,
                authenticationSchemeProvider,
                twoFactorAuthenticationHandler,
                authorizationCodeStore,
                consentRepository,
                scopeRepository,
                tokenStore,
                resourceOwnerRepository,
                confirmationCodeStore,
                clientStore,
                jwksStore,
                subjectBuilder,
                accountFilters,
                logger,
                runtimeSettings)
        {
            _eventPublisher        = eventPublisher;
            _confirmationCodeStore = confirmationCodeStore;
            _logger           = logger;
            _getUserOperation = new GetUserOperation(resourceOwnerRepository, logger);
            var generateSms = new GenerateAndSendSmsCodeOperation(smsClient, confirmationCodeStore, logger);

            _smsAuthenticationOperation = new SmsAuthenticationOperation(
                runtimeSettings,
                smsClient,
                confirmationCodeStore,
                resourceOwnerRepository,
                subjectBuilder,
                accountFilters.ToArray(),
                eventPublisher,
                logger);
            _validateConfirmationCode = new ValidateConfirmationCodeAction(confirmationCodeStore);
            _authenticateHelper       = new AuthenticateHelper(
                authorizationCodeStore,
                tokenStore,
                scopeRepository,
                consentRepository,
                clientStore,
                jwksStore,
                eventPublisher,
                logger);
            _generateAndSendSmsCodeOperation = generateSms;
        }
示例#27
0
 public ConsentHelper(IConsentRepository consentRepository, IParameterParserHelper parameterParserHelper)
 {
     _consentRepository     = consentRepository;
     _parameterParserHelper = parameterParserHelper;
 }
示例#28
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="consentRepository"></param>
 public ConsentController(IConsentRepository consentRepository)
 {
     this.consentRepository = consentRepository;
 }
 public ConsentStore(IConsentRepository repository)
 {
     _repository = repository;
 }
示例#30
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="ContentService" /> class.
 /// </summary>
 public ConsentService(ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IConsentRepository consentRepository)
     : base(provider, loggerFactory, eventMessagesFactory) =>
示例#31
0
 public ConsentService(IConsentRepository consentRepository)
 {
     _consentRepository = consentRepository;
 }