public OpenBankingApiAccountConsentController( IOAuthUserRepository oauthUserRepository, IOAuthClientRepository oauthClientRepository, IUserConsentFetcher userConsentFetcher, IDataProtectionProvider dataProtectionProvider, IAccountAccessConsentRepository accountAccessConsentRepository, IAccountRepository accountRepository, IExtractRequestHelper extractRequestHelper, IResponseModeHandler responseModeHandler, IMediator mediator, ILogger <OpenBankingApiAccountConsentController> logger, IOptions <SimpleIdServerCommonOptions> commonOptions, 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; _commonOptions = commonOptions.Value; _openbankingApiOptions = openbankingApiOptions.Value; }
public MetadataController( IOptions <SimpleIdServerCommonOptions> commonOptions, IMetadataResultBuilder metadataResultBuilder) { this.commonOptions = commonOptions.Value; _metadataResultBuilder = metadataResultBuilder; }
public MetadataResultBuilder( IOptions <SimpleIdServerCommonOptions> options, ITranslationRepository translationRepository) { _options = options.Value; _translationRepository = translationRepository; _dic = new Dictionary <string, Type>(); }
public static string GetLanguage(this Controller controller, SimpleIdServerCommonOptions 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); }
private async Task <bool> UpdateLanguage(string languages, SimpleIdServerCommonOptions 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); }
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 <SimpleIdServerCommonOptions> commonOptions) { _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; _commonOptions = commonOptions.Value; }
public TranslationHelper(IOptions <SimpleIdServerCommonOptions> commonOptions) { _commonOptions = commonOptions.Value; }