-
- All Implemented Interfaces:
-
com.onesignal.common.modeling.ISingletonModelStoreChangeHandler,com.onesignal.core.internal.startup.IStartableService
public final class IdentityVerificationService implements IStartableService, ISingletonModelStoreChangeHandler<ConfigModel>
Single source of truth for Identity Verification gating, and for forwarding HYDRATE events to the com.onesignal.core.internal.operations.IOperationRepo post-HYDRATE choreography.
Gate state is derived on read from the injected IFeatureManager (rollout flag) and ConfigModelStore (customer
jwt_required); nothing is duplicated here. UNKNOWN (pre-HYDRATE) reads asfalsefor both gates, which is the safe default.Invariant
ivBehaviorActive == true ⇒ newCodePathsRun == trueholds because both are derived from the sameuseIdentityVerificationfield.Consumers (e.g. OperationRepo) wire post-HYDRATE behavior via setOnJwtConfigHydratedHandler; the handler fires once per HYDRATE with
ivRequired = useIdentityVerification == REQUIRED.
-
-
Field Summary
Fields Modifier and Type Field Description private final BooleanivBehaviorActiveprivate final BooleannewCodePathsRun
-
Constructor Summary
Constructors Constructor Description IdentityVerificationService(IFeatureManager featureManager, ConfigModelStore configModelStore)
-
Method Summary
Modifier and Type Method Description final BooleangetIvBehaviorActive()final BooleangetNewCodePathsRun()final UnitsetOnJwtConfigHydratedHandler(Function1<Boolean, Unit> handler)Register a handler invoked once per HYDRATE of the config model. Unitstart()Called when the service is to be started. UnitonModelReplaced(ConfigModel model, String tag)Called when the model has been replaced. UnitonModelUpdated(ModelChangedArgs args, String tag)Called when a property within the model has been updated. -
-
Constructor Detail
-
IdentityVerificationService
IdentityVerificationService(IFeatureManager featureManager, ConfigModelStore configModelStore)
-
-
Method Detail
-
getIvBehaviorActive
final Boolean getIvBehaviorActive()
-
getNewCodePathsRun
final Boolean getNewCodePathsRun()
-
setOnJwtConfigHydratedHandler
final Unit setOnJwtConfigHydratedHandler(Function1<Boolean, Unit> handler)
Register a handler invoked once per HYDRATE of the config model. Used by OperationRepo to release pre-HYDRATE deferral and (when IV is required) purge anonymous queued ops. Pass
nullto clear.
-
start
Unit start()
Called when the service is to be started. The appId and appContext have already been established.
-
onModelReplaced
Unit onModelReplaced(ConfigModel model, String tag)
Called when the model has been replaced.
- Parameters:
model- The modeltag- The tag which identifies how/why the model was replaced.
-
onModelUpdated
Unit onModelUpdated(ModelChangedArgs args, String tag)
Called when a property within the model has been updated. This callback wraps IModelChangedHandler.onChanged so users of the model store does not need to manage subscriptions to the individual Model within the store.
- Parameters:
args- The model changed arguments.tag- The tag which identifies how/why the model was updated.
-
-
-
-