[Vortex] SASL authentication callback object passing

Francis Brosnan Blazquez francis at aspl.es
Mon Jun 5 08:35:13 CEST 2006


El vie, 02-06-2006 a las 11:38 +0200, milton.yates at loule.info escribió:
> Hi,
> 

Hi Milton!

> when one creates a listener, one provides callbacks for channel
> start / stop / frame_received events and one can provide a void*
> pointer which is passed as parameter to the callback.
> This is quite useful, especially because I use C++ and I'm not able to
> use objects without a pointer.
> 

Ok.

> On the other hand, I've noticed that vortex_sasl_set_*_validation()
> functions does NOT provide such "pointer passing" functionality, which
> is really a shame, as I think it would be as much useful to have this
> functionality for the sasl auth callbacks, as it is for the channel
> creation callbacks.
> 
> The situation is, I have some kind of "main" object handling
> connections and user informations, and I can only validate a user I
> can access this object and for that, I would need the "trick" of
> passing an object pointer to the callback you used with the channel
> creation callback.
> 

Sure. You can use the key-indexed store associated to the connection
that is being authenticated. See the following functions:

    - vortex_connection_set_data [1]
    - vortex_connection_get_data [2]

You can even define a key-associated destructor function, allowing to
store different user application data, that is deallocated in a
particular way:

   - vortex_connection_set_data_full [3]

The same functionality is provided at the channel level. However,
because you are authenticating the whole connection, I think you are not
interested to use this.

> Could you change the API in this respect ?

Only to clarify the Vortex API/ABI policy. Once a public API is exposed
through an stable release, it is never modified in future releases. If
the problem doesn't get solved because it is really required to change
the API, an alternative API is added, flagging as deprecated the
previous one.

> 
> Thanks,

Nice day Milton!

> Milton. 

[1]
http://www.aspl.es/fact/files/af-arch/vortex/html/group__vortex__connection_g05b84bff5ba57e6bfd581bc1346b50c9.html#g05b84bff5ba57e6bfd581bc1346b50c9

[2]
http://www.aspl.es/fact/files/af-arch/vortex/html/group__vortex__connection_ge585258c1f6ab515d04650b1978c404b.html#ge585258c1f6ab515d04650b1978c404b

[3] 
http://www.aspl.es/fact/files/af-arch/vortex/html/group__vortex__connection_g0f7af686a9ba454b6bd8951f65d3cb24.html#g0f7af686a9ba454b6bd8951f65d3cb24
-- 
Francis Brosnan Blazquez <francis at aspl.es>
Advanced Software Production Line, S.L.




More information about the Vortex mailing list