SAPcpmsCSRFTokenConfigurationStep
open class SAPcpmsCSRFTokenConfigurationStep : SimpleTaskStep
An OnboardingStep capable of registering the CSRFTokenObserver in the onboard / restore flow.
Use this step if you enabled CSRF Protection for your app in SAP Mobile Services.
-
Instantiates an OnboardingStep capable of registering the
CSRFTokenObserver, using SAP Mobile Services as rootURL, in the onboard / restore flow.It will remove any
CSRFTokenObserverinstances during the reset flow.Declaration
Swift
public init(infoKey: OnboardingInfoKey = .sapcpmsSettingsParameters)Parameters
infoKeythe necessary SAPcpmsSettingsParameters must be present under this key in the OnboardingContext’s info object
-
This method creates the
CSRFTokenObserverinstance used on theSAPURLSessionin theOnboardingContext. You may override this method if your backend endponts are also CSRF protected. Then you must use a customCSRFTokenURLProvidingto provide the correct CSRF URL for different request URL’s.Note: The default implementation will only handle CSRF protection for services offered by SAP Mobile Services, e.g. client log upload
Declaration
Swift
open func createCSRFTokenObserver(settingsParameters: SAPcpmsSettingsParameters) -> CSRFTokenObserverParameters
settingsParametersto identify to which
backendURLthe logout request shall be sendReturn Value
An instance of the
CSRFTokenObserver