Skip to main content

Activation

Before proceeding with activation, users must obtain an activation code using a Postman collection integrated with API calls designed to retrieve the code. Refer to how to use Postman documentation step-by-step instructions on generating this activation code.

When a StartResultEvent with ACTIVATION_REQUIRED as sdkState is received in response to the StartEvent, users should initiate the Activation flow.

This involves triggering the KSSIDP activate to provide the username, activation code, and desired password to the IDP. It is crucial to strictly follow the specified flows in the correct sequence for a seamless and successful activation process.

KSSIDP Activation flow diagram for KOBIL Shift Lite

The event flow diagram illustrates the sequence of events during the activation process for KOBIL Shift Lite - KSSIDP.

Swift/iOS

KssIdpActivation function, acts as the bridge between the user interface and the identity provider. This function utilizes the activate method from KssIdpWrapper to trigger the activation process, with the result being handled by the handleResult function.

For Swift, you can trigger Activation process by this code snippet:

Triggering KssIdpActivation (Swift/iOS)

func KssIdpActivation(
clientId: String,
authMode: KSMAuthenticationMode,
credentials: [String: String]) {

self.kssIdpWrapper.activate(clientId: clientId,
credentials: credentials,
authMode: authMode) { resultObject, _ in
handleResult(resultObject: resultObject)
}
}

Android/Kotlin

This function utilizes the activate method from KssIdp Instance to trigger the activation process, with the result being handled by the onResultReceived listener.

Triggering KssIdpActivation (Kotlin)
 
fun KssIdpActivation(
clientId: String,
authMode: AuthenticationMode,
credentials : HashMap<String, String>,
onResultReceived: ((result: ResultObject) -> Unit)? = onResultReceivedCallback
) {
launchIO {
KssIdp.getInstance()?.activate(clientId, authMode, credentials, onResultReceived)?.then {
// handle result
}
}
}


Request params

Parameters which are used in KSSIDP Activation are explained below:

clientId: This value would be provided by the KOBIL IDP services.
credentials: {
"username": VALUE-TO-PASS,
"password": VALUE-TO-PASS,
"activation-code": VALUE-TO-PASS
}


INFO: Note that in the KOBIL Shift Lite environment, you can choose between several authentication modes during the KSSIDP Activation.

To get more info about MC usage during the KSSIDP flows, please check the CreateHttpCommonRequest and SetAuthorisationCode events.

All Platforms

As response to ActivateEvent, KSSIDP sends a SetAuthorisationCodeResultEvent with appropriate status.