WorkflowController callbacks
onStarted
WorkflowController has successfully been initialized.
fun onStarted()
func onStarted()
onAuthenticationStarted
An authentication has been started via startAuthentication. This callback handles the message AUTH of the AusweisApp SDK.
The next callback should be onAccessRights or onAuthenticationCompleted if the authentication immediately results in an error.
fun onAuthenticationStarted()
func onAuthenticationStarted()
onAuthenticationStartFailed
An authentication could not be started. This is different from an authentication that was started but failed during the process.
error: Error message about why the authentication could not be started.
fun onAuthenticationStartFailed(error: String)
func onAuthenticationStartFailed(error: String)
onChangePinStarted
A PIN change has been started via startChangePin. This callback handles the message CHANGE_PIN of the AusweisApp SDK.
fun onChangePinStarted()
func onChangePinStarted()
onAccessRights
Access rights requested in response to an authentication. This callback handles the message ACCESS_RIGHTS of the AusweisApp SDK.
This function will be called once the authentication is started by startAuthentication and the SDK got the certificate from the service provider.
Accept (accept) the rights to continue with the workflow or completely abort the workflow with (cancel).
It is also possible to change the optional rights via setAccessRights.
error: Optional error message if the call to setAccessRights failed.
accessRights: Requested access rights. See section AccessRights.
fun onAccessRights(error: String?, accessRights: AccessRights?)
func onAccessRights(error: String?, accessRights: AccessRights?)
onCertificate
Provides information about the used certificate. This callback handles the message CERTIFICATE of the AusweisApp SDK.
Response to a call to getCertificate.
certificateDescription: Requested certificate. See section CertificateDescription.
fun onCertificate(certificateDescription: CertificateDescription)
func onCertificate(certificateDescription: CertificateDescription)
onInsertCard
Indicates that the workflow now requires an ID card to continue. This callback handles the message INSERT_CARD of the AusweisApp SDK. Also called as a response to getReader.
If your application receives this message it should show a hint to the user. After the user inserted a card the workflow will automatically continue, unless the eID functionality is disabled. In this case, the workflow will be paused until another card is inserted.
Note
iOS only
iOS shows its own NFC reading system dialog while the AusweisApp SDK Wrapper is expecting an ID card.
Warning
Android only
This callback may not be called on Android if the user already inserted a card.
error: Optional detailed error message if the previous call to setCard failed.
fun onInsertCard(error: String?)
func onInsertCard(error: String?)
onPause
Called if the SDK is waiting on a certain condition to be met. This callback handles the message PAUSE of the AusweisApp SDK.
After resolving the cause of the issue, the workflow has to be resumed by calling continueWorkflow.
cause: The cause for the waiting condition. See Cause.
fun onPause(cause: Cause)
func onPause(cause: Cause)
onReader
A specific reader was recognized or has vanished. Also called as a response to getReader. This callback handles the message READER of the AusweisApp SDK.
reader: Recognized or vanished reader, might be nil if an unknown reader was requested in getReader. See Reader.
fun onReader(reader: Reader?)
func onReader(reader: Reader?)
onReaderList
Called as a reponse to getReaderList. This callback handles the message READER_LIST of the AusweisApp SDK.
readers: Optional list of present readers. See Reader.
fun onReaderList(reader: List<Reader>?)
func onReaderList(readers: [Reader]?)
onEnterPin
Indicates that a PIN is required to continue the workflow. This callback handles the message ENTER_PIN of the AusweisApp SDK.
A PIN is needed to unlock the ID card, provide it with setPin. See section Card.
error: Optional error message if the last call to setPin failed.
reader: Information about the used card and card reader. See Reader.
fun onEnterPin(error: String?, reader: Reader)
func onEnterPin(error: String?, reader: Reader)
onEnterNewPin
Indicates that a new PIN is required to continue the workflow. This callback handles the message ENTER_NEW_PIN of the AusweisApp SDK.
A new PIN is needed in response to a PIN change, provide it with setNewPin.
error: Optional error message if the last call to setNewPin failed.
reader: Information about the used card and card reader. See Reader.
fun onEnterNewPin(error: String?, reader: Reader)
func onEnterNewPin(error: String?, reader: Reader)
onEnterPuk
Indicates that a PUK is required to continue the workflow. This callback handles the message ENTER_PUK of the AusweisApp SDK.
A PUK is needed to unlock the ID card, provide it with setPuk. See section Card.
error: Optional error message if the last call to setPuk failed.
reader: Information about the used card and card reader. See Reader.
fun onEnterPuk(error: String?, reader: Reader)
func onEnterPuk(error: String?, reader: Reader)
onEnterCan
Indicates that a CAN is required to continue workflow. This callback handles the message ENTER_CAN of the AusweisApp SDK.
A CAN is needed to unlock either the ID card or the third PIN attempt, provide it with setCan.
error: Optional error message if the last call to setCan failed.
reader: Information about the used card and card reader. See Reader.
fun onEnterCan(error: String?, reader: Reader)
func onEnterCan(error: String?, reader: Reader)
onAuthenticationCompleted
Indicates that the authentication workflow is completed. This callback handles the message AUTH of the AusweisApp SDK.
The authResult will contain a refresh url or in case of an error a communication error address. You can check the state of the authentication, by looking for the AuthResult.error field, null on success.
authResult: Result of the authentication. See section AuthResult.
fun onAuthenticationCompleted(authResult: AuthResult)
func onAuthenticationCompleted(authResult: AuthResult)
onChangePinCompleted
Indicates that the PIN change workflow is completed. This callback handles the message CHANGE_PIN of the AusweisApp SDK.
changePinResult: Result of the PIN change. See section ChangePinResult.
fun onChangePinCompleted(changePinResult: ChangePinResult)
func onChangePinCompleted(changePinResult: ChangePinResult)
onStatus
Provides information about the current workflow and state. This callback indicates if a workflow is in progress or the workflow is paused. This can occur if the AusweisApp needs additional data like ACCESS_RIGHTS or INSERT_CARD. This callback handles the message STATUS of the AusweisApp SDK.
workflowProgress: Holds information about the current workflow progress. See section WorkflowProgress.
fun onStatus(workflowProgress: WorkflowProgress)
func onStatus(workflowProgress: WorkflowProgress)
onInfo
Provides information about the AusweisApp that is used in the SDK Wrapper. This callback handles the message INFO of the AusweisApp SDK.
Response to a call to getInfo.
versionInfo: Holds information about the currently utilized AusweisApp. See VersionInfo.
fun onInfo(versionInfo: VersionInfo)
func onInfo(versionInfo: VersionInfo)
onWrapperError
Indicates that an error within the SDK Wrapper has occurred.
This might be called if there was an error in the workflow.
error: Contains information about the error. See WrapperError.
fun onWrapperError(error: WrapperError)
func onWrapperError(error: WrapperError)
onBadState
Called if the sent command is not allowed within the current workflow. This callback handles the message BAD_STATE of the AusweisApp SDK.
error: Error message which SDK command failed. See Messages.
fun onBadState(error: String)
func onBadState(error: String)
onInternalError
Called if an error within the AusweisApp SDK occurred. Please report this as it indicates a bug. This callback handles the message INTERNAL_ERROR of the AusweisApp SDK.
error: Information about the error.
fun onInternalError(error: String)
func onInternalError(error: String)