authenticate
Description:
Emitted when the proxy requires authentication.
If credentials are available, set the 'username' and 'password' properties on proxy
and return true
from the
callback. This will cause the signal emission to stop, and librest will try to connect with these credentials If these credentials fail, the
signal will be emitted again, with retrying
set to true
, which will continue until false
is returned from
the callback.
If you call pause on auth
before returning, then you can the
authentication credentials on the Proxy object asynchronously. You have to make sure that
auth
does not get destroyed with @ref. You can then unpause the
authentication with unpause when everything is ready for it to continue.
Parameters:
auth |
authentication state |
retrying |
|