...
The secureClient Provisioning and start can be achieved via the singleton instance of the SecureClient
class.
...
Version 1.1.0+
Code Block |
---|
// Get the class instance and start provisioning
var secureClient = SecureClient.getInstance(activity, AOneAppSecurityCbk(activity))
...
secureClient.provision(settings) |
Version 1.1.3+
Code Block |
---|
// Get the class instance and start provisioning
var secureClient = SecureClient.getInstance(AOneAppSecurityCbk())
...
secureClient.authenticate(activity)
secureClient.provision(settings)
secureClient.clientInitialize()
secureClient.clientStart()
|
...
Code Block |
---|
// Provisioning parameters val settings = """ |{ |"domain":"dev.atheos.ca", |"port":443, |"osType":"Android", |"hardwareDescription":"AmadisOneClient", |"terminalId":"11111111111", |"clientId":"<client_id>", |"secret":"<client_secret>", |"ownCertPass":"amadis", |"checkSrvCert":"iSSuer.Cn = Alexandre Munsch | subJect/St ~ Quebec ", |"certDir": "${getSecureClientDir()}", |"safetynetKey":"<safetynet_key>" |}""".trimMargin() |
The “checkSrvCert” element cannot be empty and should contain valid information for both the issuer
and the subject
fields.
Flow
The provisioning step is supposed to happen only once in the application lifetime (unless some parameters need to be changed - for example, a change of user ID or a change of domain name, etc…).
...