Class IdentityService
java.lang.Object
org.openremote.container.security.IdentityService
- All Implemented Interfaces:
org.openremote.model.ContainerService
public abstract class IdentityService
extends Object
implements org.openremote.model.ContainerService
Needs to run before persistence service because if BASIC identity provider is configured then flyway must be
configured to manage PUBLIC schema for user data; that configuration is done by the
BasicIdentityProvider and must happen before flyway initialisation.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected IdentityProviderstatic final Stringstatic final Stringstatic final intFields inherited from interface org.openremote.model.ContainerService
DEFAULT_PRIORITY, HIGH_PRIORITY, LOW_PRIORITY, MED_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract IdentityProvidercreateIdentityProvider(org.openremote.model.Container container, String type) To configure theIdentityProvider, subclasses should overrideinit(Container).intGets the priority of this service which is used to determine initialization order when services are auto discovered; services with a lower priority are initialized and started first.voidinit(org.openremote.model.Container container) All services are initialized in the order they have been added to the container (if container started with explicit list of services) otherwise they are initialized in order ofContainerService.getPriority().booleanIf Keycloak is enabled, support multi-tenancy.voidsecureDeployment(io.undertow.servlet.api.DeploymentInfo deploymentInfo) voidstart(org.openremote.model.Container container) After initialization, services are started in the order they have been added to the container (if container started with explicit list of services) otherwise they are started in order ofContainerService.getPriority().voidstop(org.openremote.model.Container container) When the container is shutting down, it stops all services in the reverse order they were started.
-
Field Details
-
PRIORITY
public static final int PRIORITY- See Also:
-
OR_IDENTITY_PROVIDER
- See Also:
-
OR_IDENTITY_PROVIDER_DEFAULT
- See Also:
-
identityProvider
-
devMode
protected boolean devMode
-
-
Constructor Details
-
IdentityService
public IdentityService()
-
-
Method Details
-
getPriority
public int getPriority()Description copied from interface:org.openremote.model.ContainerServiceGets the priority of this service which is used to determine initialization order when services are auto discovered; services with a lower priority are initialized and started first.- Specified by:
getPriorityin interfaceorg.openremote.model.ContainerService
-
init
Description copied from interface:org.openremote.model.ContainerServiceAll services are initialized in the order they have been added to the container (if container started with explicit list of services) otherwise they are initialized in order ofContainerService.getPriority().- Specified by:
initin interfaceorg.openremote.model.ContainerService- Throws:
Exception
-
start
Description copied from interface:org.openremote.model.ContainerServiceAfter initialization, services are started in the order they have been added to the container (if container started with explicit list of services) otherwise they are started in order ofContainerService.getPriority().- Specified by:
startin interfaceorg.openremote.model.ContainerService- Throws:
Exception
-
stop
Description copied from interface:org.openremote.model.ContainerServiceWhen the container is shutting down, it stops all services in the reverse order they were started.- Specified by:
stopin interfaceorg.openremote.model.ContainerService- Throws:
Exception
-
secureDeployment
public void secureDeployment(io.undertow.servlet.api.DeploymentInfo deploymentInfo) -
isKeycloakEnabled
public boolean isKeycloakEnabled()If Keycloak is enabled, support multi-tenancy. -
createIdentityProvider
public abstract IdentityProvider createIdentityProvider(org.openremote.model.Container container, String type) To configure theIdentityProvider, subclasses should overrideinit(Container).
-