Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

exosip2_authentication(3) [debian man page]

eXosip2 authentication API(3)					    libeXosip2					     eXosip2 authentication API(3)

NAME
eXosip2 authentication API - Functions int eXosip_add_authentication_info (const char *username, const char *userid, const char *passwd, const char *ha1, const char *realm) int eXosip_clear_authentication_info (void) int eXosip_default_action (eXosip_event_t *je) void eXosip_automatic_refresh (void) void eXosip_automatic_action (void) int eXosip_insubscription_automatic (eXosip_event_t *evt) int eXosip_generate_random (char *buf, int buf_size) Detailed Description Function Documentation int eXosip_add_authentication_info (const char *username, const char *userid, const char *passwd, const char *ha1, const char *realm) Add authentication credentials. These are used when an outgoing request comes back with an authorization required response. Parameters: username username userid login (usually equals the username) passwd password ha1 currently ignored realm realm within which credentials apply, or NULL to apply credentials to unrecognized realms int eXosip_clear_authentication_info (void) Clear all authentication credentials stored in eXosip. int eXosip_default_action (eXosip_event_t *je) Initiate some default actions: Retry with credentials upon reception of 401/407. Retry with Contact header upon reception of 3xx request. void eXosip_automatic_refresh (void) Refresh REGISTER and SUBSCRIBE before the expiration delay. void eXosip_automatic_action (void) Initiate some automatic actions: Retry with credentials upon reception of 401/407. Refresh REGISTER and SUBSCRIBE before the expiration delay. Retry with Contact header upon reception of 3xx request. int eXosip_insubscription_automatic (eXosip_event_t *evt) Automatic internal handling of known package. Parameters: evt event related to an incoming subscription. int eXosip_generate_random (char *buf, intbuf_size) Generate random string: Parameters: buf destination buffer for random string. buf_size size of destination buffer Author Generated automatically by Doxygen for libeXosip2 from the source code. Version 3.1.0 Sun Jun 24 2012 eXosip2 authentication API(3)

Check Out this Related Man Page

NE_SET_SERVER_AUTH(3)						neon API reference					     NE_SET_SERVER_AUTH(3)

NAME
ne_set_server_auth, ne_set_proxy_auth, ne_forget_auth - register authentication callbacks SYNOPSIS
#include <ne_auth.h> typedef int (*ne_auth_creds)(void *userdata, const char *realm, int attempt, char *username, char *password); void ne_set_server_auth(ne_session *session, ne_auth_creds callback, void *userdata); void ne_set_proxy_auth(ne_session *session, ne_auth_creds callback, void *userdata); void ne_forget_auth(ne_session *session); DESCRIPTION
The ne_auth_creds function type defines a callback which is invoked when a server or proxy server requires user authentication for a particular request. The realm string is supplied by the server. The attempt is a counter giving the number of times the request has been retried with different authentication credentials. The first time the callback is invoked for a particular request, attempt will be zero. To retry the request using new authentication credentials, the callback should return zero, and the username and password buffers must contain NUL-terminated strings. The NE_ABUFSIZ constant gives the size of these buffers. Tip If you only wish to allow the user one attempt to enter credentials, use the value of the attempt parameter as the return value of the callback. To abort the request, the callback should return a non-zero value; in which case the contents of the username and password buffers are ignored. The ne_forget_auth function can be used to discard the cached authentication credentials. EXAMPLES
/* Function which prompts for a line of user input: */ extern char *prompt_for(const char *prompt); static int my_auth(void *userdata, const char *realm, int attempts, char *username, char *password) { strncpy(username, prompt_for("Username: "), NE_ABUFSIZ); strncpy(password, prompt_for("Password: "), NE_ABUFSIZ); return attempts; } int main(...) { ne_session *sess = ne_session_create(...); ne_set_server_auth(sess, my_auth, NULL); /* ... */ } AUTHOR
Joe Orton <neon@lists.manyfish.co.uk> Author. COPYRIGHT
neon 0.30.0 31 July 2013 NE_SET_SERVER_AUTH(3)
Man Page