authenticate


Description:

public virtual signal void authenticate (Message msg, Auth auth, bool retrying)

Emitted when the session requires authentication.

If credentials are available call authenticate on auth. If these credentials fail, the signal will be emitted again, with retrying set to true, which will continue until you return without calling authenticate on auth.

Note that this may be emitted before msg's body has been fully read.

If you call pause_message on msg before returning, then you can authenticate auth asynchronously (as long as you @ref it to make sure it doesn't get destroyed), and then unpause msg when you are ready for it to continue.

Parameters:

msg

the Message being sent

auth

the Auth to authenticate

retrying

true if this is the second (or later) attempt