예제 #1
0
 public OpenBankingApiAccountConsentController(
     IOAuthUserRepository oauthUserRepository,
     IOAuthClientRepository oauthClientRepository,
     IUserConsentFetcher userConsentFetcher,
     IDataProtectionProvider dataProtectionProvider,
     IAccountAccessConsentRepository accountAccessConsentRepository,
     IAccountRepository accountRepository,
     IExtractRequestHelper extractRequestHelper,
     IResponseModeHandler responseModeHandler,
     IMediator mediator,
     ILogger <OpenBankingApiAccountConsentController> logger,
     IOptions <OAuthHostOptions> oauthHostOptions,
     IOptions <OpenBankingApiOptions> openbankingApiOptions)
 {
     _oauthUserRepository            = oauthUserRepository;
     _oauthClientRepository          = oauthClientRepository;
     _userConsentFetcher             = userConsentFetcher;
     _dataProtector                  = dataProtectionProvider.CreateProtector("Authorization");
     _accountAccessConsentRepository = accountAccessConsentRepository;
     _accountRepository              = accountRepository;
     _responseModeHandler            = responseModeHandler;
     _extractRequestHelper           = extractRequestHelper;
     _mediator              = mediator;
     _logger                = logger;
     _oauthHostOptions      = oauthHostOptions.Value;
     _openbankingApiOptions = openbankingApiOptions.Value;
 }
 public OpenBankingApiAccountConsentController(
     IOAuthUserQueryRepository oauthUserRepository,
     IOAuthUserCommandRepository oauthUserCommandRepository,
     IOAuthClientQueryRepository oauthClientRepository,
     IUserConsentFetcher userConsentFetcher,
     IDataProtectionProvider dataProtectionProvider,
     IAccountAccessConsentRepository accountAccessConsentRepository,
     IAccountRepository accountRepository,
     IMediator mediator,
     ILogger <OpenBankingApiAccountConsentController> logger,
     IOptions <OAuthHostOptions> oauthHostOptions,
     IOptions <OpenBankingApiOptions> openbankingApiOptions)
 {
     _oauthUserRepository        = oauthUserRepository;
     _oAuthUserCommandRepository = oauthUserCommandRepository;
     _oauthClientRepository      = oauthClientRepository;
     _userConsentFetcher         = userConsentFetcher;
     _dataProtector = dataProtectionProvider.CreateProtector("Authorization");
     _accountAccessConsentRepository = accountAccessConsentRepository;
     _accountRepository     = accountRepository;
     _mediator              = mediator;
     _logger                = logger;
     _oauthHostOptions      = oauthHostOptions.Value;
     _openbankingApiOptions = openbankingApiOptions.Value;
 }
 public JwksRequestHandler(
     IJsonWebKeyRepository jsonWebKeyRepository,
     IOptions <OAuthHostOptions> options)
 {
     _jsonWebKeyRepository = jsonWebKeyRepository;
     _options = options.Value;
 }
예제 #4
0
 public MetadataController(
     IOptions <OAuthHostOptions> options,
     IMetadataResultBuilder metadataResultBuilder)
 {
     _options = options.Value;
     _metadataResultBuilder = metadataResultBuilder;
 }
 public MetadataResultBuilder(
     IOptions <OAuthHostOptions> options,
     ITranslationRepository translationRepository)
 {
     _options = options.Value;
     _translationRepository = translationRepository;
     _dic = new Dictionary <string, Type>();
 }
예제 #6
0
 public ConsentsController(IOAuthUserQueryRepository oauthUserRepository, IOAuthUserCommandRepository oauthUserCommandRepository, IOAuthClientQueryRepository oauthClientRepository, IUserConsentFetcher userConsentFetcher, IDataProtectionProvider dataProtectionProvider, IOptions <OAuthHostOptions> opts)
 {
     _oauthUserRepository        = oauthUserRepository;
     _oAuthUserCommandRepository = oauthUserCommandRepository;
     _oauthClientRepository      = oauthClientRepository;
     _userConsentFetcher         = userConsentFetcher;
     _dataProtector    = dataProtectionProvider.CreateProtector("Authorization");
     _oauthHostOptions = opts.Value;
 }
