get_password property

Pointer<NativeFunction<pj_status_t Function(Pointer<pj_stun_msg> msg, Pointer<Void> user_data, Pointer<pj_str_t> realm, Pointer<pj_str_t> username, Pointer<pj_pool_t> pool, Pointer<Int32> data_type, Pointer<pj_str_t> data)>> get_password
getter/setter pair

Get the password for the specified username. This function is also used to check whether the username is valid.

@param msg The STUN message where the password will be applied to. @param user_data The user data as specified in the credential. @param realm The realm as specified in the message. @param username The username as specified in the message. @param pool Pool to allocate memory when necessary. @param data_type On return, application should fill up this argument with the type of data (which should be zero if data is a plaintext password). @param data On return, application should fill up this argument with the password according to data_type.

@return The callback should return PJ_SUCCESS if username has been successfully verified and password was obtained. If non-PJ_SUCCESS is returned, it is assumed that the username is not valid.

Implementation

external ffi.Pointer<
    ffi.NativeFunction<
        pj_status_t Function(
            ffi.Pointer<pj_stun_msg> msg,
            ffi.Pointer<ffi.Void> user_data,
            ffi.Pointer<pj_str_t> realm,
            ffi.Pointer<pj_str_t> username,
            ffi.Pointer<pj_pool_t> pool,
            ffi.Pointer<ffi.Int32> data_type,
            ffi.Pointer<pj_str_t> data)>> get_password;