eXosip2_authentication(3)
eXosip2_authentication(3) π
okay bestie, welcome to the libeXosip2 authentication API page β manual name folded right in so you're not lost. this is where eXosip2 handles auth creds, removes them, clears them, does some automatic-action magic, and generates random strings. no cap, it's giving βauth glow-upβ energy. πβ¨
NAME π¦
eXosip2_authentication β eXosip2 authentication API.
SYNOPSIS β¨
Functions
int eXosip_add_authentication_info (struct eXosip_t *excontext, const
char *username, const char *userid, const char *passwd, const char
*ha1, const char *realm)
int eXosip_remove_authentication_info (struct eXosip_t *excontext, const
char *username, const char *realm)
int eXosip_clear_authentication_info (struct eXosip_t *excontext)
int eXosip_default_action (struct eXosip_t *excontext, eXosip_event_t
*je)
void eXosip_automatic_action (struct eXosip_t *excontext)
int eXosip_insubscription_automatic (struct eXosip_t *excontext,
eXosip_event_t *evt)
int eXosip_generate_random (char *buf, int buf_size)
int eXosip_hexa_generate_random (char *buf, int buf_size, char *str1,
char *str2, char *str3)
int eXosip_byte_generate_random (char *buf, int buf_size)
Detailed Description π
bestie, this is the overview section β the full function-by-function tea is right below, so keep scrolling. π
Function Documentation π
eXosip_add_authentication_info π
int eXosip_add_authentication_info (struct eXosip_t * excontext, const char
* username, const char * userid, const char * passwd, const char * ha1,
const char * realm)
Adds authentication credentials. these are used when an outgoing request comes back with an authorization required response β like your request got stopped at the door and needs to show ID. π³β¨
Parameters
excontextβ eXosip_t instance.usernameβ username.useridβ login (usually equals the username).passwdβ password.ha1β MD5 ha1.realmβ realm within which credentials apply, orNULLto apply credentials to unrecognized realms.
eXosip_remove_authentication_info π«Ά
int eXosip_remove_authentication_info (struct eXosip_t * excontext, const
char * username, const char * realm)
Remove authentication credentials. bye-bye creds, we hardly knew ye. π
Parameters
excontextβ eXosip_t instance.usernameβ username.realmβ realm must be exact same arg as foreXosip_add_authentication_info.
bestie, for real: thatrealmhas to be the exact same arg you used witheXosip_add_authentication_info. no improvising. π
eXosip_clear_authentication_info π§Ή
int eXosip_clear_authentication_info (struct eXosip_t * excontext)
Clear all authentication credentials stored in eXosip. full reset, clean slate, fresh start. β¨
Parameters
excontextβ eXosip_t instance.
eXosip_default_action π₯
int eXosip_default_action (struct eXosip_t * excontext, eXosip_event_t * je)
Initiate some default actions:
- Retry with credentials upon reception of
401/407. - Retry with
Contactheader upon reception of3xxrequest.
It's useful & required when eXosip_automatic_action() can't do the automatic action:
- if you receive a
401or407forBYE(eventEXOSIP_CALL_MESSAGE_REQUESTFAILURE). - if you receive
401or407for any sip request outside of dialog (EXOSIP_MESSAGE_REQUESTFAILURE).
Parameters
excontextβ eXosip_t instance.jeβ event to work on.
eXosip_automatic_action π
void eXosip_automatic_action (struct eXosip_t * excontext)
Initiate some automatic actions:
- Retry with credentials upon reception of
401/407. - Retry with higher
Session-Expiresupon reception of422. - Refresh
REGISTERandSUBSCRIBE/REFERbefore the expiration delay. - Retry with
Contactheader upon reception of3xxrequest. - Send automatic
UPDATEfor session-timer feature.
Parameters
excontextβ eXosip_t instance.
eXosip_insubscription_automatic π¦
int eXosip_insubscription_automatic (struct eXosip_t * excontext,
eXosip_event_t * evt)
Automatic internal handling of dialog package. it's giving βI got thisβ energy. πββοΈ
Parameters
excontextβ eXosip_t instance.evtβ IncomingSUBSCRIBEfor dialog package.
eXosip_generate_random β
int eXosip_generate_random (char * buf, int buf_size)
Generate random string: (only digit, and maximum unsigned int). cute little numeric randomness. π’
Parameters
bufβ destination buffer for random string.buf_sizeβ size of destination buffer.
eXosip_hexa_generate_random π
int eXosip_hexa_generate_random (char * buf, int buf_size, char * str1, char
* str2, char * str3)
Generate random string: (low entropy, only hexa). hexa vibes only. π§
Parameters
bufβ destination buffer for random string.buf_sizeβ size of destination buffer.str1β random1 input string.str2β random2 input string.str3β random3 input string.
eXosip_byte_generate_random π
int eXosip_byte_generate_random (char * buf, int buf_size)
Generate random string: (high entropy when compiled with openssl). when openssl is in the mix, the entropy is highkey serving. π₯
Parameters
bufβ destination buffer for random string.buf_sizeβ size of destination buffer.
Author π
Generated automatically by Doxygen for libeXosip2 from the source code.
okay bestie, that's the whole eXosip2_authentication(3) page! source: libeXosip2 Β· version: 5.3.0 Β· date: Thu May 18 2023. slay and bye π
β¨
π¦ where this page comes from
- epel 9: libeXosip2-devel 5.3.0-2.el9 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms