ApplicationAttestationStep
public class ApplicationAttestationStep : OnboardingStep
An Onboarding step implementation which registers AttestationObserver
to the SAPURLSession
in the onboard, restore and reset passcode flow.
Use this step to ensure that requests your server receives come from legitimate instances of your application.
SAP BTP SDK For iOS uses Apple’s DeviceCheck
framework to assert the legitimacy of a particular instance of your application to SAP Mobile Services from where administrators can assess the fraud risk and eventually enforce HTTP communication for asserted devices only.
For more information on AppAttest: https://developer.apple.com/documentation/devicecheck/establishing_your_app_s_integrity
-
The maximum number of times Application Attestation is retried for the error
DCError.serverUnavailable
Declaration
Swift
public let maxAppleServerFailureRetries: Int
-
Initializes an instance of ApplicationAttestationStep
Declaration
Swift
public init(maxAppleServerFailureRetries: Int = 3)
Parameters
maxAppleServerFailureRetries
The maximum number of times Application Attestation is retried for the error
DCError.serverUnavailable
. Default value is3
. -
Configures
AttestationObserver
with values from theOnboardingContext
and adds it toSAPURLSession
during the onboard flowDeclaration
Swift
public func onboard(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)
-
Configures
AttestationObserver
with values from theOnboardingContext
and adds it toSAPURLSession
during the restore flowDeclaration
Swift
public func restore(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)
-
Resets values set during Application attestation and removes
AttestationObserver
fromSAPURLSession
Declaration
Swift
public func reset(context: OnboardingContext, completionHandler: @escaping () -> Void)
-
Configures
AttestationObserver
with values from theOnboardingContext
and adds it toSAPURLSession
during the reset passcode flowDeclaration
Swift
public func resetPasscode(context: OnboardingContext, completionHandler: @escaping (OnboardingResult) -> Void)