SLSAuthenticationStep

open class SLSAuthenticationStep: OnboardingStep

Onboarding step implementation of SLS certificate authentication Used in the onboarding/restoring flow, this step is responsible to configure the app’s URLSession to be able to communicate with SLS authentication protected resources. Creates and registers the UserIdentityObserver to the SAPURLSession, then sends a validation request which will trigger an authentication flow.

  • Onboards to the given URL

    Declaration

    Swift

    open func onboard(sapURLSession: SAPURLSession, authenticationURL: URL, credentialStore: CodableStoring, presentationDelegate: FlowPresentationDelegate, slsConfigurationParameters: SLSConfigurationParameters, completionHandler: @escaping (Error?) -> Void)

    Parameters

    sapURLSession

    SAPURLSession that handle the connection to the authenticationURL

    authenticationURL

    resource URL that needs SLS authentication

    credentialStore

    UserIdentity will save in the given store

    presentationDelegate

    delegate to present the ViewController for authentication

    slsConfigurationParameters

    prefilled SLSConfigurationParameters instance

    completionHandler

    called when the process finished. Error filled on failure.

  • Restore the previous state of onboarding

    Declaration

    Swift

    open func restore(sapURLSession: SAPURLSession, authenticationURL: URL, credentialStore: CodableStoring, presentationDelegate: FlowPresentationDelegate, slsConfigurationParameters: SLSConfigurationParameters, completionHandler: @escaping (Error?) -> Void)

    Parameters

    sapURLSession

    SAPURLSession that handle the connection to the authenticationURL

    authenticationURL

    resource URL that needs SLS authentication

    credentialStore

    UserIdentity will save in the given store

    presentationDelegate

    delegate to present the ViewController for authentication

    slsConfigurationParameters

    prefilled SLSConfigurationParameters instance

    completionHandler

    called when the process finished. Error filled on failure.

  • Resets the step’s onboarding state

    Declaration

    Swift

    open func reset(sapURLSession: SAPURLSession, completionHandler: @escaping () -> Void)

    Parameters

    completionHandler

    called when the process finished

  • Create a store to keep the credential

    Declaration

    Swift

    open func createUserIdentityStore(using credentialsStore: CodableStoring) -> UserIdentityStoring

    Parameters

    credentialsStore

    The provided base store.

    Return Value

    An instance of UserIdentity.