get_auth property
This callback is called by pj_stun_verify_credential() when server needs to challenge the request with 401 response.
@param user_data The user data as specified in the credential. @param pool Pool to allocate memory. @param realm On return, the function should fill in with realm if application wants to use long term credential. Otherwise application should set empty string for the realm. @param nonce On return, if application wants to use long term credential, it MUST fill in the nonce with some value. Otherwise if short term credential is wanted, it MAY set this value. If short term credential is wanted and the application doesn't want to include NONCE, then it must set this to empty string.
@return The callback should return PJ_SUCCESS, or otherwise response message will not be created.
Implementation
external ffi.Pointer<
ffi.NativeFunction<
pj_status_t Function(
ffi.Pointer<ffi.Void> user_data,
ffi.Pointer<pj_pool_t> pool,
ffi.Pointer<pj_str_t> realm,
ffi.Pointer<pj_str_t> nonce)>> get_auth;