예제 #7
0
 public GetOTPQRCodeHandler(
     IOptions <OAuthHostOptions> options,
     IOAuthUserRepository oauthUserRepository,
     ILogger <GetOTPQRCodeHandler> logger)
 {
     _options             = options.Value;
     _logger              = logger;
     _oauthUserRepository = oauthUserRepository;
 }
 public MtlsAuthenticationMiddleware(
     RequestDelegate next,
     ILogger <MtlsAuthenticationMiddleware> logger,
     IOptions <OAuthHostOptions> options)
 {
     _next    = next;
     _logger  = logger;
     _options = options.Value;
 }
 public GetOTPCodeHandler(
     IOAuthUserRepository oAuthUserRepository,
     ILogger <GetOTPCodeHandler> logger,
     IOptions <OAuthHostOptions> options,
     IEnumerable <IOTPAuthenticator> otpAuthenticators)
 {
     _oauthUserRepository = oAuthUserRepository;
     _logger            = logger;
     _options           = options.Value;
     _otpAuthenticators = otpAuthenticators;
 }
예제 #10
0
 public SmsAuthService(
     IOAuthUserRepository oauthUserRepository,
     IEnumerable <IOTPAuthenticator> authenticators,
     IOptions <OAuthHostOptions> options,
     IOptions <SmsHostOptions> smsHostOptions)
 {
     _oauthUserRepository = oauthUserRepository;
     _authenticators      = authenticators;
     _options             = options.Value;
     _smsHostOptions      = smsHostOptions.Value;
 }
예제 #11
0
 public EmailAuthService(
     IOAuthUserRepository oauthUserRepository,
     IEnumerable <IOTPAuthenticator> authenticators,
     IOptions <OAuthHostOptions> options,
     IOptions <EmailHostOptions> emailOptions)
 {
     _oauthUserRepository = oauthUserRepository;
     _authenticators      = authenticators;
     _options             = options.Value;
     _emailOptions        = emailOptions.Value;
 }
예제 #12
0
        public static string GetLanguage(this Controller controller, OAuthHostOptions options)
        {
            if (controller.Request.Headers.ContainsKey(TranslationHelper.AcceptLanguage))
            {
                var strValues = controller.Request.Headers[TranslationHelper.AcceptLanguage];
                if (strValues.Count == 0)
                {
                    return(null);
                }

                var requestedLanguages = strValues.First().Split(' ');
                var cultureInfo        = TranslationHelper.GetCulture(requestedLanguages, options.SupportedUICultures);
                return(cultureInfo == null ? null : cultureInfo.Name);
            }

            return(null);
        }
예제 #13
0
        private async Task <bool> UpdateLanguage(string languages, OAuthHostOptions opts, HttpContext context)
        {
            if (string.IsNullOrWhiteSpace(languages))
            {
                return(false);
            }

            var splittedUILocales = languages.Split(' ');

            if (TranslationHelper.TrySwitchCulture(splittedUILocales, opts.SupportedUICultures))
            {
                await _next(context);

                return(true);
            }

            return(false);
        }
예제 #14
0
 public ConfigurationRequestHandler(
     IOAuthScopeRepository oauthScopeRepository,
     IEnumerable <IResponseTypeHandler> authorizationGrantTypeHandlers,
     IEnumerable <IOAuthResponseMode> oauthResponseModes,
     IEnumerable <IGrantTypeHandler> grantTypeHandlers,
     IEnumerable <IOAuthClientAuthenticationHandler> oauthClientAuthenticationHandlers,
     IEnumerable <ISignHandler> signHandlers,
     IOAuthWorkflowConverter oauthWorkflowConverter,
     IOptions <OAuthHostOptions> options)
 {
     _oauthScopeRepository           = oauthScopeRepository;
     _authorizationGrantTypeHandlers = authorizationGrantTypeHandlers;
     _oauthResponseModes             = oauthResponseModes;
     _grantTypeHandlers = grantTypeHandlers;
     _oauthClientAuthenticationHandlers = oauthClientAuthenticationHandlers;
     _signHandlers           = signHandlers;
     _oauthWorkflowConverter = oauthWorkflowConverter;
     _options = options.Value;
 }
