Authentication in HTTP is based on the "challenge-response" principle: the client will not provide authentication credentials to the server until challenged to do so. After being challenged, the HTTP request can be re-sent with an extra header presenting the authentication credentials. For this reason, authentication is implemented in neon using callbacks: when an authentication challenge is received by the client, a callback function is invoked which must supply the username and password required to authenticate the user. In an interactive application, this callback will typically be implemented using some form of username/password prompt.
Two types of authentication are supported: server authentication (via the ne_set_server_auth function), and proxy authentication (via the ne_set_proxy_auth function), which act independently of each other.