eXosip2_authentication(3)

πŸ“¦ version 5.3.0, in epel 9

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, or NULL to 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 for eXosip_add_authentication_info.
bestie, for real: that realm has to be the exact same arg you used with eXosip_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 Contact header upon reception of 3xx request.

It's useful & required when eXosip_automatic_action() can't do the automatic action:

  1. if you receive a 401 or 407 for BYE (event EXOSIP_CALL_MESSAGE_REQUESTFAILURE).
  2. if you receive 401 or 407 for 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-Expires upon reception of 422.
  • Refresh REGISTER and SUBSCRIBE/REFER before the expiration delay.
  • Retry with Contact header upon reception of 3xx request.
  • Send automatic UPDATE for 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 β€” Incoming SUBSCRIBE for 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