예제 #15
0
 public ManagementController(
     IOAuthScopeRepository oauthScopeRepository,
     IGetOAuthClientHandler getOAuthClientHandler,
     ISearchOauthClientsHandler searchOauthClientsHandler,
     IUpdateOAuthClientHandler updateOAuthClientHandler,
     IAddOAuthClientHandler addOAuthClientHandler,
     IDeleteOAuthClientHandler deleteOAuthClientHandler,
     ISearchOAuthScopesHandler searchOAuthScopesHandler,
     IUpdateOAuthScopeHandler updateOAuthScopeHandler,
     IAddOAuthScopeHandler addOAuthScopeHandler,
     IDeleteOAuthScopeHandler deleteOAuthScopeHandler,
     IUpdateUserBySCIMIdHandler updateUserBySCIMIdHandler,
     IGetUserBySCIMIdHandler getUserBySCIMIdHandler,
     IUpdateUserPasswordHandler updateUserPasswordHandler,
     IAddOAuthUserBySCIMIdHandler addOAuthUserBySCIMIdHandler,
     IGetOTPCodeHandler getOTPCodeHandler,
     IGetOTPQRCodeHandler getOTPQRCodeHandler,
     IOptions <OAuthHostOptions> options)
 {
     _oauthScopeRepository        = oauthScopeRepository;
     _getOAuthClientHandler       = getOAuthClientHandler;
     _searchOauthClientsHandler   = searchOauthClientsHandler;
     _updateOAuthClientHandler    = updateOAuthClientHandler;
     _addOAuthClientHandler       = addOAuthClientHandler;
     _deleteOAuthClientHandler    = deleteOAuthClientHandler;
     _searchOAuthScopesHandler    = searchOAuthScopesHandler;
     _updateOAuthScopeHandler     = updateOAuthScopeHandler;
     _addOAuthScopeHandler        = addOAuthScopeHandler;
     _deleteOAuthScopeHandler     = deleteOAuthScopeHandler;
     _updateUserBySCIMIdHandler   = updateUserBySCIMIdHandler;
     _getUserBySCIMIdHandler      = getUserBySCIMIdHandler;
     _updateUserPasswordHandler   = updateUserPasswordHandler;
     _addOAuthUserBySCIMIdHandler = addOAuthUserBySCIMIdHandler;
     _getOTPCodeHandler           = getOTPCodeHandler;
     _getOTPQRCodeHandler         = getOTPQRCodeHandler;
     _options = options.Value;
 }
예제 #16
0
 public TranslationHelper(IOptions <OAuthHostOptions> options)
 {
     _oauthHostOptions = options.Value;
 }
 public AuthorizationCodeResponseTypeHandler(IGrantedTokenHelper grantedTokenHelper, IEnumerable <ITokenBuilder> tokenBuilders, IOptions <OAuthHostOptions> options)
 {
     _grantedTokenHelper = grantedTokenHelper;
     _tokenBuilders      = tokenBuilders;
     _options            = options.Value;
 }
예제 #18
0
 public AuthorizationCodeResponseTypeHandler(IGrantedTokenHelper grantedTokenHelper, IEnumerable <ICodeChallengeMethodHandler> codeChallengeMethodHandlers, IOptions <OAuthHostOptions> options)
 {
     _grantedTokenHelper          = grantedTokenHelper;
     _codeChallengeMethodHandlers = codeChallengeMethodHandlers;
     _options = options.Value;
 }
 public TOTPAuthenticator(IOptions <OAuthHostOptions> options)
 {
     _options = options.Value;
 }
 public AddOpenIdClientHandler(IOAuthClientRepository oauthClientRepository, IOptions <OAuthHostOptions> options)
 {
     _oauthClientRepository = oauthClientRepository;
     _options = options.Value;
 }
예제 #21
0
 public AccessTokenBuilder(IGrantedTokenHelper grantedTokenHelper, IJwtBuilder jwtBuilder, IOptions <OAuthHostOptions> options)
 {
     _grantedTokenHelper = grantedTokenHelper;
     _jwtBuilder         = jwtBuilder;
     _oauthHostOptions   = options.Value;
 }