SAPcpmsLockWipePolicyApplyStep
public class SAPcpmsLockWipePolicyApplyStep : OnboardingStep
Instantiates an OnboardingStep capable of applying the SAPcpmsLockWipePolicy parameters in the onboard / restore flow.
The SAPcpmsSettings (downloaded form mobile services) contains a blockWipingPolicy part. This policy can be enabeled/disabled depending on mobile services settings.
The policy contains the blockDisconnectedPeriod and wipeDisconnectedPeriod integer values.
E.g.:
“blockWipingPolicy”: {
“blockWipeEnabled”: true,
“blockDisconnectedPeriod”: 1,
“wipeDisconnectedPeriod”: 20
}
The lock disconnected period describes after how many days should lock the user.
The wipe disconnected period describes after how many days should wipe the user.
The start date of the calculation is based on the last successful server communication.
Prerequisite: the SAPcpmsSettingsDownloadStep should be in the flow before the SAPcpmsLockWipePolicyApplyStep.
The step fails with SAPcpmsLockWipePolicyError if the user should lock or wipe by the application or if an internal error occurs.
If SAPcpmsLockWipePolicy and stored Date exists the step checks the dates
If SAPcpmsLockWipePolicy exists and stored Date doesn’t exist the step stores the current date and checks the dates
If SAPcpmsLockWipePolicy doesn’t exist and stored Date exists the step deletes the date
If SAPcpmsLockWipePolicy and stored Date doesn’t exist the step doesn’t do anything
-
Key of SAPcpmsLockWipingPolicy in the context
Declaration
Swift
public let sapcpmsLockWipingPolicyInfoKey: OnboardingInfoKey -
Initializes the object
Declaration
Swift
public init(sapcpmsLockWipingPolicyInfoKey: OnboardingInfoKey = .sapcpmsLockWipingPolicy)Parameters
settingsParametersThe SAPcpmsSettingsParameters necessary to create the SAPcpmsUserRoles component
storeThe store used to store/read the last successful authentication date
infoKeyThe onboarding info key for an instance of
SAPcpmsLockWipingPolicy
-
Onboarding function with context for SAPcpmsLockWipePolicy apply
Declaration
Swift
public func onboard(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)Parameters
contextOnboardingContextobject which contains every information for the OnboardingStepcompletionHandlermust be called by the implementers when the step finishes
-
Restore function with context for SAPcpmsLockWipePolicy apply
Declaration
Swift
public func restore(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)Parameters
contextOnboardingContextobject which contains every information for the OnboardingStepcompletionHandlermust be called by the implementers when the step finishes
-
resetPasscode function with
OnboardingContextsupportDeclaration
Swift
public func resetPasscode(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)Parameters
contextcompletionHandlercalled when the process finished. Step OnboardingResult filled.
-
Reset function with context for SAPcpmsLockWipePolicy apply
Declaration
Swift
public func reset(context: OnboardingContext, completionHandler: @escaping () -> Void)Parameters
contextOnboardingContextobject which contains every information for the OnboardingStepcompletionHandlermust be called by the implementers when the step finishes