Authentication request modifiersExplore the different options an authentication request presents
Async
We’ve already covered this modifier on the Asynchronous authentication requests.
It basically allows you to send an authentication request and ignore any responses.
This is usually used in combination with an Authentication response subscription
This modifier accepts a boolean.
cid = @client.
authentication.
request("1112223334", async: true)
// Given the language nature this modifier is not implemented on Go.
let res = await client.
authentication().
request("1112223334", { 'async': true })
CID
Providing a cid allows you to override the randomly generated conversation id with your own, this is useful to keep track of conversations with a preset identifier, let’s see the asynchronous example using a custom cid.
Instead of using the randomly generated conversation identifier, we can force the system to use our own unique id.
@client.
authentication.
request("1112223334", cid: "conversation_id")
client.
AuthenticationService().
RequestAsync("1112223334", "conversation_id")
let res = await client.
authentication().
request("1112223334", { 'cid': "conversation_id" })
Expiration timeout
Providing exp_timeout parameter permits modify the default expiration timeout of an authentication request, making it only valid for a custom time.
Its provided as an integer with the total amount of seconds you want to be valid.
@client.
authentication.
request("1112223334", exp_timeout: 20000)
// Not supported
// Not supported