Package swiss.trustbroker.config
Class PropertyConfigScheduler
java.lang.Object
swiss.trustbroker.config.PropertyConfigScheduler
-
Constructor Summary
ConstructorsConstructorDescriptionPropertyConfigScheduler(AppConfigService appConfigService, swiss.trustbroker.common.setup.service.GitService gitService, TrustBrokerProperties properties, GlobalExceptionHandler globalExceptionHandler) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String> checkReconfig(AdminAction action) Allow a config reload every 1sec (a bit of DOS prevention) given the client knows the admin secret.voidrun()
-
Constructor Details
-
PropertyConfigScheduler
public PropertyConfigScheduler(AppConfigService appConfigService, swiss.trustbroker.common.setup.service.GitService gitService, TrustBrokerProperties properties, GlobalExceptionHandler globalExceptionHandler)
-
-
Method Details
-
run
@Scheduled(cron="${trustbroker.config.claimsMapping.syncSchedule}") public void run() -
checkReconfig
@PostMapping(path="/api/v1/config", consumes="application/json") public org.springframework.http.ResponseEntity<String> checkReconfig(@RequestBody AdminAction action) Allow a config reload every 1sec (a bit of DOS prevention) given the client knows the admin secret. Returns HTTP/404 when the feature is disabled (default) or the action or secret is wrong. Copy and paste this one in DEV "local" setup to speed up config changes.curl -kv http://localhost:8090/api/v1/config \ -H 'Content-Type: application/json' \ -d '{"action":"reload","adminSecret":"trustbroker.config.adminSecret"}' -
runSynchronization
-