Blocking auth requests

This approach sends an authentication request and waits for the user to respond before continuing the execution.

This approach is useful when you want to wait for a user to respond to the authentication before continuing, and you don’t have timeout limitations on your server. An example could be authenticating a user on your command line script.

Lets see how it works, the functions below show a full cycle for a blocking authentication.

rescue => e # An exception will be raised in case of a timeout or internal error
    return false
resp, err != client.AuthenticationService().Request("1112223334")
if err != nil {
    println("authentication rejected")
try {
    let res = await client.authentication().request("1112223334")
    if(res.isAccepted() == true) {`${res.selfID} is now authenticated 🤘`)
    } else if(res.accepted == false) {
        client.logger.warn(`${res.selfID} has rejected your authentication request`)
    } else {
} catch (error) {