Class ApiKeyLoginStarter
java.lang.Object
ch.tocco.nice2.usermanager.impl.auth.ApiKeyLoginStarter
- All Implemented Interfaces:
Runnable
@ConditionalOnProperty(value="ch.tocco.nice2.enableUpgradeMode",
havingValue="false",
matchIfMissing=true)
public class ApiKeyLoginStarter
extends Object
implements Runnable
Creates the logins configured in
ApiKeyLoginProperties (e.g. for an MCP server) that connect to Tocco with a
predefined API key. A login is only created if its key is set and the current RunEnv is one of its run
environments.
Like the support login the logins belong to the support user, but they are not flagged as support login. They
are flagged with system_api_key instead: such a login is removed by ApiKeyLoginCleanup as soon as it
is no longer configured for the current run environment, and keeps no API key besides the configured one.
-
Constructor Summary
ConstructorsConstructorDescriptionApiKeyLoginStarter(org.slf4j.Logger log, RunEnvironmentService runEnvironmentService, ExecutionContextManager executionContextManager, SupportUserLoginService supportUserLoginService, ApiKeyManager apiKeyManager, ApiKeyLoginProperties properties, ApiKeyLoginCleanup apiKeyLoginCleanup) -
Method Summary
-
Constructor Details
-
ApiKeyLoginStarter
public ApiKeyLoginStarter(org.slf4j.Logger log, RunEnvironmentService runEnvironmentService, ExecutionContextManager executionContextManager, SupportUserLoginService supportUserLoginService, ApiKeyManager apiKeyManager, ApiKeyLoginProperties properties, ApiKeyLoginCleanup apiKeyLoginCleanup)
-
-
Method Details
-
run
-