Add User
Before proceeding with user addition, 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 or LOGIN_REQUIRED as sdkState is received in response to the StartEvent, users should initiate the Add user flow.
This involves triggering the KSSIDP activate to provide the user name, 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 Add User flow diagram for KOBIL Shift Lite
The event flow diagram illustrates the sequence of events during the add user process for KOBIL Shift Lite - KSSIDP.
Swift/iOS
KssIdpAddUser function, acts as the bridge between the user interface and the identity provider. This function utilizes the activate method from kssIdpWrapper to trigger the add user process, with the result being handled by the handleResult function.
func KssIdpAddUser(
clientId: String,
authMode: KSMAuthenticationMode,
credentials: [String: String]) {
self.kssIdpWrapper.activate(clientId: clientId,
credentials: credentials,
authMode: authMode) { resultObject, _ in
handleResult(resultObject: resultObject)
}
}
This function utilizes the activate method from KssIdp Instance to trigger the add user process, with the result being handled by the onResultReceived listener.
Android/Kotlin
fun triggerKssIdpAddUser(
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 Add user 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 Add User implementation.
To get more information 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.