Liberator Auth API
8.0.3.315031-546c6d47
|
Typedefs | |
typedef void(* | eventcallback_t) (void *data, short event, short code) |
Definition of the callback function for delayed events. More... | |
Calls to the Liberator Auth Module must not block or there will be delays to some or all of the Liberator system.
For the _authfuncs::auth_new_user() call, it is possible to return AUTH_DELAYED after starting another thread to do the work for you. Returning AUTH_DELAYED means that there is no blocking while a database is accessed or any other other blocking call is made.
When returning AUTH_DELAYED, the first argument to the eventcallback_t event callback function should be a pointer a logininfo_t object, which contains the session identifier. The second argument should be THREADS_AUTH_LOGIN and the third one should be a valid return code.
It is also possible to return AUTH_DELAYED after an _authfuncs::auth_map_object() call.
When returning AUTH_DELAYED, the first argument to the event callback function (eventcallback_t) should be a pointer a mapinfo_t object, which contains the session identifier, the original name of the object and the new name of the object. The second argument should be THREADS_AUTH_MAPPED and the third one should be a valid return code.
In addition to the valid return codes, if auth_map_object is used with a delay, it may also return AUTH_DENY to indicate that the user is not permissioned for this object.
Following that, you must send Caplin Liberator an event in order to get the user information back.
typedef void(* eventcallback_t) (void *data, short event, short code) |
Definition of the callback function for delayed events.
data | - A pointer to the relevant object (either logininfo_t, mapinfo_t or checkwriteinfo_t) |
event | - The event code (either THREADS_AUTH_LOGIN, THREADS_AUTH_MAPPED or THREADS_AUTH_CHECKWRITE) |
code | - The result code (e.g. AUTH_OK or AUTH_INVALID_USER |