/** * Rebind cas configuration properties. * * @param applicationContext the application context */ public void rebindCasConfigurationProperties(final ApplicationContext applicationContext) { rebindCasConfigurationProperties(this.binder, applicationContext); }
@Override public void close() { closeWatchServices(); }
public GroovyScriptMultifactorAuthenticationTrigger(final CasConfigurationProperties casProperties) { this.casProperties = casProperties; val groovyScript = casProperties.getAuthn().getMfa().getGroovyScript(); this.watchableScript = new WatchableGroovyScriptResource(groovyScript); }
private String rememberThemeName(final HttpServletRequest request, final String themeName) { request.setAttribute(casProperties.getTheme().getParamName(), themeName); return themeName; }
@ConditionalOnMissingBean(name = "casManagementConfigurationPropertiesSourceLocator") @Bean public CasConfigurationPropertiesSourceLocator casManagementConfigurationPropertiesSourceLocator() { return new DefaultCasConfigurationPropertiesSourceLocator(casManagementConfigurationCipherExecutor(), casManagementConfigurationPropertiesEnvironmentManager()); }
@ConfigurationPropertiesBinding @Bean public Converter<String, List<Class<? extends Throwable>>> casManagementCommaSeparatedStringToThrowablesCollection() { return new CommaSeparatedStringToThrowablesConverter(); }
@ConditionalOnMissingBean(name = "configurationPropertiesEnvironmentManager") @Bean public CasConfigurationPropertiesEnvironmentManager configurationPropertiesEnvironmentManager() { return new CasConfigurationPropertiesEnvironmentManager(binder, environment); } }
@ConditionalOnMissingBean(name = "casConfigurationPropertiesSourceLocator") @Bean public CasConfigurationPropertiesSourceLocator casConfigurationPropertiesSourceLocator() { return new DefaultCasConfigurationPropertiesSourceLocator( configurationPropertiesEnvironmentManager.getIfAvailable(), configurationPropertiesLoaderFactory()); }
@ConditionalOnMissingBean(name = "casManagementConfigurationPropertiesSourceLocator") @Bean public CasConfigurationPropertiesSourceLocator casManagementConfigurationPropertiesSourceLocator() { return new DefaultCasConfigurationPropertiesSourceLocator(casManagementConfigurationCipherExecutor(), casManagementConfigurationPropertiesEnvironmentManager()); }
/** * Run path watch services. * * @param event the event */ @EventListener public void runPathWatchServices(final ApplicationReadyEvent event) { watchConfigurationDirectoryIfNeeded(); watchConfigurationFileIfNeeded(); }
/** * Method returns a GitUtil wrapping the master repository. * * @return - GitUtil */ @SneakyThrows public GitUtil masterRepository() { return buildGitUtil(casProperties.getVersionControl().getServicesRepo()); }
@SneakyThrows private GitUtil userRepository(final String user) { return buildGitUtil(casProperties.getDelegated().getUserReposDir() + '/' + user); }
/** * Gets resource set uri location. * * @param saved the saved * @return the resource set uri location */ protected String getResourceSetUriLocation(final ResourceSet saved) { return casProperties.getAuthn().getUma().getIssuer() + OAuth20Constants.BASE_OAUTH20_URL + "/" + OAuth20Constants.UMA_RESOURCE_SET_REGISTRATION_URL + "/" + saved.getId(); } }
@ConfigurationPropertiesBinding @Bean public Converter<String, List<Class<? extends Throwable>>> commaSeparatedStringToThrowablesCollection() { return new CommaSeparatedStringToThrowablesConverter(); }
@ConditionalOnMissingBean(name = "casManagementConfigurationPropertiesEnvironmentManager") @Bean public CasConfigurationPropertiesEnvironmentManager casManagementConfigurationPropertiesEnvironmentManager() { return new CasConfigurationPropertiesEnvironmentManager(binder, environment); } }
private void rebind() { LOGGER.info("Refreshing CAS configuration. Stand by..."); if (configurationPropertiesEnvironmentManager != null) { configurationPropertiesEnvironmentManager.rebindCasConfigurationProperties(this.applicationContext); } else { CasConfigurationPropertiesEnvironmentManager.rebindCasConfigurationProperties(this.binder, this.applicationContext); } } }
@ConfigurationPropertiesBinding @Bean public Converter<String, List<Class<? extends Throwable>>> casManagementCommaSeparatedStringToThrowablesCollection() { return new CommaSeparatedStringToThrowablesConverter(); }
@ConditionalOnMissingBean(name = "casManagementConfigurationPropertiesEnvironmentManager") @Bean public CasConfigurationPropertiesEnvironmentManager casManagementConfigurationPropertiesEnvironmentManager() { return new CasConfigurationPropertiesEnvironmentManager(binder, environment); } }